On 16 déc, 10:26, JF Simon wrote:
> thanks dude.
>
> any idea to split the dict on the _ char ?
> recursive function ?
Probably not the most elegant solution, but it should do the trick:
def add_to_context(self, context, field):
current = context
parts = field.name.split('
On 16 déc, 07:53, JF Simon wrote:
> Hello, i'm new with python (and french so my english may seem very
> poor, sorry about that).
> I would like to list a model's fields and return a dict, here is the
> example :
>
> I have a model class with :
>
> meta_title : CharField(...)
> meta_description :
thanks dude.
any idea to split the dict on the _ char ?
recursive function ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To
On Dec 16, 6:53 am, JF Simon wrote:
> Hello, i'm new with python (and french so my english may seem very
> poor, sorry about that).
> I would like to list a model's fields and return a dict, here is the
> example :
>
> I have a model class with :
>
> meta_title : CharField(...)
> meta_description
Hello, i'm new with python (and french so my english may seem very
poor, sorry about that).
I would like to list a model's fields and return a dict, here is the
example :
I have a model class with :
meta_title : CharField(...)
meta_description : CharField(...)
body_header_title : CharField(...)
5 matches
Mail list logo