Re: Nested dictionaries

2019-07-01 Thread Derek
I am not sure I understand what you mean by " write the models to work with the serializers". A model is there primarily for data storage and its possible to store JSON in a field of such a model. Any "business logic" for the model is just Python and can carry out, for example, processing ope

Re: Nested dictionaries

2019-06-30 Thread Joe Reitman
I use the JSON module to encode and decode JSON. On Sunday, June 30, 2019 at 9:26:04 AM UTC-5, David Elphee wrote: > > I guess I don’t even need Django or models to do what I described. But > yes, for future functionality, I’d like to be able to store JSON to a > database. > -- You received

Re: Nested dictionaries

2019-06-30 Thread 'David Elphee' via Django users
I guess I don’t even need Django or models to do what I described. But yes, for future functionality, I’d like to be able to store JSON to a database. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop rece

Re: Nested dictionaries

2019-06-30 Thread 'David Elphee' via Django users
*JSON -- 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+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.c

Re: Nested dictionaries

2019-06-30 Thread 'David Elphee' via Django users
I guess I don’t even need Django or models to do what I described. But yes, for future functionality, I’d like to be able to store Jain to a database. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop rece

Re: Nested dictionaries

2019-06-30 Thread Joe Reitman
You want to save JSON data to a database? On Saturday, June 29, 2019 at 8:47:38 PM UTC-5, David Elphee wrote: > > Hello, > I am new at django and in over my head I think. I am trying to create a > kind of shim that will accept JSON from a webhook POST, work with the data > using Python, and the

Re: Nested Dictionaries in Django Templates

2008-06-19 Thread phillc
you are implementing logic into the templates, which django templating attempts to prevent. On Jun 17, 12:27 pm, Keybo <[EMAIL PROTECTED]> wrote: > Hello, >        I have a question regarding displaying information in django > templates. I would like to display a nested dictionary(Hash) in the >

Re: nested dictionaries in templates

2007-05-19 Thread Sven Herzing
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Aidas, thx for the fast help. I hope i get better with django soon, that I can help others too. greets Sven Aidas Bendoraitis wrote: > Hi Sven! > > To get a value from a dictionary by a variable key, you either need a > custom filter like {{ di

Re: nested dictionaries in templates

2007-05-17 Thread Aidas Bendoraitis
Hi Sven! To get a value from a dictionary by a variable key, you either need a custom filter like {{ dictionary|dict_value:key }} def dict_value(dict, key): """ returns the value of a dictionary key ... """ try: return dict[key] except: return None register.filte