Hi Mark,

There are some projects that aim to reduce friction in this process. I
recommend that you take a look at django-south.

It can handle all of that plus some other interesting things, using
administration commands.

On Thu, May 10, 2012 at 12:28 PM, Mark Phillips
<m...@phillipsmarketing.biz>wrote:

> I am new to django, and I was wondering what are the best practices for
> making changes to the data model? These are some scenarios, and I would
> appreciate feedback on my approach
>
> 1. Adding new class to models.py - run syncdb, and the new tables will be
> loaded
>
> 2. Add fields to existing class - drop the tables in the database (or drop
> the database) and run syncdb. The downside is the loss of all the test
> data. Perhaps use dumpdata, edit by hand to add the new fields, and then
> use loaddata?
>
> 3. Add methods to existing class - same as #2 because they are not picked
> up with syncdb?
>
> Are there better ways to handle these scenarios?
>
> Thanks,
>
> Mark
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>



-- 
George R. C. Silva

Desenvolvimento em GIS
http://geoprocessamento.net
http://blog.geoprocessamento.net

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to