Short answer
===========

Use the following instead:

cd <your_project_dir>
python manage.py syncdb


Long Answer
===========

The DJANGO_SETTINGS_MODULE variable is usually assigned the following
value: 'geonode.settings'. Since you are extending GeoNode with a new
project, the correct value is: yourproject.settings

You can set it up in the terminal, like:

export DJANGO_SETTINGS_MODULE=yourproject.settings

and then run the commands with django-admin.py.

The more common option, however is to use the provided shortcut called
manage.py in the root of your project, it will automatically pick up the
settings.py file next to it, for example:

python manage.py syncdb

In the geonode package we go one step further and create a command called
'geonode' in /usr/bin/ (or /usr/sbin) that activates the virtualenv and
calls:

django-admin.py (your parameters) --settings=geonode.settings

More detailed info can be found in the Django docs[1]


Happy hacking,
Ariel.

[1] https://docs.djangoproject.com/en/dev/ref/django-admin/



On Fri, Dec 16, 2011 at 11:42 AM, Giovanni Foiani <[email protected]> wrote:

> I followed all steps reported in the guide but the configuration does not
> work.
> When I run a *syncdb* command, DJANGO_SETTING_MODULE results not defined.
> Any help?
>
> Thanks
>
> Giovanni
> --
>
> Dott. Ing. Giovanni Foiani
>
> Cell:        +39-349-3577515
> Phone:    +39-0532-97-4106
> mail:        [email protected]
> CenTec - Via Guercino, 47 - 44042 Cento (FE)
>
>
>
> On Fri, Dec 16, 2011 at 3:31 PM, David Winslow <[email protected]>wrote:
>
>> updated the docs. Thanks Ben.
>>
>> --
>> David Winslow
>> OpenGeo - http://opengeo.org/
>>
>>
>> On Fri, Dec 16, 2011 at 6:40 AM, Giovanni Foiani <[email protected]> wrote:
>>
>>> Yes, I did it.
>>> It works.
>>>
>>> Thanks
>>>
>>> Giovanni
>>> --
>>>
>>> Dott. Ing. Giovanni Foiani
>>>
>>> Cell:        +39-349-3577515
>>> Phone:    +39-0532-97-4106
>>> mail:        [email protected]
>>> CenTec - Via Guercino, 47 - 44042 Cento (FE)
>>>
>>>
>>>
>>> On Fri, Dec 16, 2011 at 12:35 PM, Ben <[email protected]> wrote:
>>>
>>>> try:
>>>>
>>>> source /var/lib/geonode/bin/activate
>>>>
>>>> Ben
>>>>
>>>> On Dec 16, 2011, at 10:20 AM, Giovanni Foiani wrote:
>>>>
>>>> Hi,
>>>>
>>>> this is my first post on Geonode Mailing List.
>>>> I'm new to Geonode, I installed it on Ubuntu Server 10.04 using GeoNode
>>>> PPA repository and it's working great.
>>>> Now I'm trying to extend Geonode following the "Best 
>>>> Practises"<http://docs.geonode.org/en/latest/developers/extend.html>,
>>>> in order to add some editing features.
>>>> I can't run the following command on my machine:
>>>>
>>>> *source /var/www/geonode/wsgi/geonode/bin/activate*
>>>>
>>>> (No such file or directory error given)
>>>> Can some one help me or give me some hints?
>>>>
>>>> Thanks
>>>>
>>>> Giovanni
>>>>
>>>> --
>>>>
>>>> Dott. Ing. Giovanni Foiani
>>>>
>>>> Cell:        +39-349-3577515
>>>> Phone:    +39-0532-97-4106
>>>> mail:        [email protected]
>>>> CenTec - Via Guercino, 47 - 44042 Cento (FE)
>>>>
>>>>
>>>>
>>>
>>
>

Reply via email to