Tuesday, August 9, 2011

Re: Trying to simplify the last post

On Tuesday, 9 August 2011 12:09:08 UTC+1, vanderkerkoff wrote:
Hello there

I'm trying to make this as easy as possible, but it's pretty
complicated.

Here's my form

<snip>
 
As you can see I've hard coded the id of the event into this section

data = Workshop.objects.filter(evt_workshop='80')

If I could pass the request object into the form, or the event ID
itself,I could get at the right data for the workshop_choices list.


So why not do this? What's stopping you?


I can't read the rest of the code, because of the lack of indentation. I would say, though, that you're doing a lot of HTML manipulation in the view - that sort of thing is best done in a template.
--
DR.

--
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/-/jsHHjFj7DtsJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate