This will help to catch error with form .
Also it is not correct to use this construction:
class SourceSelection(forms.Form):
sources = Sources.objects.all()
foo = forms.ChoiceField(choices=sources)
This mean that you never add any sources. or sources object are add
before starting application. For dynamic loading objects in the form
use form constructor.
and last one point :
Please separate views and form in the different files : views.py forms.py
2012/4/2 Barry Morrison <bdmor...@gmail.com>:
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/zXNmsoqAfdMJ.
> To post to this group, send email to django...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
1) prepare list of the links
2) ability to click at the link and receive some additional
information about link
3) button for deleting of the link
4) button for creating new one
Which are be covered :
class based view
generic view
passing values from view to form or template
If you are interested we can start. Also if you would like to add
some other areas let me know
Thanks,
Serge
2012/4/2 Barry Morrison <bdmor...@gmail.com>:
>> > django-users...@googlegroups.com.
>> > For more options, visit this group at
>> > http://groups.google.com/group/django-users?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/S3mhDHD8nu4J.
>
> To post to this group, send email to django...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users...@googlegroups.com.
>> > For more options, visit this group at
>> > http://groups.google.com/group/django-users?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/S3mhDHD8nu4J.
>
> To post to this group, send email to django...@googlegroups.com.
> To unsubscribe from this group, send email to
https://docs.djangoproject.com/en/dev/topics/class-based-views/
Sorting is added by adding next construction to the your class view:
class yourclassview(ListView):
"""
model = yourmodel
context_object_name = 'object_or_list'
template_name = 'yourtemplate.html'
def get_queryset(self):
qs = yourmodel.objects.all().order_by('sortingcriteria
return qs
2012/4/3 Barry Morrison <bdmor...@gmail.com>:
>> >> > django-users...@googlegroups.com.
>> >> > For more options, visit this group at
>> >> > http://groups.google.com/group/django-users?hl=en.
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups
>> > "Django users" group.
>> > To view this discussion on the web visit
>> > https://groups.google.com/d/msg/django-users/-/S3mhDHD8nu4J.
>> >
>> > To post to this group, send email to django...@googlegroups.com.
>> > To unsubscribe from this group, send email to
>> > django-users...@googlegroups.com.
>> > For more options, visit this group at
>> > http://groups.google.com/group/django-users?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/Tgz68neJN0AJ.
>
> To post to this group, send email to django...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users...@googlegroups.com.