You could easily convert mappings to JSON and store it in a model like:
Class VerboseNameMaps(models.Model):When you wish to use the same, you could:
map_obj = VerboseNameMaps.objects.get(user=request.user)
mapping = json.loads(map_obj.map)
# Now you can use getattr() along with mapping as in my earlier mail
You can create a forms or interfaces for user to Create, Read, Update and Delete (CRUD) these maps, so user need not write python files.
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+unsubscribe@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.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CABSvzZDPeTMxwRAtfP7mMn%2B2PLgumhopDUdEz_-swETVS4Z96A%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment