Of course! But what about different field types? How would you pair the variable name with the variable value for multiple types in the same class? Or would you need a separate model class for each different value type? example integers, strings, etc
Sorry for the lack of information, but my application structure requires that users are able to add arbitrary variables to a model.Thanks for your help! On Sep 12, 8:24 pm, "nick.l...@gmail.com" <nick.l...@gmail.com> wrote: > without knowing any context of what you want...or are going to do...I would > say create a similar model and run with it: > > class UserVariables(models.Model): > variable_name = models.CharField(max_length=100) > variable_value = models.TextField() > > THOUGH like I said, I have no idea what you're trying to do or why...but > this is by far the simplest way :) > > n > > On Sun, Sep 12, 2010 at 9:42 PM, pixelcowboy <pixelcowbo...@gmail.com>wrote: > > > What would be the best way to enable a user to create arbitrary > > variables through the django admin? This could be either numbers, text > > or paths to files. Thanks for your advice! > > > -- > > You received this message because you are subscribed to the Google Groups > > "Django users" group. > > To post to this group, send email to django-us...@googlegroups.com. > > To unsubscribe from this group, send email to > > django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@google > > groups.com> > > . > > For more options, visit this group at > >http://groups.google.com/group/django-users?hl=en. > > -- > Guadajuko! Vamos a correr! > -"Cool! we are going to run!" -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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.