It builds up on the things mentioned in the documentation for normal
> forms. Also, the documentation for ModelForm's save instance has
> pretty explicit examples of creating form instances:
>
> http://docs.djangoproject.com/en/dev/topics/forms/modelforms/#the-sav...
>
> -- dz
>
> On T
gt; -- dz
>
> On Tue, Mar 24, 2009 at 3:11 PM, Theme Park Photo, LLC
>
> <swir...@gmail.com> wrote:
>
> > It has data! It was created from an existing instance...and all the
> > fields have values
>
> > 'body': u'hello there', 'allow_comments':
&
), 'score': -93L, 'categories': [1L],
'title':
u'Hello', 'slug': u'hello-0', 'tags':
u'hello'}
On Mar 24, 12:06 pm, Alex Gaynor <alex.gay...@gmail.com> wrote:
> On Tue, Mar 24, 2009 at 3:02 PM, Theme Park Photo, LLC
> <swir...@gmail.com>wrote:
>
>
&g
Im trying to get code to edit an existing record in a table working.
For some reason, form.is_valid is returning false (and I can't save it
because there's no cleaned data). Even reduced to this (below) where
I'm simply getting an existing "Post" object, creating a ModelForm,
and validating it,
Thanks! Armed with that information, I went back and checked my
configuration files and, sure enough, I was missing the
CustomLog /var/log/apache2/access.log combined
statement in the VirtualHost entry for the django application.
--~--~-~--~~~---~--~~
You
Is there an existing Django application that will log normal requests?
There doesn't seem to be any mention of what seems like a large
omission in the django documentation...
Django requests don't show up in the usual access log.
--~--~-~--~~~---~--~~
You
I have a feeling this is related (but I'm still stuck!)
Occasionally, when I start it up, I see this:
The URLCONF in settings.py looks OK
File "/usr/lib/python2.4/site-packages/django/core/urlresolvers.py",
line 198, in _get_urlconf_module
self._urlconf_module =
I'm having problems with get_absolute_url not working.
It works fine on my development site, but when I tried to deploy it,
it fails, and I can't figure out why
I'm using the "basic.blog" app
>>> post = Post.objects.published()
>>> p = post[0]
>>> print p.get_absolute_url()
Traceback (most
nty-stick.com>
wrote:
> On Sun, 2009-03-15 at 21:08 -0700, Theme Park Photo, LLC wrote:
> > I'm getting this message when trying to start Django (from mod_python)
>
> > (From my apache log)
>
> > [Sun Mar 15 22:07:28 2009] [error] [client 67.188.95.50] PythonHandler
&
I'm getting this message when trying to start Django (from mod_python)
(From my apache log)
[Sun Mar 15 22:07:28 2009] [error] [client 67.188.95.50] PythonHandler
django.core.handlers.modpython: ImproperlyConfigured: MySQLdb-1.2.1p2
or newer is required; you have 1.2.1
BUT! I have 1.2.2
Folks:
I'm stumped over this one.
I have a model:
class QuestionAsked(models.Model):
user = models.ForeignKey(User)
asked = models.ForeignKey(QuestionTable)
date = models.DateTimeField()
choice = models.CharField(max_length=1)
correct =
No! It was the fact that you really need all the stuff that's on the
sample template
On Feb 22, 2:29 pm, Donn <donn.in...@gmail.com> wrote:
> On Sunday, 22 February 2009 21:00:24 Theme Park Photo, LLC wrote:
> > {% block content %}
> > Hello
> > {% end block %}
&g
I can't seem to get django-cms to work with template tags
If I specify as my default template something like (stripped to bare
essentials here)
FOO
{% block content %}
{% endblock %}
and enter in the body of my content for a page to be rendered with
this template (in the admin tool)
{% block
Ok! NOW I get it! You need to do a get to do a select by primary key
u=User.objects.get(username="swirsky")
For some reason I thought that you could get by primary key by just
creating the object with the key specified...
--~--~-~--~~~---~--~~
You received
Thanks! That was a little unintuitive because, of course, I was only
trying to do a "SELECT" on u and an INSERT on R. Save seems like it
would do something to u
On Feb 2, 10:39 pm, Malcolm Tredinnick <malc...@pointy-stick.com>
wrote:
> On Mon, 2009-02-02 at 22:22 -0800, Th
I can't get anything with Foreign keys to work. I trimmed everything
down to the simplest example:
from django.db import models
from django.contrib.auth.models import User
class Ranking(models.Model):
user = models.ForeignKey(User)
score = models.IntegerField()
def
> Do you have django.contrib.comments
> coming before your own app in INSTALLED_APPS, by any chance?
Yes I did! Thanks for the hint. I put my own app first, and now it's
finding it just fine!
--~--~-~--~~~---~--~~
You received this message because you are
Also from reading the source, I don't see any mechanism by which it
would pick up form.html from any other than the three directories
enumerated there. Am I really supposed to edit and setup.py install
the django framework to change the comments template?
On Jan 24, 5:13 pm, "Theme Park
The documentation for render_comment_form hints that you can override
the default template by putting comments/form.html with your own form
in your templates directory.
No matter what I do, it won't pick up my alternate form.
Is there anyway to see the actual directories django is checking for
Well what do you know! Someone went through the exact same thing as I
did and documented it here:
http://mccormac.org/blog/2007/apr/04/dynamically-serving-static-content-django/
This was exactly what I was looking for.
--~--~-~--~~~---~--~~
You received this
I'm just getting started in Django and I'm stuck.
I have defined in settings a variable called STATIC_ROOT that contains
the root URL where static assets are served. In development it's
something like static.example.com.local and in production it would be
static.example.com
How do I pass this
as found by psycopg's
> configure. It's called py25-psycopg2.
>
> Thanks!
>
> Jon Brisibnhttp://jbrisbin.com
>
> On Aug 23, 2008, at 1:08 PM, Theme Park Photo, LLC wrote:
>
>
>
> > I have been unable to get Django + Postgres to run on Leopard.
>
> > (
I have been unable to get Django + Postgres to run on Leopard.
(Works fine on Windows and Linux. Personally, I find it much easier to
get most open source stuff to run on Windows or Windows+Cygwin than on
the Mac!)
Anyway, the problem isn't Django, and it isn't Postgres. It's
psycopg2! I can't
23 matches
Mail list logo