Hi Alessandro, How your searches are going so far? Have you found something interresting with Dynamic-Models such Django-Mutant? I am exactly looking for the same thing you mentioned in this post, a solution that will allow Django ORM to manipulate uploaded shapefiles. So far, I have found a generic way as Andres Reyes Monge was talking about but I would prefer a table per shapefile also.
I was thinking about giving a try to django-mutant, so I would like to know if it works for you. Other idea I have is to use ogrinspect to update a models.py on every upload/delete of a shapefile maybe combining with a queue like Celery. I am not sure neither about this avenue. Please give me a little feedback about this topic! Max Demars On Tuesday, January 31, 2012 10:15:44 AM UTC-5, Alessandro Candini wrote: > > Hi list. > I need to create an app in which the user can upload a shapefile, which > must be stored in a database table with LayerMapping from > django.contrib.gis.utils, as explained here: > > https://docs.djangoproject.com/en/dev/ref/contrib/gis/tutorial/#layermapping > > The problem is that I need to update dynamically my models.py with a new > model and add a table for every shape inserted by the user, without > using syncdb. > > Trying to document myself about this topic, I encountered a lot of > interesting extensions like south, django-eav and django-mutant for > example. > (An interesting discussion here: > > http://stackoverflow.com/questions/7933596/django-dynamic-model-fields/7934577#7934577 > ) > > But I'm very confused about what could be the best solution for my needs. > > Has anybody experience with this kind of tools? > > Thanks in advance. > > Alessandro > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.