Hi all,
I'm creating a blog as a first Django project, since that seems like a
good way to get my feet wet. I've run into a problem displaying a list
of post excerpts with "read more" links. Here's my code for the
excerpts:
{% for object in object_list %}
{{ object.title }}
Hi, I want the same functionality as the ChangeManipulator where it
prepopulates the form with
the current values of the object, how can I do this with custom form
manipulator.
Shidan
--~--~-~--~~~---~--~~
You received this message because you are subs
Am 26.10.2006 um 16:21 schrieb orestis:
>
>>> (1) to use the dev server
>>> (2) no changes when moving to production
>>> (3) to have core and non-core content served out of the
>>> ADMIN_MEDIA_PREFIX prefix.
>>
>> 1 and 2 is true (especially 2).
>> 3 not ... I don´t care serving admin_media with
Sorry, that was a mistype in the original post.
Should read:
Post.objects.exclude(rating__user = user) mostly works, but it *also*
excludes
all Posts that have not been rated by *any* users yet (don't have rows
in
the Rating table).
So I need a way to word the exclusion in a way that works, or
Andrew,
Have you tried exlude?
http://www.djangoproject.com/documentation/db_api/#exclude-kwargs
Post.objects.exclude(rating__user = user)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To
Thanks to everyone for your help and support!
As it turns our, Malcoms advice of:
>Then start removing code from your models until things start working again.
...was what I needed. It gave me a chance to wade through the models
and find the offending code.
Looks like it was line 84 of the ori
I discovered the Mysql part was a red herring and was just because I had mod_auth_mysql installedIt seems to be an environment variable issue. I've tried both suggested method, but neither seems to work. SetEnv DJANGO_SETTINGS_MODULE
exampleuser.settings PythonOption DJANGO_SETTINGS_MODULE
I've had this working in raw SQL, but I'm refactoring and trying to
django-ify things a little bit. I thought it would be simple, but I'm
stuck.
I have a Post model and a Rating model.
The Rating model has a one-to-many relationship with Post, a
one-to-many relationship with User, and a score. (
Jay Parlar wrote:
> On 10/28/06, NakedHTML <[EMAIL PROTECTED]> wrote:
> >
> > Okay, I trimmed things down a bit and put the models into a new
> > project. Models -> http://paste.e-scribe.com/2425/
> >
> > I'm trying to access the reporter (or reporters) of the story in the
> > template using -> ht
One thing I noticed when I set up sqlite was that the apache user had
to have full permissions on both the database file and the directory
where the file was contained. I don't remember the exact errors I got
back when I had that problem, but figured I'd throw out my experience.
Bryan
On 10/26/
On 10/28/06, NakedHTML <[EMAIL PROTECTED]> wrote:
>
> Okay, I trimmed things down a bit and put the models into a new
> project. Models -> http://paste.e-scribe.com/2425/
>
> I'm trying to access the reporter (or reporters) of the story in the
> template using -> http://paste.e-scribe.com/2424/
>
Okay, I trimmed things down a bit and put the models into a new
project. Models -> http://paste.e-scribe.com/2425/
I'm trying to access the reporter (or reporters) of the story in the
template using -> http://paste.e-scribe.com/2424/
Same as before, this randomly works and errors out with ->
htt
Hi all,
I've got problems (mainly due to my misunderstanding of Django
manipulators) making a custom manipulator work.
The code http://paste.e-scribe.com/2421/ works but has two quirks:
1) {{form.teacher}} doesn't render the actual teacher assigned to that
course but just the first in the list
I don't know if you can help with this. I'm having a little trouble
with using the Django auth method in Apache, the error log indicates
that it is trying a non-existant mysql database (when I am using
postgresql) perhaps I have a
setting wrong, wrong file, or something missing?
The exampleuser/
Hello!
I want to use comment contrib for my apps, but have some problem:
My template article_detail.html is:
[...]
{% get_comment_list for articles.Article object.id as comment_list %}
{% trans 'Comments' %}
{% for comment in comment_list %}
{{ comment.comment }}
{% endfor %}
{% tran
Thanks Malcom, very enlightening.
I would be very interested in learning how/where to go about
reconstructing the queryset.
Tom
Here is the relevant section of my model:
class TaskManager(models.Manager):
def get_query_set(self):
16 matches
Mail list logo