Django 'is' a framework, therefore you have the flexibility to create your
context as you see fit. You could call an external API, query your
database, obtain results from ElasticSearch, parse another webpage, or
anything that suits the needs of your particular project.

It completely depends on the domain and scope of your project.

On Wed, Feb 24, 2016 at 5:19 PM, Malik Rumi <malik.a.r...@gmail.com> wrote:

> 1. is { 5:five, 6:six} and {4:four) two dictionaries, or three?
>
> 2. Suppose I had a really long, or large, context, where the key is one of
> the 50 states and the value is the date of their admission to the Union (of
> the United States, of course). If that doesn't work, make it nations and
> the date they joined the UN. Is there a way to automate the creation of
> such a complex, or long, context? Yes, of course the data will be wildly
> different depending on the needs of the site, but is there some common
> 'framework' for doing so? Do people do it by hand, come up with some
> function that gets x from A and put it into {} as value 1, and then goes
> back and pick up some other context data, maybe from a different table, so
> it isn't a simple for loop? Or should I just use dict()?
>
> On Tue, Feb 23, 2016 at 9:43 AM, Andreas Kuhne <andreas.ku...@suitopia.com
> > wrote:
>
>> True, didn't know that it was active in that way nowadays. To Malik:
>> Don't use user as a key in the dictionary.
>>
>> Regards,
>>
>> Andréas
>>
>> 2016-02-23 16:01 GMT+01:00 <jorrit...@gmail.com>:
>>
>>> Wouldn't including the name 'user' in your context dictionary override
>>> the authenticated user object in your template? Might make for some
>>> unexpected behavior.
>>>
>>> --
>>> 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.com.
>>> Visit this group at https://groups.google.com/group/django-users.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/5e3a7134-d7a6-4385-863f-c25437922127%40googlegroups.com
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Django users" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/django-users/1tVDUBrPRLQ/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> django-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CALXYUbnOJ%2B9HXFePmnrRCbLo4wokVsh5cz%2BaMaHvMQnEWhx9OQ%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CALXYUbnOJ%2B9HXFePmnrRCbLo4wokVsh5cz%2BaMaHvMQnEWhx9OQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> 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.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAKd6oBwT6NWT%2BE%3DVa5N9JhTzPKCmu5YVnbKb1ukibrz%3Diq7%2Bfw%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAKd6oBwT6NWT%2BE%3DVa5N9JhTzPKCmu5YVnbKb1ukibrz%3Diq7%2Bfw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CALn3ei2STVHGMB_ZhDotH_ntdBVacnsA92VT%3DBZVK8T3uhp26g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to