Database design

37 views
Skip to first unread message

Prashanth Patelc

unread,
Jan 23, 2022, 3:58:21 AM1/23/22
to django...@googlegroups.com
Dear Django users,

I need some information regarding Django models, I would like to know is there any way to 
create Django models through frontend or can we create models by super admin. Kindly share any tutorials or any examples available.

Example:
we are create models in django
like below fields 
===================
class modelname(models.Model):
       id = models.PrimeryKey(auto_now_add=true)
       name =models.CharField()
       salary =models.DecimalField()

But my concern is create model name and fields like in html or super admin can do

===================
=> he will enter values in variables with appropriate field type.
 for eg., "name char type", "Salary decimal field" and so on..
=>When the user enter data into application it should directly store in database in the form of tables and rows..

Regards;
Prashanth

Madhusudhan Reddy

unread,
Jan 23, 2022, 7:37:55 AM1/23/22
to django...@googlegroups.com
Ohh you want create custom fields in forms


Take input, select, textarea tags, make them their own fields but save all of these in fields in one table with types and max values all of the attributes of tags 


Finally show then what they chosen 

--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAMCU6Co2CysGZ_ZHrFW5XJEregFhR6pdZS3i%2BJkLvVsvBqnUOQ%40mail.gmail.com.

Derek

unread,
Jan 24, 2022, 2:11:32 AM1/24/22
to Django users
The best approach is for the Django/DB devs to create these fields (and forms) in advance for the users to enter data.

If you want users to add "key/pair" type data which is not known in advance, look to adding a JSON column to your table; see:
Reply all
Reply to author
Forward
0 new messages