I am trying to understand this code. Can someone explain where the
current_org came from

code taken from stackoverflow
<https://stackoverflow.com/questions/8389880/django-select-option-in-template>

{% for org in organisation %}
   <option value="{{org.id}}"
       {% if org == current_org %}selected="selected"{% endif %}>
       {{org.name|capfirst}}
   </option>{% endfor %}



cheers


On Wed, Sep 13, 2017 at 12:14 PM, ADEWALE ADISA <solixzsys...@gmail.com>
wrote:

> you can make it interesting by using ajax to post the selected month to
> your view which u ve already written to accept the month variable. use the
> variable to filter the necessary queryset in your view, then return the
> response in json format. you can now collect it from your ajax response,
> use javascript to dynamically update your table.
> On Sep 13, 2017 12:43 AM, "sum abiut" <suab...@gmail.com> wrote:
>
>> Hi,
>> I am working on an app which has a dropdown/select option which contain
>> months of the year. What i want to accomplished is when the user click on
>> the drop down and select a particular  month of the year the app should
>> display a table filter by that particular   selected month.
>>
>>
>> Please point me to the right direction to get me started.
>>
>> cheer
>>
>> --
>> 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/ms
>> gid/django-users/CAPCf-y5JQoekZfW%3DymeNJHyXQj6ExJHweENW2gAf
>> QiBhnXg6%3DA%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAPCf-y5JQoekZfW%3DymeNJHyXQj6ExJHweENW2gAfQiBhnXg6%3DA%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/CAMGzuy_crJPMm%2Bh8DyhGHAc5AqtseM6e5PMp55BYyb
> fP1X7L6w%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAMGzuy_crJPMm%2Bh8DyhGHAc5AqtseM6e5PMp55BYybfP1X7L6w%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/CAPCf-y7KrVdJ4kYXrjq7d6ofGnvOw9s-RakqymDOJe4n%2BQsR0g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to