Re: user created variables

2010-09-14 Thread nick.l...@gmail.com
cool glad to help! :) On Tue, Sep 14, 2010 at 12:13 AM, pixelcowboy wrote: > I see what you are saying, thanks for the advice! > > On Sep 13, 12:10 pm, "nick.l...@gmail.com" > wrote: > > The problem I see with creating a model for each data type is that you > have > > LOTS of clutter in the admi

Re: user created variables

2010-09-13 Thread pixelcowboy
I see what you are saying, thanks for the advice! On Sep 13, 12:10 pm, "nick.l...@gmail.com" wrote: > The problem I see with creating a model for each data type is that you have > LOTS of clutter in the admin...and what happens if you want to change the > value from a string to an int? You'd have

Re: user created variables

2010-09-13 Thread nick.l...@gmail.com
The problem I see with creating a model for each data type is that you have LOTS of clutter in the admin...and what happens if you want to change the value from a string to an int? You'd have to delete it one, then recreate it in another...just a lot of steps. Also it means more models to maintain.

Re: user created variables

2010-09-13 Thread pixelcowboy
Yes, it totally does! Thanks again for your help. Another work around might be just creating different models for each data type that I want to validate, as in your first example maybe... but create a different model for each different data type possibility? What do you about this approach? On Sep

Re: user created variables

2010-09-13 Thread nick.l...@gmail.com
hmm ok I'm thinking out loud here :) So you want your users to have the ability to create env variables through the Django admin. You also want these variables to be validated (ie you don't want people to put 123 in a char var). I still see this solution as being at least a starting ground. You w

Re: user created variables

2010-09-13 Thread pixelcowboy
The only reason I dont share the information is that I dont want to bore you to death. The application will need to provide (via a database) per project environment variables for use in external client applications. However, those variables might, or might not change from project to project. The o

Re: user created variables

2010-09-13 Thread nick.l...@gmail.com
That's fine...well for data types ad a field for types say an integer field and when youcome across a new type you need just increment your integer count by one... ie: STRING = 1 INT = 2 CHAR = 3 TYPE_CHOICES = ( (STRING, 'string'), (INT, 'integer'), (CHAR, 'character'), ) Then add the field to

Re: user created variables

2010-09-12 Thread pixelcowboy
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 appl

Re: user created variables

2010-09-12 Thread nick.l...@gmail.com
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 tr