[Nodeshot] Circular Import Problem in Building Nodeshot in AWS

Nemesis nemesis at ninux.org
Tue Nov 3 10:28:37 CET 2015


Hey Hui,

On 11/03/2015 02:22 AM, Hui Yu wrote:
> Thank you and I think this should be taken as a misconfiguration...
> this is what I did.
>
> 1) Environment:
> - server: Amazon Linux AMI release 2015.03
> - database: RDS (PostgreSQL 9.4.1)
>
> I created a schema scm_nodeshot01, owned by nodeshot01in database for
> Nodeshot and postgis, hstore extension are installed in public schema
> which is in nodeshot01"s search path.
>
> ebdb=> \dx
... cut ....
>
> And finally after checking all related code and noticed the postgis
> string required in ENGINE setting, the database setting was modified to:
>
> DATABASES = {
>     'default': {
>         #'ENGINE': 'django.db.backends.postgresql_psycopg2',
>         'ENGINE': 'django.contrib.gis.db.backends.postgis',
>         'NAME': 'ebdb',
>         'USER': 'nodeshot01',
>         'PASSWORD': 'nodeshot01',
>         'HOST':
> 'aaxi0iow5gnqku.c0hl0qo72yk0.ap-northeast-1.rds.amazonaws.com',
>         'PORT': '',
>     },
>
> Then all worked as below:
>
> *(nodeshot)[ec2-user at ip-172-31-12-8 dev]$ python manage.py migrate
> --noinput --no-initial-data*
... cut ....
> (nodeshot)[ec2-user at ip-172-31-12-8 dev]$ Performing system checks...
>
> System check identified no issues (0 silenced).
> November 02, 2015 - 17:14:24
> Django version 1.8.4, using settings 'dev.settings'
> Starting development server at http://0.0.0.0:8000/
> Quit the server with CONTROL-C.

Sorry, yesterday evening I misread your email.

So the problem is that you were using
'django.db.backends.postgresql_psycopg2' instead of
'django.contrib.gis.db.backends.postgis'?

Did you set that manually?
Nodeshot has a command that automatically creates a django projects with
the right default settings:

nodeshot startproject <name>

If you follow the docs you won't bump into these problems, see
http://docs.nodeshot.org/en/latest/topics/install_production_manual.html#install-python-packages

Best regards
Federico
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ml.ninux.org/pipermail/nodeshot/attachments/20151103/bff41278/attachment-0001.html>


More information about the Nodeshot mailing list