Should have noted that you need to create the new_local_settings.py as
an exact copy of the existing local_settings.py and modify the
database params to point to the postgres DB.

Jeff

On Thu, Mar 17, 2011 at 10:16 AM, Jeff Johnson <[email protected]> wrote:
> Yep, I just did this the other day on the demo server ... Get your
> database setup and working, use the django management command to dump
> and load the data into the other database and off you go.
>
> http://docs.djangoproject.com/en/dev/ref/django-admin/
>
> dumpdata and loaddata are the 2 commands.
>
> The exact sequence is like this. I used 2 local settings files and
> specified which one to use on the command line
>
> 1) Stand up new DB (install postgres, postgis etc)
> 2) Create the DB user and DB
> 3) Activate virtualenv
> 4) django-admin.py syncdb --settings=new_local_settings.py
> 5) django-admin.py dumpdata --settings=local_settings.py > geonode_data.json
> 6) django-admin.py loaddata geonode_data.json --settings=new_local_settings.py
> 7) mv local_settings.py local_settings_bkup.py
> 8) mv new_local_settings.py local_settings.py
> 9) restart apache to pick up the changes
>
> I did run into some issues with the fixtures not being generated in
> the right sequence, so received errors about trying to add layers with
> an non-existent owner. Basically had to do the dump/load data with the
> users first and then with the rest of the DB.
>
> Lemme know if that works for you.
>
> Jeff
>
> On Thu, Mar 17, 2011 at 9:57 AM, Jude Mwenda <[email protected]> wrote:
>> Any clue on migrating including data from sqlite to postgis?
>>
>> 2011/3/17 Jeff Johnson <[email protected]>
>>>
>>> It seems like it may be easier to use PostGIS for this? I've never had
>>> much luck with spatialite and GeoDjango, but its been a while since I
>>> have tried, and I think its become easier, but your issue indicates
>>> maybe not?
>>>
>>> Jeff
>>>
>>> On Thu, Mar 17, 2011 at 4:54 AM, Jude Mwenda <[email protected]> wrote:
>>> > Hi,
>>> > I would like to use some of geodjango's functions on my intance. On
>>> > adding
>>> > at the installed apps 'django.contrib.gis' i get the error
>>> > Only versions of pysqlite 2.5+ are compatible with SpatiaLite and
>>> > GeoDjango.
>>> > Any pointers on how to upgrade pysqlite to 2.5+? or is there an
>>> > alternative
>>> > to doing geometry functions saved on the sqlite database? such as
>>> > extent()
>>> > Regards
>>
>>
>

Reply via email to