python - Letting users to choose what type of content they want to input -


this first post here, , i'd describe want specific possible.

i'd make model 'selectable.'

for example,

class simplemodel(models.model):
property = models.charfield(max_length=255)
value = generalfield()

generalfield can "charfield", "urlfield", "textfield" user can select appropriate input type specific property.

i'm kinda thinking of similar wordpress's custom_field.

my initial thought making textfield , tweak input interface depends on user's selection, it's bit tricky , if involves file uploading functionality, it's gonna complicated.

of course, googled lot. if have thoughts on this, please give me tip :)

thanx in advance

how creating separate model each type of field want support, , model consisting of list of (table_name, entry_id) pairs, customized use combination of fields?


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -