I don't understand why I keep getting "permission denied" when I try
to install Django. Here is what I get when trying to install as the
Admin:
svn co http://code.djangoproject.com/svn/django/trunk/ django-trunk
svn: Can't make directory 'django-trunk': Permission denied
I've had the same
Hi All,
I picked up this sample code from django documentation:
from django.core import serializers
data = serializers.serialize('xml', SomeModel.objects.all(),
fields=('name','size'))
How do I extend this to do the following:
data = serializers.serialize('xml', SomeModel.objects.all(),
Hello
You need to install md5 module at first.
On Thu, 2008-06-26 at 22:28 -0700, [EMAIL PROTECTED] wrote:
> Hello,
>
> I'm trying to install MySQL-python-1.2.2 and don't know how to resolve
> tis error:
>
> jason-neridas-macbook:~ jasonnerida$ cd /Users/jasonnerida/Downloads/
>
Hello,
I'm trying to install MySQL-python-1.2.2 and don't know how to resolve
tis error:
jason-neridas-macbook:~ jasonnerida$ cd /Users/jasonnerida/Downloads/
MySQL-python-1.2.2
jason-neridas-macbook:MySQL-python-1.2.2 jasonnerida$ python setup.py
build
Traceback (most recent call last):
File
You may also be interested in this ticket:
http://code.djangoproject.com/ticket/6095
(which will hopefully be hitting relatively soon).
On Jun 26, 11:27 pm, Eric Abrahamsen <[EMAIL PROTECTED]> wrote:
> You'd almost think they were handing out prizes for being quickest on
> the draw :)
>
> On
You'd almost think they were handing out prizes for being quickest on
the draw :)
On Jun 27, 2008, at 12:18 PM, joshuajonah wrote:
>
> And this is why the Django community rocks, two examples and a full
> explaination with a link in less than 10 minutes, GW guys
>
> On Jun 26, 11:55 pm,
And this is why the Django community rocks, two examples and a full
explaination with a link in less than 10 minutes, GW guys
On Jun 26, 11:55 pm, bhunter <[EMAIL PROTECTED]> wrote:
> Hi, sorry for what is probably a trivial question, but I'm new to
> Django and a little fuzzy on databases in
Hey there,
A M2M field creates an intermediary join table which doesn't show up
in the admin, or other places. It's basically just a pairing of
Journalist ids with Article ids, and the M2M field is a convenience
that allows you to ignore this table. If you want to add additional
Hi,
To do that I would use an auxilliary model:
class Journalist(models.Model):
pass
class Article(models.Model):
pass
class JournalistArticleRelationship(models.Model):
journalist = models.ForeignKey(Journalist)
article = models.ForeignKey(Article)
status = models.Charfield()
Well you'd want a relational table of author status', some thing like
this:
class Journalist(models.Model):
name = models.Charfield()
class Article(models.Model):
articles = models.Charfield
class State(models.Model):
state = models.CharField()
class Article_relationship(models.Model):
Hi, sorry for what is probably a trivial question, but I'm new to
Django and a little fuzzy on databases in general, so I hope someone
here can help. Just to keep the motif, I'll frame my question in
terms of journalism.
I'd like to set up a database with the following relationships: a
model
On Thu, 2008-06-26 at 19:57 -0700, [EMAIL PROTECTED] wrote:
> Hello
>
> I have a small server, just 5 users and I use the django for data
> entry. My server have only 512MB of RAM but it is enough and it work
> really well. But whenever I run "manage.py dumpdata xml" --format=xml"
> for backup
Hello
I have a small server, just 5 users and I use the django for data
entry. My server have only 512MB of RAM but it is enough and it work
really well. But whenever I run "manage.py dumpdata xml" --format=xml"
for backup purposes it uses all my RAM and start filling the swap
space on my
While definitely off-topic, I appreciate the heads up. I live in a
world where the framework and the guitarist often intersect.
On Jun 26, 9:01 am, Dan <[EMAIL PROTECTED]> wrote:
> This isn't related to Django the framework but Django the musician, I
> figure you'd find it interesting anyway.
>
Hi All,
I was able to setup review board with the default auth backend.
However I am having problem setting it with LDAP.
Here is what I did:
1). I added the following to the settings_local.py. Restarted the
server "manage.py runserver 0.0.0.0:8000"
I made sure all the LDAP props are correct.
I prefer command line, vi its always the same, no matter if you
ssh, log on locally, connect via sat-modem
On Thu, Jun 26, 2008 at 7:39 PM, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
>
> I use kubuntu+kate, and I just use a terminal for running code and
> such.
> >
>
I use kubuntu+kate, and I just use a terminal for running code and
such.
--~--~-~--~~~---~--~~
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
I reckon your view should check what the language is set in the
request (request.LANGUAGE_CODE), and then pull out the right field
from the model.
On Jun 26, 11:22 pm, pihentagy <[EMAIL PROTECTED]> wrote:
> Hi!
>
> I have a 3-lingual app, and there are some model fields translated,
> like this:
Hi,
As far as I'm concerned, I only use the trunk in all my projects. For
more testimonials and advice, check these earlier threads:
http://groups.google.com/group/django-users/browse_thread/thread/93ec5b37ef0cf3ab/7d9a1dd11c91c8b0?lnk=gst=trunk+stable#7d9a1dd11c91c8b0
Maybe can you try this: http://cavedoni.com/2005/django-osx
On Jun 27, 9:00 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> Hi there,
>
> I'm trying to set up Python 2.5.2 and Django onmy Mac osx 10.4.11
> But i'm a complete newbie in thing like this and command line
> mastering.
> I'm not
> All my static files (css, js and so forth) live under a folder called
> media
Rename the directory - mod_python uses 'media' dir from django itself.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users"
> def post_handler(request):
> post_text = request.POST.getlist('data')
> user = User.objects.get(id=2) # for debugging purposes
> for x in range( len(post_text)-1 ):
> name = post_text[x]
> panel =
> user.panels_set.get(name__istartswith=name,side="left")
>
Hi there,
I'm trying to set up Python 2.5.2 and Django onmy Mac osx 10.4.11
But i'm a complete newbie in thing like this and command line
mastering.
I'm not feeling really confident a the moment in what i do.
I'm following tho django book install on the django project web site.
the Python and
A lot of that depends on what you would consider a feature vs. what
you think a modern web framework should provide by default.
Aside from the points listed on the home page, I would suggest going
to the documentation page and look down the list of reference topics.
Those are all "features" in a
On Jun 26, 12:00 pm, Huuuze <[EMAIL PROTECTED]> wrote:
> Just out of curiosity, are the Django devs working on a patch? I
> wasn't able to find a ticket for this issue.
Little consistency tweaks like this one will become more important
once 1.0 lands, imo.
Hi all,
I've fairly new to django but i'm loving it!
I've got some draggable panels on a site and want to save their
positions so when a user logs back in, the panels are in the same
place when they last hit the save button. What I'm doing is (using
jQuery) retrieving the id's of the panels,
On Thu, Jun 26, 2008 at 10:05 PM, Will <[EMAIL PROTECTED]> wrote:
>
> Couldn't Django be pluggable with respect to the Database drivers?
> There's a DBAPI2 interface spec, therefore it should be possible.
Erm... the database backends _are_ pluggable. Hence, the
DATABASE_ENGINE setting.
If you
Hey Pieter --
You may want to experiment with the SESSION_COOKIE_DOMAIN setting
(http://www.djangoproject.com/documentation/settings/#session-cookie-domain);
it could be that Safari's doing strange things with ".local" session
cookies and doing something explicit could help. Worth a shot, at
Oops, sorry, the line:
All my static files (css, js and so forth) live under a folder called
main
should read
All my static files (css, js and so forth) live under a folder called
media
Thanks
On Jun 26, 4:57 pm, alce <[EMAIL PROTECTED]> wrote:
> Hi, I've just started playing with Django
Hi, I've just started playing with Django and I must say I'm
impressed. It's easy, it's fast, it's beautiful.
I wrote a small app and will be going to production soon. I deployed
the site to a staging server and I'm having some trouble serving
static files (I keep getting 404's). I realize it's
On Thu, Jun 26, 2008 at 11:07 PM, Bobby Roberts <[EMAIL PROTECTED]> wrote:
> Ok i've got the form fields showing fine. My form action is "." per
> the examples in the documentation. The form is submitting and tracing
> through the view but i get a "view didn't return an
>
This may sound like a cop out, but why can't you create a gallery
object with that default value.
Then when you construct your query set, you can create so that that
default option is returned. This
would enable you to both display the correct option, as well as work
during the validatio step.
This is just an idea... didn't try this.
Could you not use HttpRedirect in your url conf to redirect the
standard view
of that models admin with the default filter value?
This is not the most convenient way, but it should work...
On 26 Jun., 14:25, lee <[EMAIL PROTECTED]> wrote:
> Guys,
>
> Is
Thanks Karen and Brian for your suggestions. Turned out a combination
of the two (got to read those error messages more closely - cough)
It was incorrect radio_admin syntax in the 'pluggable' basic blog app
- http://code.google.com/p/django-basic-apps/, had to clear pyc's as
well.
Now got a
disregard this last post... i figured it out
thanks
--~--~-~--~~~---~--~~
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
I'm looking to propose python+django for a new project at work, as I
feel it will be a good fit. Generally everything is done in PHP, so
its going to be a bit of a change.
I've already gathered a list of benefits to using python (fully oo,
maintainability across developers, etc), now I just need
Ok i've got the form fields showing fine. My form action is "." per
the examples in the documentation. The form is submitting and tracing
through the view but i get a "view didn't return an
HttpResponse.object.
here's my view:
from forms import *
from django.shortcuts import
> Hi folks,
>
> I'm trying to champion Django trunk/1.0 as part of a small project in
> a mid-sized city newspaper office. There is some worry about choosing
> a framework which does not currently have a stable release.
Django has a stable release (0.96), it will have an *API-stable*
release
On Thu, Jun 26, 2008 at 4:22 PM, JPC <[EMAIL PROTECTED]> wrote:
>
> Maybe Im wrong in some stupid thing because Im a Django newbie.
> My problem is with external JS file. Im trying to include it in the
> usual HTML way
> (i.e.
Key Reference:
http://www.djangoproject.com/documentation/static_files/
You need 2 in your HTTPD configuration file, one for things
that will be processed by Django, one for static files.
Thus, you need to actually put your static JS files on a
/var/www/static-file/ or some web-served thing
> urlpatterns = patterns('',
> (r'/step-1.html', 'billpay.views.DoPayDetailForm'),
> )
>
> Wouldn't this call the dopaydetailform view if you went to the page /
> step-1.html ?
At this stage, while you're still learning, I would AVOID making URL
mappings that "appear" to be HTML files,
Maybe Im wrong in some stupid thing because Im a Django newbie.
My problem is with external JS file. Im trying to include it in the
usual HTML way
(i.e.
your urls is setup for
http://yourdomain.com/login/...
not http://yourdomain.com/sommerspil/login
On Jun 26, 11:46 am, Peter Rowell <[EMAIL PROTECTED]> wrote:
> You didn't share with us the specific error you are getting.
>
> I strongly recommend a) DEBUG=True in settings.py, and b) checking
>
This line:
query = show.objects.filter(show_feed__contains="http://;)
selects all shows that have a feed url(?) containing "http://;. The for loop
then loops through these items and passes each one to feedparser. If you
want to view only one show you have to change this to use the show ID
go to a python interpreter
import sys
sys.path
make sure that directory is in there
On Jun 26, 2:34 pm, Adi <[EMAIL PROTECTED]> wrote:
> I get the following error when I hit my websitehttp://ipaddress/enterathletes/
>
> DocumentRoot: '/var/www/html'
>
> URI: '/enterathletes/'
>
I guess it depends on what you mean by "client related". If Safari is the
only browser exhibiting this behavior I think it's safe to assume that the
web server is doing OK. This assumption is only strengthened by the fact
that only a change of the name the server is accessed through changes the
> urlpatterns = patterns('',
> (r'/step-1.html', 'billpay.views.DoPayDetailForm'),
> )
>
> Wouldn't this call the dopaydetailform view if you went to the page /
> step-1.html ?
It's close. Re-write it as such:
> urlpatterns = patterns('',
> (r'^step-1.html/$',
On 26 juin, 19:45, "Greg Lindstrom" <[EMAIL PROTECTED]> wrote:
(snip)
> My question deals with handling attachments to the announcements.
(snip)
> I would like to set things up so we can have downloads (pdf,
> Word, etc.) (snip) associated with the announcement.
(snip)
> Can I, or rather how do
On Jun 26, 2008, at 1:23 PM, timc3 wrote:
>
> Might be a stupid question but how did you apply the patch?
Get inside your Django directory and execute::
patch -p0 < the_path.diff
That should get it going. Let me know if you have any more questions.
Brian Rosner
http://oebfare.com
On Jun 26, 2008, at 10:09 AM, Alfonso wrote:
>
> TypeError: __init__() got an unexpected keyword argument
> 'radio_admin'.
>
> Where did that come from?
Sounds like you may have some lingering .pyc files that might be
causing this from newforms-admin if you have switched your copy of
Django
Might be a stupid question but how did you apply the patch?
On May 12, 5:06 pm, Wes Winham <[EMAIL PROTECTED]> wrote:
> I've been using Brian Rosner's patch from that ticket, and it's been
> working great for me. I haven't ran in to any bugs so far and it's cut
> my view code down by several
For a start, you want your KVM model to subclass models.Model.
Colin
On Thu, Jun 26, 2008 at 11:59 AM, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
>
> Karen;
>
> On Jun 26, 12:56 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
>> If you post the contents of your cmdb/models.py file on someplace
Hello,
I have a serious validation problem with a form using a
ModelSchoiceField.
Forms:
class MyModelChoiceField(forms.ModelChoiceField):
def label_from_instance(self, obj):
return "%s" % obj.name
class PictureForm(forms.Form):
image =
Karen;
On Jun 26, 12:56 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
> If you post the contents of your cmdb/models.py file on someplace like
> dpaste.com someone might be able to help identify what is going on.
Thanks for that advice.
You can find my models.py at:
I've got a model that represents a boat of rowers which has eight
seats (order is important). The easiest way to handle this was a model
with eight foreign keys:
class Boat(models.Model):
seat_1 = models.ForeignKey(User)
[...]
seat_8 = models.ForeignKey(User)
Which is fine and great, but
I get the following error when I hit my website http://ipaddress/enterathletes/
DocumentRoot: '/var/www/html'
URI:'/enterathletes/'
Location: '/enterathletes/'
Directory: None
Filename: '/var/www/html/enterathletes'
PathInfo: '/'
Phase:
mwebs wrote:
> Thanks Nathaniel,
>
> but where and how do I pass the Queryset? From my view?
> I am sorry but I dont understand completly
>
> class MyModelChoiceField(forms.ModelChoiceField):
> def label_from_instance(self, obj):
> return "My Object #%i" % obj.id
>
>
> class
On Jun 24, 4:22 pm, Tye <[EMAIL PROTECTED]> wrote:
> Semi-off-topic:
> Does anybody know how to get notepad to save as UTF-8 by default? It
> keeps trying ANSI, and I keep hating.
Unlikely; Notepad is REALLY lightweight.
Wordpad is MUCH better; it handles files >64K, files with UNIX-style
You da man. That worked perfectly.
Just out of curiosity, are the Django devs working on a patch? I
wasn't able to find a ticket for this issue.
On Jun 26, 12:46 pm, Nathaniel Whiteinge <[EMAIL PROTECTED]> wrote:
> On Jun 26, 8:29 am, Huuuze <[EMAIL PROTECTED]> wrote:
>
> > How can I add an
I am just about ready to launch my first Django Website! It for a
local gym where my daughter trains and I offered to rewrite their
current site because it's out of date (www.sonshineacademy.com). I've
set up the database to handle their announcements and I think it's
going to work out fine.
mwebs wrote:
> Hello,
>
> I am trying to do something like this
>
> class PictureForm(forms.Form):
> image = forms.ImageField(label='Picture')
> gallery= forms.ChoiceField(Gallery.objects.all())
>
> this just works fine, but I only want to pass several Galleries to the
>
I don't want to collapse the individual items, but the whole stack or
table. Anyone know how to go about this?
Thanks
Wayne
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this
Hello,
I try to set data for a ModelChoiceField() manually. This means the
data is not in my db, so it s not in a Queryset.
my form:
class PictureForm(forms.Form):
image = forms.ImageField(label='Picture')
gallery= MyModelChoiceField(models.Gallery.objects.none(),
On Thu, Jun 26, 2008 at 12:22 PM, [EMAIL PROTECTED] <
[EMAIL PROTECTED]> wrote:
>
> I'm a little stumped right now.
>
> I'm trying to run syncdb, on a project that I'm really just starting
> to work on/build, and I get this error message:
>
> [EMAIL PROTECTED]:~/NotBackedUp/cmdb-svn/src/cmdb$
On Thu, Jun 26, 2008 at 12:09 PM, Alfonso <[EMAIL PROTECTED]> wrote:
>
> Just updated to latest svn checkout of Django and seeing this error
> for the first time at root (across the entire site actually)??
>
> TypeError: __init__() got an unexpected keyword argument
> 'radio_admin'.
>
> Where did
On Jun 26, 8:29 am, Huuuze <[EMAIL PROTECTED]> wrote:
> How can I add an empty value as the initial value?
At the moment you have do a bit of leg-work for this. Something like
the following should work (untested)::
from django.contrib.localflavor.us.us_states import STATE_CHOICES
from
Hello,
does somebody know if there is a possibility to specify a timeout for
the URLField? I'm just using a URLField, but if the URL is not correct
the URLField needs a lot of time to response with an error.
Thanks for help
--~--~-~--~~~---~--~~
You received this
Hi folks,
I'm trying to champion Django trunk/1.0 as part of a small project in
a mid-sized city newspaper office. There is some worry about choosing
a framework which does not currently have a stable release. I've been
addressing these worries with examples of the stability of trunk and
the
I'm a little stumped right now.
I'm trying to run syncdb, on a project that I'm really just starting
to work on/build, and I get this error message:
[EMAIL PROTECTED]:~/NotBackedUp/cmdb-svn/src/cmdb$ python manage.py
syncdbError: Couldn't install apps, because there were errors in one
or more
On Jun 26, 4:10 am, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Thu, 2008-06-26 at 01:41 -0700, Lee Hinde wrote:
> > Hi;
>
> > Exhibits are here:
>
> >http://hinde.net/clients/djangoq/
>
> > Summary, I have accented data that displays fine in my sql browser,
> > but shows up funky in
Just updated to latest svn checkout of Django and seeing this error
for the first time at root (across the entire site actually)??
TypeError: __init__() got an unexpected keyword argument
'radio_admin'.
Where did that come from?
Help appreciated!
Alfonso
On Jun 26, 10:44 am, "Scott Moonen" <[EMAIL PROTECTED]> wrote:
> Chris, I have a utility function that does this for me. You can call it
> from your view, or if you set things up right from your template:
Good stuff, Scott. Thanks! Might be worth turning into a proper
template tag/filter at
> Hey no problem -- great you are learning new skills after that much
> time. I did not mean to sound abrasive.
I don't think you sounded abrasive @ all... I appreciate the hand up
on this stuff. Definitely different (and a hell of a lot better) than
programming with MS.
here's what i've added
RossGK wrote:
>
> Stuff
I think you don't want HTTP.
In other words you are wanting (like the Comet folks) HTTP to do things
it was not designed to do. In other words you are avoiding its
strengths and chasing after its weaknesses.
Not sure what your real requirement is but,
Look at the
You didn't share with us the specific error you are getting.
I strongly recommend a) DEBUG=True in settings.py, and b) checking
your Apache error_log.
If you are getting a generic Apache 404, then the problem will be in
the Apache httpd.conf or .htaccess files. If you are getting a Django
404,
Chris, I have a utility function that does this for me. You can call it
from your view, or if you set things up right from your template:
from datetime import date
def most_recent_Sunday(dt = None) :
if dt is None : dt = date.today()
return date.fromordinal(date.toordinal(dt) - (dt.weekday()
Probably what you want is to make a custom template tag that does the
proper query-to-html business, and then stick that tag in your base
template. Might want to look into caching the result, if it doesn't
change often...
I have a view which returns a group of upcoming events. I would like
to display the events grouped by week:
Week of June 22
* Event 1
* Event 2
* Event 3
Week of June 29
* Event 4
* Event 5
* Event 6
I've seen examples for doing this using the ifchanged tag, and I've
got that working. But I
Malcolm Tredinnick wrote:
> Status code 302 is an HTTP redirect, which is what you would expect to
> see, since your view is always returning a HttpResponseRedirect. The
> test framework doesn't follow redirects.
What about? assertRedirects(response, expected_url, status_code=302,
On Thu, 2008-06-26 at 08:19 -0700, Bobby Roberts wrote:
> > But you should really start with the tutorial[1] or the Django Book[2].
> > The documentation for Django is really outstanding, you'll progress much
> > faster if you do some more reading.
> >
> >
> But you should really start with the tutorial[1] or the Django Book[2].
> The documentation for Django is really outstanding, you'll progress much
> faster if you do some more reading.
>
> [1]:http://www.djangoproject.com/documentation/
> [2]:http://www.djangobook.com/
-
Yeah i've got
On Thu, 2008-06-26 at 08:10 -0700, Bobby Roberts wrote:
> Hey -
>
> i've only included a single line in my urls file as follows:
>
> urlpatterns=patterns('django.views.generic.simple',
> (r'step-1.html', 'direct_to_template', {'template':
> 'step1.html'}),
>
>
> This obviously calls my
I have a design issue where i want to have a standard base template
display a list of database entries with a count for the most popular
entries. If I am using this as the base template this means that I
need to pass the list and the calculated count from any view which
calls any template which
> Do you have an URLconf entry for your DoPaymentDetailForm view? Are you
> sure, the view gets called?
> Maybe you have an error in your Django Template? How do you access the
> fields? (Something like {{ form.your_field }} should work.)
>
> Matthias
My urls.py file only has the call for the
Hi!
As I read in
http://groups.google.com/group/django-users/browse_thread/thread/f8558f8c4c0de564/28ae8a6ecbb921ff
the current language should be part of the URL.
Just a little question: how can I achieve that without messing up all
my reverse function, and of course links in the template...
Hey -
i've only included a single line in my urls file as follows:
urlpatterns=patterns('django.views.generic.simple',
(r'step-1.html', 'direct_to_template', {'template':
'step1.html'}),
This obviously calls my html page. how do i call the view?
BR
On Jun 26, 10:52 am, Matthias
On Thu, 2008-06-26 at 08:01 -0700, Bobby Roberts wrote:
> Hi Matthias -
>
> I changed my view name to DoPaymentDetailForm and still no luck. Does
> something have to call this view or does Django just do it
> automatically?
>
>
I'm not sure what you are talking about. Django does nearly
Hi all,
I have a weird problem hitting the methods matched through urls.py.
My setup works through when I just set it up manually using
python manage.py runserver 0.0.0.0:8000 etc, but not when using apache
The path to the the application
is /home/dradmin/wwwroot/php/drmu/sommerspil
I have
Hi Matthias -
I changed my view name to DoPaymentDetailForm and still no luck. Does
something have to call this view or does Django just do it
automatically?
BR
On Jun 26, 10:52 am, Matthias Kestenholz <[EMAIL PROTECTED]> wrote:
> Hi,
>
>
>
> On Thu, 2008-06-26 at 07:30 -0700, Bobby Roberts
That fixed the problem, thanks!
On Jun 26, 6:00 am, Nathaniel Whiteinge <[EMAIL PROTECTED]> wrote:
> On Jun 25, 12:13 pm, twenger26 <[EMAIL PROTECTED]> wrote:
>
> > def wrapper_for_wizard(request):
> > return AddOrderWizard([OrderForm1, OrderForm2Quote, OrderForm3])
>
> You're on the right
Actually I did have spaces. I removed them and BAM... they worked!
Thanks for you help.
On Jun 26, 9:42 am, phillc <[EMAIL PROTECTED]> wrote:
>
>
> do you have spaces around post?
>
> i dont even know if that would cause the problem.
>
> if you ar eusing the dev console, the way to debug is
Hi,
On Thu, 2008-06-26 at 07:30 -0700, Bobby Roberts wrote:
> hey -
>
> got a quick question. I think i'm missing part of the puzzle here.
>
> I have a form set up in a forms.py file. In my template i have it
> hand coded instead of using {{form.as_table}} because I want to be
> very
Thanks Nathaniel,
but where and how do I pass the Queryset? From my view?
I am sorry but I dont understand completly
class MyModelChoiceField(forms.ModelChoiceField):
def label_from_instance(self, obj):
return "My Object #%i" % obj.id
class PictureForm(forms.Form):
image
do you have spaces around post?
i dont even know if that would cause the problem.
if you ar eusing the dev console, the way to debug is use the print
statement
so put these someplace and tell us what you get
print request.method
print request.POST['choice']
On Jun 26, 9:29 am, Mog
Ross, I had one more thought.
Are most browsers capable of using persistent HTTP for XMLHttpRequests? If
so, and *assuming your main motivation is simply to be more efficient by
using a single HTTP connection* for your traffic, then I think you might be
able to implicitly exploit persistent HTTP
Ross, it seems to me that there are a number of potential hurdles to holding
a connection open for a long period:
1. Some server configurations may require that requests be satisfied
within a certain time period or else the connection will be reset. Of
course, since the server is under
On Jun 26, 7:53 am, mwebs <[EMAIL PROTECTED]> wrote:
> gallery = forms.ChoiceField(Gallery.objects.filter( ...))
You want to use a ModelChoiceField [1] instead of a ChoiceField. It
takes a QuerySet as an argument::
class PictureForm(forms.Form):
...
gallery =
hey -
got a quick question. I think i'm missing part of the puzzle here.
I have a form set up in a forms.py file. In my template i have it
hand coded instead of using {{form.as_table}} because I want to be
very specific on how it looks and operates.
I have a view as follows:
def
I'm using a ModelForm to render a model that contains a
USStateField.
>> state = models.USStateField(blank=True, null=True)
Unfortunately, when it renders, the first selection is always
"Alabama" rather than "--" or some other defined blank value
(i.e., "Please select a state"). How can I
model choice field
http://www.djangoproject.com/documentation/newforms/#fields-which-handle-relationships
On Jun 26, 9:53 am, mwebs <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I am trying to do something like this
>
> class PictureForm(forms.Form):
> image =
1 - 100 of 134 matches
Mail list logo