Running webapp with Django 1.7.6

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Running webapp with Django 1.7.6

Omar Kohl
Hi,

I'm trying to get the webapp to run. The regular Gramp Desktop Application starts fine (python3 Gramps.py) so I should have all necessary dependencies installed.

OS: Ubuntu 15.04
Python: 3.4.3
Django: 1.7.6

cd gramps/webapp
make clean
make
make run

I can then access the webapp under http://localhost:8000 After logging in with the admin user I select Browse/People and try to add a new Person. I get following error upon clicking the Plus sign:

VariableDoesNotExist
Failed lookup for key [gender_type] in ' [I0001]'

in Template view_person_detail.html on line 65:

<td class="ColumnValue" id="data">{% render personform.gender_type user action None "/person/?search=gender%%3D%s" personform.model.gender_type %}</td>


Ok, so I remove that line from the template.

Now I can see the form to add a new user (Gender is missing obviously). Adding a Person fails because "gender_type this field is required".


Ok, so I try with the example data provided:
make clean
make example
make run

Warning "You have unapplied migrations; your app may not work properly until they are applied."

So I run:
GRAMPS_RESOURCES=../.. PYTHONPATH=../.. python3 manage.py migrate

and type 'yes' for everything (e.g. The following content types are stale and need to be deleted auth | message).

make run


Now I can open the browser but when I try to browse People (Count: 2159) I get following error:

OperationalError
no such column: grampsdb_tag.cache



Any pointers what I'm doing wrong? Possibly the Django version is too new? Possibly the example data is not up-to-date and no longer matches the model? If required I can provide more debugging info. I didn't want to clutter the mail with more (possibly useless) information.

I'm well aware that the webapp is in development and by no means stable. I would like to do some developing on it because I think Gramps as a Web Application would be neat. (fyi: I have been using the Desktop version for a few years and I'm very happy with it)

Kind regards,
Omar

-- 
Omar Kohl

***************************************************************
Emails are not secure! They can be read and even modified by a 
third party.
http://en.wikipedia.org/wiki/Email#Privacy_concerns

Use OpenPGP for secure encryption: Thunderbird & Enigmail are 
free and easy to configure. For Windows users: Gpg4win.

My PGP fingerprint:
C226 AAB4 ADB4 901B D0E5 6DD4 4624 3C28 C092 F79E
***************************************************************

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Running webapp with Django 1.7.6

DS Blank
On Mon, May 18, 2015 at 5:05 PM, Omar Kohl <[hidden email]> wrote:
Hi,

I'm trying to get the webapp to run. The regular Gramp Desktop Application starts fine (python3 Gramps.py) so I should have all necessary dependencies installed.

OS: Ubuntu 15.04
Python: 3.4.3
Django: 1.7.6

cd gramps/webapp
make clean
make
make run

I can then access the webapp under http://localhost:8000 After logging in with the admin user I select Browse/People and try to add a new Person. I get following error upon clicking the Plus sign:

VariableDoesNotExist
Failed lookup for key [gender_type] in ' [I0001]'

in Template view_person_detail.html on line 65:

<td class="ColumnValue" id="data">{% render personform.gender_type user action None "/person/?search=gender%%3D%s" personform.model.gender_type %}</td>


Ok, so I remove that line from the template.

Now I can see the form to add a new user (Gender is missing obviously). Adding a Person fails because "gender_type this field is required".


Ok, so I try with the example data provided:
make clean
make example
make run

Warning "You have unapplied migrations; your app may not work properly until they are applied."

So I run:
GRAMPS_RESOURCES=../.. PYTHONPATH=../.. python3 manage.py migrate

and type 'yes' for everything (e.g. The following content types are stale and need to be deleted auth | message).

make run


Now I can open the browser but when I try to browse People (Count: 2159) I get following error:

OperationalError
no such column: grampsdb_tag.cache



Any pointers what I'm doing wrong? Possibly the Django version is too new? Possibly the example data is not up-to-date and no longer matches the model? If required I can provide more debugging info. I didn't want to clutter the mail with more (possibly useless) information.

I'm well aware that the webapp is in development and by no means stable. I would like to do some developing on it because I think Gramps as a Web Application would be neat. (fyi: I have been using the Desktop version for a few years and I'm very happy with it)

Kind regards,
Omar

Omar,

You did everything exactly correct. These errors are caused by the most recent versions of Django. We need to make some fixes to the gramps.webapp in order to use with Django 1.7.

You can either drop back to Django 1.6, or begin to examine the changes in Django 1.7 and fix in code, or wait. Bringing gramps.webapp up to date is my next big task. (I had started that when I realized that swapping the backends wouldn't be that hard, now that we have a Django backend. Now that that is complete, I'm back to the web interface.)

It would be great if you could help with Django! The best way forward would be to make small, focused github pull requests (PR) to fix specific things.

-Doug
 

-- 
Omar Kohl

***************************************************************
Emails are not secure! They can be read and even modified by a 
third party.
http://en.wikipedia.org/wiki/Email#Privacy_concerns

Use OpenPGP for secure encryption: Thunderbird & Enigmail are 
free and easy to configure. For Windows users: Gpg4win.

My PGP fingerprint:
C226 AAB4 ADB4 901B D0E5 6DD4 4624 3C28 C092 F79E
***************************************************************

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel



------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel