Is this a new or a update from the front end ?
If new :
1 Extract json using : data = json.load( request.POST['json'] -
this converts data to a dictionary (assuming that the json is in the
'json' field in the message.
2 Validate as necessary
3 Create instance : instance = Patien
For updating multiple models at the same time, Should we create multiple
instances?
On Sat, Jun 2, 2018 at 6:19 PM, 'Anthony Flury' via Django users <
django-users@googlegroups.com> wrote:
> Is this a new or a update from the front end ?
>
> If new :
> 1 Extract json using : data = json.load
On zaterdag 2 juni 2018 15:12:08 CEST Albin Antony wrote:
> For updating multiple models at the same time, Should we create multiple
> instances?
Multiple models (Patient and Medication) or multiple instances of the same
model (more than one Patient)?
The later can be done with a single manager
Can the first be done if there is a relation between the models?
On Sat, Jun 2, 2018 at 7:49 PM, Melvyn Sopacua
wrote:
> On zaterdag 2 juni 2018 15:12:08 CEST Albin Antony wrote:
> > For updating multiple models at the same time, Should we create multiple
> > instances?
>
> Multiple models (Pat
Is this a new or a update from the front end ?
If new :
1 Extract json using : data = json.load( request.POST['json'] -
this converts data to a dictionary (assuming that the json is in the
'json' field in the message.
2 Validate as necessary
3 Create instance : instance = Patien
I'd like to instantiate a model, and play around with it, but ensure it's
never saved. At bare minimum instantiate it, play around with it then
delete it, but ideally disable saving somehow. I imagine I can override
save() on the instance, but am wondering if anyone has experience doing
this or
Hey Bernd,
I'm curious about your use case. It's common to create a read-only database
user to make sure no data is modified, but I've never come across anything
at the instance/row level.
-Jimmy
On Sat, Jun 2, 2018, 8:14 PM Bernd Wechner wrote:
> I'd like to instantiate a model, and play arou
On Sat, Jun 2, 2018, 6:14 PM Bernd Wechner wrote:
> I'd like to instantiate a model, and play around with it, but ensure it's
> never saved. At bare minimum instantiate it, play around with it then
> delete it, but ideally disable saving somehow. I imagine I can override
> save() on the instance,
8 matches
Mail list logo