[GeoNode-users] Geonode account registrations don't work
Simone Dalmasso
simone.dalmasso at gmail.com
Sun Mar 12 23:55:50 PDT 2017
Thanks for your feedback. It is not enabled by default because it requires
the email backend and adds some overhead. But in the geonode master branch
has been completely refactored and will probably be enabled by default in
future.
2017-03-11 10:50 GMT+01:00 Adam Lawrence <alaw005 at gmail.com>:
> Hi again thank you for the help. I ended up using a bit of a hack (I
> think), the syncdb error message showed me where to look for the source
> files so I changed the settings there. The following are my documented
> instructions, in case they are of use to anyone. Is there a reason why the
> notifications app is not enabled by default? I wonder because would be so
> much easier if it was - is it a performance issue for those that don't need
> it?
>
> #. Configure email server and user registration
>
> Open config file::
>
> sudo nano /etc/geonode/local_settings.py
>
> Locate the following email and user registration settings and update
> to your requirements (uncomment relevant settings). NB: If you are using
> gmail to send emails then you will need to update gmail settings to allow
> less secure connections (otherwise emails will be blocked).
>
> #REGISTRATION_OPEN = False
> #ACCOUNT_APPROVAL_REQUIRED = False
>
> #ACCOUNT_EMAIL_CONFIRMATION_EMAIL = False
> #ACCOUNT_EMAIL_CONFIRMATION_REQUIRED = False
>
> ...
>
> # Uncomment the following to receive emails whenever there are
> errors in GeoNode
> # or to be notified of new user requests when
> ACCOUNT_APPROVAL_REQUIRED has been set.
> #ADMINS = (
> # ('John', 'john at example.com'),
> # )
>
> # Uncomment the following to use a Gmail account as the email
> backend
> #EMAIL_USE_TLS = True
> #EMAIL_HOST = 'smtp.gmail.com'
> #EMAIL_HOST_USER = 'youremail at gmail.com'
> #EMAIL_HOST_PASSWORD = 'yourpassword'
> #EMAIL_PORT = 587
>
> Active the ``notification`` app in django. This is required because the
> app is not installed by default (commented out in source code). You will
> need to edit the following file (this is a hack, as should only be changing
> the local_settings.py file)::
>
> sudo nano /usr/local/lib/python2.7/dist-packages/geonode/settings.py
> Locate the line ``#'notifications',`` and uncomment so becomes
> ``'notifications',``
>
> INSTALLED_APPS = (
> ...
> #'notification',
> ...
> ) + GEONODE_APPS
>
> Then apply the settings as follows:
>
> sudo geonode syncdb
> sudo service apache2 restart
>
>
>
>
> On 11 March 2017 at 20:42, Simone Dalmasso <simone.dalmasso at gmail.com>
> wrote:
>
>> I see I might be a circular import issue. I haven't actually tried it :)
>> usually this type of customization is done through a Geonode project.
>>
>> So then copy again all installed apps. And also the geonode apps and
>> uncomment notification.
>>
>> Il giorno ven 10 mar 2017 alle 23:23 Adam Lawrence <alaw005 at gmail.com>
>> ha scritto:
>>
>>> Hi,
>>>
>>> Thank you and I like that solution better! Only problem is I still get
>>> an 500 error, and when I tried syncdb I get the following error:
>>>
>>> $ sudo geonode syncdb
>>> Traceback (most recent call last):
>>> File "/usr/bin/django-admin.py", line 5, in <module>
>>> management.execute_from_command_line()
>>> File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py",
>>> line 399, in execute_from_command_line
>>> utility.execute()
>>> File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py",
>>> line 392, in execute
>>> self.fetch_command(subcommand).run_from_argv(self.argv)
>>> File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py",
>>> line 261, in fetch_command
>>> commands = get_commands()
>>> File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py",
>>> line 107, in get_commands
>>> apps = settings.INSTALLED_APPS
>>> File "/usr/lib/python2.7/dist-packages/django/conf/__init__.py", line
>>> 54, in __getattr__
>>> self._setup(name)
>>> File "/usr/lib/python2.7/dist-packages/django/conf/__init__.py", line
>>> 49, in _setup
>>> self._wrapped = Settings(settings_module)
>>> File "/usr/lib/python2.7/dist-packages/django/conf/__init__.py", line
>>> 128, in __init__
>>> mod = importlib.import_module(self.SETTINGS_MODULE)
>>> File "/usr/lib/python2.7/dist-packages/django/utils/importlib.py",
>>> line 40, in import_module
>>> __import__(name)
>>> File "/usr/local/lib/python2.7/dist-packages/geonode/settings.py",
>>> line 871, in <module>
>>> from local_settings import * # noqa
>>> File "/usr/local/lib/python2.7/dist-packages/geonode/local_settings.py",
>>> line 110, in <module>
>>> INSTALLED_APPS = geonode.settings.INSTALLED_APPS + ('notification',)
>>> AttributeError: 'module' object has no attribute 'settings'
>>>
>>>
>>>
>>>
>>> On 11 March 2017 at 00:45, Simone Dalmasso <simone.dalmasso at gmail.com>
>>> wrote:
>>>
>>> oh right I forgot the geonode apps. Ok discard the previous and try with
>>> this one
>>>
>>> INSTALLED_APPS = geonode.settings.INSTALLED_APPS + ('notification',)
>>>
>>> 2017-03-10 12:37 GMT+01:00 Adam Lawrence <alaw005 at gmail.com>:
>>>
>>>
>>>
>>> On 11 March 2017 at 00:16, Adam Lawrence <alaw005 at gmail.com> wrote:
>>>
>>> Thank you, but unfortunately it still doesn't work. I have pasted the
>>> following into my local_sttings.py from https://github.com/GeoNod
>>> e/geonode/blob/master/geonode/settings.py but I now get a server error
>>> 500 code on all pages. I did a sudo service apache2 restart after the
>>> change but do I also need to restart something else?
>>>
>>> INSTALLED_APPS = (
>>> 'modeltranslation',
>>> # Boostrap admin theme
>>> # 'django_admin_bootstrapped.bootstrap3',
>>> # 'django_admin_bootstrapped',
>>> # Apps bundled with Django
>>> 'django.contrib.auth',
>>> 'django.contrib.contenttypes',
>>> 'django.contrib.sessions',
>>> 'django.contrib.sites',
>>> 'django.contrib.admin',
>>> 'django.contrib.sitemaps',
>>> 'django.contrib.staticfiles',
>>> 'django.contrib.messages',
>>> 'django.contrib.humanize',
>>> 'django.contrib.gis',
>>> # Third party apps
>>> # Utility
>>> 'pagination',
>>> 'taggit',
>>> 'treebeard',
>>> 'friendlytagloader',
>>> 'geoexplorer',
>>> 'leaflet',
>>> 'django_extensions',
>>> #'geonode-client',
>>> # 'haystack',
>>> 'autocomplete_light',
>>> 'mptt',
>>> # 'modeltranslation',
>>> 'djcelery',
>>> 'storages',
>>> 'floppyforms',
>>> # Theme
>>> "pinax_theme_bootstrap_account",
>>> "pinax_theme_bootstrap",
>>> 'django_forms_bootstrap',
>>> # Social
>>> 'account',
>>> 'avatar',
>>> 'dialogos',
>>> 'agon_ratings',
>>> # 'notification',
>>> 'announcements',
>>> 'actstream',
>>> 'user_messages',
>>> 'tastypie',
>>> 'polymorphic',
>>> 'guardian',
>>> 'oauth2_provider',
>>> ) + GEONODE_APPS
>>>
>>>
>>> On 11 March 2017 at 00:01, Simone Dalmasso <simone.dalmasso at gmail.com>
>>> wrote:
>>>
>>> The easiest way is to copy the installed apps block from the default
>>> settings, see in github, and copy in your /etc/geonode/local_settings.py
>>> uncommenting notifications.
>>>
>>> Il giorno ven 10 mar 2017 alle 11:36 Adam Lawrence <alaw005 at gmail.com>
>>> ha scritto:
>>>
>>> Hi, thank you for the advice. Can you please advise how to access the
>>> installed apps settings if I've used the PPA install method or is that not
>>> possible?
>>>
>>>
>>> On 10 March 2017 at 21:55, Simone Dalmasso <simone.dalmasso at gmail.com>
>>> wrote:
>>>
>>> Hi, you have to also uncomment "notifications" in the settings installed
>>> apps. then run syncdb. If that is missing from the doc then we need to fix
>>> it.
>>>
>>> 2017-03-10 5:09 GMT+01:00 Adam Lawrence <alaw005 at gmail.com>:
>>>
>>> Hi,
>>>
>>> --
>> Simone
>>
>
>
--
Simone
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20170313/90d2cdfc/attachment-0001.html>
More information about the geonode-users
mailing list