Validating dynamically generated forms

2007-05-09 Thread Laundro
else: form = FormClass() # render it all to a template Upon entering (correct) data, the form validation throws error: supposedly the fields are empty. What am I doing wrong here? Many thanks in advance, Laundro --~--~-~--~~~---~--~~ You received this message beca

Re: Multiple Components on One Page

2006-09-19 Thread Laundro
Well worded. I've been wanting to solve exactly this kind of problem as well. I feel like there's something we're not "getting". A simple example in my case is a login form and a search form. Both come from different views, but up till now I haven't found a way of integrating them both in one pag

Re: Multiple Components on One Page

2006-09-19 Thread Laundro
I have re-read the template documentation with Malcolm's answer in mind, and it all makes a lot more sense now. Im 'ooh-aah'-ing at Django more and more each day. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Dj

Passing context information through a HttpResponseRedirect

2006-09-20 Thread Laundro
Hi, I would like to have a part of my webpage reserved for login information (a login form, and if a user has logged in succesfully, some information & options). Now, the login form is in the base.html template. base.html checks whether user info is known (by looking at session variables), if th

Re: Passing context information through a HttpResponseRedirect

2006-09-25 Thread Laundro
I fixed the problem by having each view pass context, request and template data to a Main() view. def Main(request, context, template): # Main does what it has to do with the request information (login info, search strings, session vars...) return render_to_response(context, template) (This is f

Re: Login crazyness...

2006-09-25 Thread Laundro
Be sure to always pass the request information from one view to another. The request object holds session information and the user object (amongst others). --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django use

Re: How to join 2 QuerySets? (with QuerySet object in result)

2006-10-03 Thread Laundro
I'm at work now, but have a look at Q(). --~--~-~--~~~---~--~~ 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 unsubscribe from this group, send

Re: What IDE do you use? (semi-OT)

2006-10-09 Thread Laundro
Another vote for PyScripter if you're working in Windows. I still have to work out how to integrate the integrated command line interface with Django (so that it equals manage.py runshell in functionality). --~--~-~--~~~---~--~~ You received this message because y

www.nearlyfreespeech.net / Anyone tried Django there yet?

2006-10-21 Thread Laundro
Hi, Just a quick question: has anyone tried to start a Django-powered website at this hoster (www.nearlyfreespeech.net) yet? If so, any comments? Thanks in advance, Mathieu --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: Chain filters on ManyToManyField

2006-08-14 Thread Laundro
I'm working from the top of my head here (I'm at work), but wouldn't ANDing two Q's be a solution? I remember having constructed a QuerySet of two Q's &'ed together, as in qs = (Q() & Q()), and then evaluating qs. --~--~-~--~~~---~--~~ You received this message be

Re: imbricated tags

2006-08-14 Thread Laundro
The French word "imbriqué" means embedded :) --~--~-~--~~~---~--~~ 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 unsubscribe from this group, s

Re: Confused on Where to Put SQL

2006-08-24 Thread Laundro
Do you really need to perform hundreds of SQL queries? Wouldn't it be a lot easier to load all of the data you need into an object, perform your magic on it and then write it all back to the database? --~--~-~--~~~---~--~~ You received this message because you ar

Re: foreignKey + manipulator...performance problem, SOLVED

2006-08-31 Thread Laundro
What do you mean with "2000 thing objects"? Are there 2000 records in the database for that table, or did you have 2000 records in memory at runtime? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" gr

Re: Filter question

2006-09-05 Thread Laundro
Just from the top of my head (I'm a bit bored at work). As the filter options are python scripts anyway, maybe you could integrate them in your script and call them from within the script and send the altered text to your template? Or maybe you could write your template from within the script its

A bit puzzled on how to create the 'complete' website

2006-09-05 Thread Laundro
Hi, I'm relatively new to Django, but I have created my fair share of view.py's already, some basic, some less basic. There's still something I can't get my head around (yet), and that is how to integrate it all into one big website. For instance, the views I have created are search forms, regis