Discussion:
django models
NP
2018-09-27 17:24:50 UTC
Permalink
Hello ,

The database structure :

|------------------------------|
| Measure_1_Table |
|------------------------------|
/----| id |
| | count |
| |------------------------------|
|
|
|
|
|----------------------| | |----------------------------|
| Contexts | | | Measure_2_Table |
|----------------------| | |----------------------------|
| suite |---|----| id |
| measure | | percentage |
| measure_id | |----------------------------|
|----------------------|

*Tables with raw data:*

*Contexts*
suite measure measure_id
1 Measure_1_Table 1
1 Measure_2_Table 1
2 Measure_2_Table 1

*Measure_1_Table*

id count
1 10


*Measure_2_Table*

id percentage
1 20

My current database structure, table *Contexts *stores the measure table
name in the measure field and measure table record id in measure_id field.
Is there a way it can be handle in the Django?
--
You received this message because you are subscribed to the Google Groups "Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-rest-framework+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Mohit Sharma
2018-09-28 05:57:18 UTC
Permalink
Handle what ? If you mean if you can create the model in django then yes
you can.
Post by NP
Hello ,
|------------------------------|
| Measure_1_Table |
|------------------------------|
/----| id |
| | count |
| |------------------------------|
|
|
|
|
|----------------------| | |----------------------------|
| Contexts | | | Measure_2_Table |
|----------------------| | |----------------------------|
| suite |---|----| id |
| measure | | percentage |
| measure_id | |----------------------------|
|----------------------|
*Tables with raw data:*
*Contexts*
suite measure measure_id
1 Measure_1_Table 1
1 Measure_2_Table 1
2 Measure_2_Table 1
*Measure_1_Table*
id count
1 10
*Measure_2_Table*
id percentage
1 20
My current database structure, table *Contexts *stores the measure table
name in the measure field and measure table record id in measure_id field.
Is there a way it can be handle in the Django?
--
You received this message because you are subscribed to the Google Groups
"Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-rest-framework+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Walter scott
2018-09-28 06:44:01 UTC
Permalink
you mean Django Foreign key 
Post by Mohit Sharma
Handle what ? If you mean if you can create the model in django then yes
you can.
Post by NP
Hello ,
|------------------------------|
| Measure_1_Table |
|------------------------------|
/----| id |
| | count |
| |------------------------------|
|
|
|
|
|----------------------| | |----------------------------|
| Contexts | | | Measure_2_Table |
|----------------------| | |----------------------------|
| suite |---|----| id |
| measure | | percentage |
| measure_id | |----------------------------|
|----------------------|
*Tables with raw data:*
*Contexts*
suite measure measure_id
1 Measure_1_Table 1
1 Measure_2_Table 1
2 Measure_2_Table 1
*Measure_1_Table*
id count
1 10
*Measure_2_Table*
id percentage
1 20
My current database structure, table *Contexts *stores the measure table
name in the measure field and measure table record id in measure_id field.
Is there a way it can be handle in the Django?
--
You received this message because you are subscribed to the Google Groups
"Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-rest-framework+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...