I too spent a day or so on this seemingly simple problem :(
Here's my solution...
class EMailAddressForm(forms.Form):
emailType = forms.ChoiceField(required=True,choices=[])
def __init__(self, *args, **kwargs):
super(forms.Form, self).__init__(*args, **kwargs)
choices =
I'm passing a list because this is a formset, not a single form.
That code is part of a view function so I didn't show the def:
On Sep 17, 8:21 pm, Torsten Bronger
wrote:
> Hallöchen!
>
> On a second look, I see other things that may be problematic.
>
> Jim Myers writ
I'm spent hours reading docs and Googling for the solution to this
problem to no avail.
Running Django 1.1 with mod_wsgi
I have a Form with a ChoiceField where the choices are established by
reading them from the database. Then I try to initialize the initial
selected choice so it will be "select
I had looked at that page before, but had thought it only applied to
mod_python.
Does it also apply to mod_wsgi? If so, the page could be made
clearer.
On Sep 11, 10:49 pm, Gabriel Gunderson wrote:
> On Fri, Sep 11, 2009 at 3:03 PM, Jim Myers wrote:
> > I have a requirement to ser
I have a requirement to serve static files only to users authenticated
through Django secure login.
That means I can't use apache basic/digest authentication for those
files.
So far in my searches of the web and Django docs, I've found no way to
do this.
Of course my alternative is to serve ALL t
I have a database model with many fields, some of which I don't want
displayed in a form and others I don't want to be editable. Is it
possible to do this with a ModelForm? Or is it even possible with
regular forms?
Furthermore, I only want the SQL update statement to update ONLY the
fields act
Hi,
I'm using this code to create a response to an Ajax GET from a Dojo
html page:
@json_response
def index_json(request):
ret = {'data': [dict(name='Gary', age='24'),
dict(name='Shane', age='29')]}
return ret
The actual text sent to the client is this:
{}&&{"data": [{"ag
OK, I think I got it to work now. I had to copy most of the stuff in
contrib.auth.models.py also (which isn't really mentioned in the doc
you mentioned about backends (which I had already read).
--~--~-~--~~~---~--~~
You received this message because you are subscr
I've look all over docs and Google to find a way to do this with no
real luck.
I'm using a legacy PostGreSQL database which already has user and
permissions tables defined, and I don't want to have to create
parallel Django User tables.
It seems simple that I should just be able to completely re
My noob error: I had extra "portal/" on my regex.
Sorry and thanks for your attention.
--~--~-~--~~~---~--~~
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@googlegro
Thanks, but that doesn't do it either.
I changed the regex to:
^portal/student/(?P\S+)/profile_edit/$
and it still doesn't match :(
On Sep 5, 9:44 pm, Karen Tracey wrote:
> On Sat, Sep 5, 2009 at 11:32 PM, Jim Myers wrote:
>
> > Hi, I'm using this regex in urls.
Hi, I'm using this regex in urls.py:
r'^portal/student/(?P\S+)/profile_edit$'
to try to match this url:
http://dd..org/portal/student/xx.yy/profile_edit/
It's supposed to put "xx.yy" into userid parameter and match and use
the associated view.
But it doesn't match. I've banged my head for
12 matches
Mail list logo