<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Hi Simone,</p>
<p><br>
</p>
<p>Django seems to be already at 1.6.11 version</p>
<p><br>
</p>
<p>Any other hints?</p>
<p><br>
</p>
<p>E.<br>
</p>
<br>
<br>
<div style="color: rgb(0, 0, 0);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>Da:</b> Simone Dalmasso <simone.dalmasso@gmail.com><br>
<b>Inviato:</b> luned́ 27 giugno 2016 17.56<br>
<b>A:</b> Eugenio Trumpy<br>
<b>Cc:</b> geonode-users@lists.osgeo.org<br>
<b>Oggetto:</b> Re: [GeoNode-users] database update error</font>
<div> </div>
</div>
<div>
<div dir="ltr">It's likely to be the django version. Django on 2.4 has to be 1.6.11</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">2016-06-27 16:40 GMT+02:00 Eugenio Trumpy <span dir="ltr">
<<a href="mailto:frippe12573@hotmail.com" target="_blank">frippe12573@hotmail.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div dir="ltr">
<div style="font-size:12pt; color:#000000; background-color:#ffffff; font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Hi Simone,</p>
<p><br>
</p>
<p>I forgot I had both the dbs backups and /geonode (the once I had before the git pull) saved.</p>
<p>So I restore the old /geonode (I removed all the new geonode dir obtained with the git pull) and restored the DBs dumps.</p>
<p><br>
</p>
<p>Everything seems to be working, I see the right number of the layers and maps, groups, people...</p>
<p>However, clicking on layer I have an empty page (no layers available).</p>
<p>So I run python manage.py updatelayers, but I get:</p>
<p></p>
<div><br>
Traceback (most recent call last):<br>
File "manage.py", line 29, in <module><br>
execute_from_command_line(sys.argv)<br>
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 399, in execute_from_command_line<br>
utility.execute()<br>
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 392, in execute<br>
self.fetch_command(subcommand).run_from_argv(self.argv)<br>
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 272, in fetch_command<br>
klass = load_command_class(app_name, subcommand)<br>
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 75, in load_command_class<br>
module = import_module('%s.management.commands.%s' % (app_name, name))<br>
File "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py", line 40, in import_module<br>
__import__(name)<br>
File "/dati/geonode/geonode/geoserver/management/commands/updatelayers.py", line 24, in <module><br>
from geonode.geoserver.helpers import gs_slurp<br>
File "/dati/geonode/geonode/geoserver/helpers.py", line 70, in <module><br>
from geonode.layers.utils import layer_type, get_files<br>
File "/dati/geonode/geonode/layers/utils.py", line 46, in <module><br>
from geonode.layers.models import Layer, UploadSession<br>
File "/dati/geonode/geonode/layers/models.py", line 35, in <module><br>
from geonode.base.models import ResourceBase, ResourceBaseManager, resourcebase_post_save<br>
File "/dati/geonode/geonode/base/models.py", line 41, in <module><br>
from mptt.models import MPTTModel, TreeForeignKey<br>
File "/usr/local/lib/python2.7/dist-packages/mptt/models.py", line 15, in <module><br>
from mptt.managers import TreeManager<br>
File "/usr/local/lib/python2.7/dist-packages/mptt/managers.py", line 63, in <module><br>
class TreeManager(models.Manager.from_queryset(TreeQuerySet)):<br>
AttributeError: type object 'Manager' has no attribute 'from_queryset'<br>
<br>
Any ideas?<br>
<br>
E.<br>
</div>
<p></p>
<p><br>
</p>
<p><br>
</p>
<br>
<div style="color:rgb(0,0,0)">
<hr style="display:inline-block; width:98%">
<div dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>Da:</b> Simone Dalmasso <<a href="mailto:simone.dalmasso@gmail.com" target="_blank">simone.dalmasso@gmail.com</a>><br>
<b>Inviato:</b> luned́ 27 giugno 2016 14.39<br>
<b>A:</b> Eugenio Trumpy<br>
<b>Cc:</b> <a href="mailto:geonode-users@lists.osgeo.org" target="_blank">geonode-users@lists.osgeo.org</a><br>
<b>Oggetto:</b> Re: [GeoNode-users] database update error</font>
<div> </div>
</div>
<div>
<div dir="ltr">you can use the git branch 2.4.x. git checkout is the command.</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">2016-06-27 14:25 GMT+02:00 Eugenio Trumpy <span dir="ltr">
<<a href="mailto:frippe12573@hotmail.com" target="_blank">frippe12573@hotmail.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div dir="ltr">
<div style="font-size:12pt; color:#000000; background-color:#ffffff; font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Hi Simone,</p>
<p><br>
</p>
<p>thank you for your answer so far.</p>
<p>So my solution is to put the head of my git repo to the once that was working up to the last week, isn't it?</p>
<p><br>
</p>
<p>How can I re-set the git head to such version? I don't remember the code version.</p>
<p><br>
</p>
<p>Thanks</p>
<p><br>
</p>
<p>E.</p>
<p><br>
</p>
<div style="color:rgb(0,0,0)">
<hr style="display:inline-block; width:98%">
<div dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>Da:</b> Simone Dalmasso <<a href="mailto:simone.dalmasso@gmail.com" target="_blank">simone.dalmasso@gmail.com</a>><br>
<b>Inviato:</b> luned́ 27 giugno 2016 13.16<br>
<b>A:</b> Eugenio Trumpy<br>
<b>Cc:</b> <a href="mailto:geonode-users@lists.osgeo.org" target="_blank">geonode-users@lists.osgeo.org</a><br>
<b>Oggetto:</b> Re: [GeoNode-users] database update error</font>
<div> </div>
</div>
<div>
<div dir="ltr">Eugenio, sorry for the delay.
<div><br>
</div>
<div>I did not have time to test it on postgres so my suggestion at the moment is to stick with the 2.4 stable release.</div>
<div><br>
</div>
<div><br>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">2016-06-23 11:22 GMT+02:00 Eugenio Trumpy <span dir="ltr">
<<a href="mailto:frippe12573@hotmail.com" target="_blank">frippe12573@hotmail.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div>
<div dir="ltr">Hi Simone,<br>
<br>
django is at 1.8.7 version, is that correct for the master? how can I check the version of the data model?<br>
<br>
However, from empty geonode db I run manage.py migrate auth:<br>
<br>
System check identified some issues:<br>
<br>
WARNINGS:<br>
account.EmailConfirmation.created: (fields.W161) Fixed default value provided.<br>
HINT: It seems you set a fixed date / time / datetime value as default for this field. This may not be what you want. If you want to have the current date as default, use `django.utils.timezone.now`<br>
dialogos.Comment.ip_address: (fields.W900) IPAddressField has been deprecated. Support for it (except in historical migrations) will be removed in Django 1.9.<br>
HINT: Use GenericIPAddressField instead.<br>
Operations to perform:<br>
Apply all migrations: auth<br>
Running migrations:<br>
Rendering model states... DONE<br>
Applying contenttypes.0001_initial... OK<br>
Applying contenttypes.0002_remove_content_type_name... OK<br>
Applying auth.0001_initial... OK<br>
Applying auth.0002_alter_permission_name_max_length... OK<br>
Applying auth.0003_alter_user_email_max_length... OK<br>
Applying auth.0004_alter_user_username_opts... OK<br>
Applying auth.0005_alter_user_last_login_null... OK<br>
Applying auth.0006_require_contenttypes_0002... OK<br>
Traceback (most recent call last):<br>
File "manage.py", line 29, in <module><br>
execute_from_command_line(sys.argv)<br>
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 354, in execute_from_command_line<br>
utility.execute()<br>
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 346, in execute<br>
self.fetch_command(subcommand).run_from_argv(self.argv)<br>
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 394, in run_from_argv<br>
self.execute(*args, **cmd_options)<br>
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 445, in execute<br>
output = self.handle(*args, **options)<br>
File "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/migrate.py", line 226, in handle<br>
emit_post_migrate_signal(created_models, self.verbosity, self.interactive, connection.alias)<br>
File "/usr/local/lib/python2.7/dist-packages/django/core/management/sql.py", line 280, in emit_post_migrate_signal<br>
using=db)<br>
File "/usr/local/lib/python2.7/dist-packages/django/dispatch/dispatcher.py", line 189, in send<br>
response = receiver(signal=self, sender=sender, **named)<br>
File "/usr/local/lib/python2.7/dist-packages/django/contrib/sites/management.py", line 20, in create_default_site<br>
if not Site.objects.using(using).exists():<br>
File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", line 586, in exists<br>
return self.query.has_results(using=self.db)<br>
File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/query.py", line 484, in has_results<br>
return compiler.has_results()<br>
File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py", line 811, in has_results<br>
return bool(self.execute_sql(SINGLE))<br>
File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py", line 840, in execute_sql<br>
cursor.execute(sql, params)<br>
File "/usr/local/lib/python2.7/dist-packages/django/db/backends/utils.py", line 79, in execute<br>
return super(CursorDebugWrapper, self).execute(sql, params)<br>
File "/usr/local/lib/python2.7/dist-packages/django/db/backends/utils.py", line 64, in execute<br>
return self.cursor.execute(sql, params)<br>
File "/usr/local/lib/python2.7/dist-packages/django/db/utils.py", line 98, in __exit__<br>
six.reraise(dj_exc_type, dj_exc_value, traceback)<br>
File "/usr/local/lib/python2.7/dist-packages/django/db/backends/utils.py", line 64, in execute<br>
return self.cursor.execute(sql, params)<br>
django.db.utils.ProgrammingError: relation "django_site" does not exist<br>
LINE 1: SELECT (1) AS "a" FROM "django_site" LIMIT 1<br>
<br>
then I run <span>manage.py migrate sites:<br>
<br>
System check identified some issues:<br>
<br>
WARNINGS:<br>
account.EmailConfirmation.created: (fields.W161) Fixed default value provided.<br>
HINT: It seems you set a fixed date / time / datetime value as default for this field. This may not be what you want. If you want to have the current date as default, use `django.utils.timezone.now`<br>
dialogos.Comment.ip_address: (fields.W900) IPAddressField has been deprecated. Support for it (except in historical migrations) will be removed in Django 1.9.<br>
HINT: Use GenericIPAddressField instead.<br>
Operations to perform:<br>
Apply all migrations: sites<br>
Running migrations:<br>
Rendering model states... DONE<br>
Applying sites.0001_initial... OK<br>
Traceback (most recent call last):<br>
File "manage.py", line 29, in <module><br>
execute_from_command_line(sys.argv)<br>
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 354, in execute_from_command_line<br>
utility.execute()<br>
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 346, in execute<br>
self.fetch_command(subcommand).run_from_argv(self.argv)<br>
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 394, in run_from_argv<br>
self.execute(*args, **cmd_options)<br>
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 445, in execute<br>
output = self.handle(*args, **options)<br>
File "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/migrate.py", line 226, in handle<br>
emit_post_migrate_signal(created_models, self.verbosity, self.interactive, connection.alias)<br>
File "/usr/local/lib/python2.7/dist-packages/django/core/management/sql.py", line 280, in emit_post_migrate_signal<br>
using=db)<br>
File "/usr/local/lib/python2.7/dist-packages/django/dispatch/dispatcher.py", line 189, in send<br>
response = receiver(signal=self, sender=sender, **named)<br>
File "/usr/local/lib/python2.7/dist-packages/guardian/management/__init__.py", line 32, in create_anonymous_user<br>
User.objects.get(pk=guardian_settings.ANONYMOUS_USER_ID)<br>
File "/usr/local/lib/python2.7/dist-packages/django/db/models/manager.py", line 127, in manager_method<br>
return getattr(self.get_queryset(), name)(*args, **kwargs)<br>
File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", line 328, in get<br>
num = len(clone)<br>
File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", line 144, in __len__<br>
self._fetch_all()<br>
File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", line 965, in _fetch_all<br>
self._result_cache = list(self.iterator())<br>
File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", line 238, in iterator<br>
results = compiler.execute_sql()<br>
File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py", line 840, in execute_sql<br>
cursor.execute(sql, params)<br>
File "/usr/local/lib/python2.7/dist-packages/django/db/backends/utils.py", line 79, in execute<br>
return super(CursorDebugWrapper, self).execute(sql, params)<br>
File "/usr/local/lib/python2.7/dist-packages/django/db/backends/utils.py", line 64, in execute<br>
return self.cursor.execute(sql, params)<br>
File "/usr/local/lib/python2.7/dist-packages/django/db/utils.py", line 98, in __exit__<br>
six.reraise(dj_exc_type, dj_exc_value, traceback)<br>
File "/usr/local/lib/python2.7/dist-packages/django/db/backends/utils.py", line 64, in execute<br>
return self.cursor.execute(sql, params)<br>
django.db.utils.ProgrammingError: relation "people_profile" does not exist<br>
LINE 1: ...ofile"."zipcode", "people_profile"."country" FROM "people_pr...<br>
<br>
then manage.py migrate people:<br>
<br>
System check identified some issues:<br>
<br>
WARNINGS:<br>
account.EmailConfirmation.created: (fields.W161) Fixed default value provided.<br>
HINT: It seems you set a fixed date / time / datetime value as default for this field. This may not be what you want. If you want to have the current date as default, use `django.utils.timezone.now`<br>
dialogos.Comment.ip_address: (fields.W900) IPAddressField has been deprecated. Support for it (except in historical migrations) will be removed in Django 1.9.<br>
HINT: Use GenericIPAddressField instead.<br>
Operations to perform:<br>
Apply all migrations: people<br>
Running migrations:<br>
Rendering model states... DONE<br>
Applying taggit.0001_initial... OK<br>
Applying taggit.0002_auto_20150616_2121... OK<br>
Applying people.0001_initial... OK<br>
Applying people.0002_auto_20160623_0404... OK<br>
Traceback (most recent call last):<br>
File "manage.py", line 29, in <module><br>
execute_from_command_line(sys.argv)<br>
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 354, in execute_from_command_line<br>
utility.execute()<br>
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 346, in execute<br>
self.fetch_command(subcommand).run_from_argv(self.argv)<br>
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 394, in run_from_argv<br>
self.execute(*args, **cmd_options)<br>
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 445, in execute<br>
output = self.handle(*args, **options)<br>
File "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/migrate.py", line 226, in handle<br>
emit_post_migrate_signal(created_models, self.verbosity, self.interactive, connection.alias)<br>
File "/usr/local/lib/python2.7/dist-packages/django/core/management/sql.py", line 280, in emit_post_migrate_signal<br>
using=db)<br>
File "/usr/local/lib/python2.7/dist-packages/django/dispatch/dispatcher.py", line 189, in send<br>
response = receiver(signal=self, sender=sender, **named)<br>
File "/usr/local/lib/python2.7/dist-packages/guardian/management/__init__.py", line 39, in create_anonymous_user<br>
user.save()<br>
File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py", line 734, in save<br>
force_update=force_update, update_fields=update_fields)<br>
File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py", line 771, in save_base<br>
update_fields=update_fields, raw=raw, using=using)<br>
File "/usr/local/lib/python2.7/dist-packages/django/dispatch/dispatcher.py", line 189, in send<br>
response = receiver(signal=self, sender=sender, **named)<br>
File "/usr/local/lib/python2.7/dist-packages/account/models.py", line 106, in user_post_save<br>
Account.create(user=user)<br>
File "/usr/local/lib/python2.7/dist-packages/account/models.py", line 63, in create<br>
account.save()<br>
File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py", line 734, in save<br>
force_update=force_update, update_fields=update_fields)<br>
File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py", line 762, in save_base<br>
updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)<br>
File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py", line 846, in _save_table<br>
result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)<br>
File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py", line 885, in _do_insert<br>
using=using, raw=raw)<br>
File "/usr/local/lib/python2.7/dist-packages/django/db/models/manager.py", line 127, in manager_method<br>
return getattr(self.get_queryset(), name)(*args, **kwargs)<br>
File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", line 920, in _insert<br>
return query.get_compiler(using=using).execute_sql(return_id)<br>
File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py", line 974, in execute_sql<br>
cursor.execute(sql, params)<br>
File "/usr/local/lib/python2.7/dist-packages/django/db/backends/utils.py", line 79, in execute<br>
return super(CursorDebugWrapper, self).execute(sql, params)<br>
File "/usr/local/lib/python2.7/dist-packages/django/db/backends/utils.py", line 64, in execute<br>
return self.cursor.execute(sql, params)<br>
File "/usr/local/lib/python2.7/dist-packages/django/db/utils.py", line 98, in __exit__<br>
six.reraise(dj_exc_type, dj_exc_value, traceback)<br>
File "/usr/local/lib/python2.7/dist-packages/django/db/backends/utils.py", line 64, in execute<br>
return self.cursor.execute(sql, params)<br>
django.db.utils.ProgrammingError: relation "account_account" does not exist<br>
LINE 1: INSERT INTO "account_account" ("user_id", "timezone", "langu...<br>
<br>
then manage.py migrate:<br>
<br>
System check identified some issues:<br>
<br>
WARNINGS:<br>
account.EmailConfirmation.created: (fields.W161) Fixed default value provided.<br>
HINT: It seems you set a fixed date / time / datetime value as default for this field. This may not be what you want. If you want to have the current date as default, use `django.utils.timezone.now`<br>
dialogos.Comment.ip_address: (fields.W900) IPAddressField has been deprecated. Support for it (except in historical migrations) will be removed in Django 1.9.<br>
HINT: Use GenericIPAddressField instead.<br>
Operations to perform:<br>
Synchronize unmigrated apps: tasks, dialogos, modeltranslation, django_extensions, djcelery, polymorphic, agon_ratings, gis, pinax_theme_bootstrap_account, django_forms_bootstrap, catalogue, humanize, geoserver, announcements, storages, user_messages, mptt,
friendlytagloader, staticfiles, geoexplorer, sitemaps, proxy, account, pinax_theme_bootstrap, pagination, autocomplete_light, messages, leaflet, api, avatar, social, security<br>
Apply all migrations: layers, documents, actstream, people, admin, guardian, sessions, sites, auth, tastypie, maps, contenttypes, base, upload, groups, services, taggit<br>
Synchronizing apps without migrations:<br>
Creating tables...<br>
Creating table celery_taskmeta<br>
Creating table celery_tasksetmeta<br>
Creating table djcelery_intervalschedule<br>
Creating table djcelery_crontabschedule<br>
Creating table djcelery_periodictasks<br>
Creating table djcelery_periodictask<br>
Creating table djcelery_workerstate<br>
Creating table djcelery_taskstate<br>
Creating table account_account<br>
Creating table account_signupcode<br>
Creating table account_signupcodeextended<br>
Creating table account_signupcoderesult<br>
Creating table account_emailaddress<br>
Creating table account_emailconfirmation<br>
Creating table account_accountdeletion<br>
Creating table avatar_avatar<br>
Creating table dialogos_comment<br>
Creating table agon_ratings_overallrating<br>
Creating table agon_ratings_rating<br>
Creating table announcements_announcement<br>
Creating table announcements_dismissal<br>
Creating table user_messages_thread<br>
Creating table user_messages_userthread<br>
Creating table user_messages_message<br>
Running deferred SQL...<br>
Installing custom SQL...<br>
Running migrations:<br>
Rendering model states... DONE<br>
Applying actstream.0001_initial... OK<br>
Applying admin.0001_initial... OK<br>
Applying base.0001_initial... OK<br>
Applying base.0002_topiccategory_fa_class... OK<br>
Applying base.0003_auto_20160623_0404... OK<br>
Applying documents.0001_initial... OK<br>
Applying groups.0001_initial... OK<br>
Applying guardian.0001_initial... OK<br>
Applying layers.0001_initial... OK<br>
Applying services.0001_initial... OK<br>
Applying layers.0002_initial_step2... OK<br>
Applying layers.0003_auto_20160623_0404... OK<br>
Applying maps.0001_initial... OK<br>
Applying services.0002_auto_20160623_0404... OK<br>
Applying sessions.0001_initial... OK<br>
Applying tastypie.0001_initial... OK<br>
Applying upload.0001_initial... OK<br>
<br>
Is that ok? How/can I restore the dump file of my previous DBs?<br>
<br>
Thanks<br>
<br>
Eugenio</span><br>
<br>
<br>
<div>
<hr>
From: <a href="mailto:simone.dalmasso@gmail.com" target="_blank">simone.dalmasso@gmail.com</a><br>
Date: Thu, 23 Jun 2016 10:55:47 +0200<br>
Subject: Re: [GeoNode-users] database update error<br>
To: <a href="mailto:frippe12573@hotmail.com" target="_blank">frippe12573@hotmail.com</a><br>
CC: <a href="mailto:geonode-users@lists.osgeo.org" target="_blank">geonode-users@lists.osgeo.org</a><br>
<br>
<div dir="ltr">Hi Eugenio,
<div><br>
</div>
<div>beware that the data model and django version is changed in master. This issue happens when using postgres as db and not sqllite. At the moment the way to create the new db is by doing</div>
<div><br>
</div>
<div><span>manage.py migrate auth</span><br>
<span>manage.py migrate sites</span><br>
manage.py migrate people<br>
<span>manage.py migrate </span><br>
We will fix this in the future.<br>
<br>
<br>
<br>
<br>
</div>
</div>
<div><br>
<div>2016-06-23 10:27 GMT+02:00 Eugenio Trumpy <span dir="ltr"><<a href="mailto:frippe12573@hotmail.com" target="_blank">frippe12573@hotmail.com</a>></span>:<br>
<blockquote style="border-left:1px #ccc solid; padding-left:1ex">
<div>
<div dir="ltr">Hi all,<br>
<br>
today I was trying to update geonode from git (custom installation on ubuntu 14.04).<br>
I made a backup of the data from geonode and geonode_data db, then I created new DBs,<br>
and I run syncdb --noinput, but something seems not working:<br>
<br>
System check identified some issues:<br>
<br>
WARNINGS:<br>
account.EmailConfirmation.created: (fields.W161) Fixed default value provided.<br>
HINT: It seems you set a fixed date / time / datetime value as default for this field. This may not be what you want. If you want to have the current date as default, use `django.utils.timezone.now`<br>
dialogos.Comment.ip_address: (fields.W900) IPAddressField has been deprecated. Support for it (except in historical migrations) will be removed in Django 1.9.<br>
HINT: Use GenericIPAddressField instead.<br>
Operations to perform:<br>
Synchronize unmigrated apps: tasks, dialogos, modeltranslation, django_extensions, polymorphic, agon_ratings, gis, pinax_theme_bootstrap_account, django_forms_bootstrap, catalogue, humanize, geoserver, announcements, storages, user_messages, mptt, friendlytagloader,
staticfiles, geoexplorer, sitemaps, proxy, account, pinax_theme_bootstrap, pagination, autocomplete_light, messages, leaflet, api, avatar, social, security<br>
Apply all migrations: layers, documents, actstream, people, admin, guardian, sessions, djcelery, sites, auth, tastypie, maps, contenttypes, base, upload, groups, services, taggit<br>
Synchronizing apps without migrations:<br>
Creating tables...<br>
Creating table account_account<br>
Creating table account_signupcode<br>
Creating table account_signupcodeextended<br>
Creating table account_signupcoderesult<br>
Creating table account_emailaddress<br>
Creating table account_emailconfirmation<br>
Creating table account_accountdeletion<br>
Creating table avatar_avatar<br>
Creating table dialogos_comment<br>
Creating table agon_ratings_overallrating<br>
Creating table agon_ratings_rating<br>
Creating table announcements_announcement<br>
Creating table announcements_dismissal<br>
Creating table user_messages_thread<br>
Creating table user_messages_userthread<br>
Creating table user_messages_message<br>
Running deferred SQL...<br>
Traceback (most recent call last):<br>
File "manage.py", line 29, in <module><br>
execute_from_command_line(sys.argv)<br>
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 354, in execute_from_command_line<br>
utility.execute()<br>
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 346, in execute<br>
self.fetch_command(subcommand).run_from_argv(self.argv)<br>
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 394, in run_from_argv<br>
self.execute(*args, **cmd_options)<br>
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 445, in execute<br>
output = self.handle(*args, **options)<br>
File "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/syncdb.py", line 25, in handle<br>
call_command("migrate", **options)<br>
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 120, in call_command<br>
return command.execute(*args, **defaults)<br>
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 445, in execute<br>
output = self.handle(*args, **options)<br>
File "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/migrate.py", line 179, in handle<br>
created_models = self.sync_apps(connection, executor.loader.unmigrated_apps)<br>
File "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/migrate.py", line 318, in sync_apps<br>
cursor.execute(statement)<br>
File "/usr/local/lib/python2.7/dist-packages/django/db/backends/utils.py", line 79, in execute<br>
return super(CursorDebugWrapper, self).execute(sql, params)<br>
File "/usr/local/lib/python2.7/dist-packages/django/db/backends/utils.py", line 64, in execute<br>
return self.cursor.execute(sql, params)<br>
File "/usr/local/lib/python2.7/dist-packages/django/db/utils.py", line 98, in __exit__<br>
six.reraise(dj_exc_type, dj_exc_value, traceback)<br>
File "/usr/local/lib/python2.7/dist-packages/django/db/backends/utils.py", line 62, in execute<br>
return self.cursor.execute(sql)<br>
django.db.utils.ProgrammingError: relation "people_profile" does not exist<br>
<br>
Of course I performed the update of the dbs after run git pull on geonode dir.<br>
<br>
Can you help me?<span><font color="#888888"><br>
<br>
Eugenio<br>
</font></span></div>
</div>
<br>
_______________________________________________<br>
geonode-users mailing list<br>
<a href="mailto:geonode-users@lists.osgeo.org" target="_blank">geonode-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/geonode-users" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/geonode-users</a><br>
<br>
</blockquote>
</div>
<br>
<div><br>
<span><font color="#888888"></font></span></div>
<span><font color="#888888"></font></span></div>
<span><font color="#888888"></font></span></div>
<span><font color="#888888"></font></span></div>
<span><font color="#888888"></font></span></div>
<span><font color="#888888"></font></span></blockquote>
<span><font color="#888888"></font></span></div>
<span><font color="#888888"><br>
<br clear="all">
<span class="HOEnZb"><font color="#888888">
<div><br>
</div>
-- <br>
<div>Simone </div>
</font></span></font></span></div>
<span class="HOEnZb"><font color="#888888"></font></span></div>
<span class="HOEnZb"><font color="#888888"></font></span></div>
<span class="HOEnZb"><font color="#888888"></font></span></div>
<span class="HOEnZb"><font color="#888888"></font></span></div>
<span class="HOEnZb"><font color="#888888"></font></span></blockquote>
<span class="HOEnZb"><font color="#888888"></font></span></div>
<span class="HOEnZb"><font color="#888888"><br>
<br clear="all">
<div><br>
</div>
-- <br>
<div>Simone </div>
</font></span></div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div class="gmail_signature">Simone </div>
</div>
</div>
</div>
</div>
</body>
</html>