Re: problem with dates when using django and postgres

2005-09-20 Thread scottpierce
Sorry, I tried to delete this message as it was one of those 4AM falling asleep face plowed into the keyboard kind of post. I figured out what was up at about the time the sun came up. It was of course me. Scott

Re: problem with dates when using django and postgres

2005-09-20 Thread scottpierce
Uhh, I meant wrong above. been a late night. turns out it doesn't matter whether it is LazyDate or not.

Re: problem with dates when using django and postgres

2005-09-20 Thread scottpierce
To narrow the issue a bit, I am attempting this in extra_lookup_kwargs: 'extra_lookup_kwargs': {'complete__exact':False, 'grade__isnull':True, 'due_date__lt': meta.LazyDate()} So perhaps I am not doing something right with meta.LazyData()? Scott

problem with dates when using django and postgres

2005-09-20 Thread scottpierce
sql_queries shows a query like this: SELECT assignments_assignments.id,assignments_assignments.teacher_id,assignments_assignments.student_id,assignments_assignments.subject_id,assignments_assignments.assignment_title,assignments_assignments.assignment,assignments_assignments.date_assigned,assignme

RE: New Free Downloads

2005-09-18 Thread scottpierce
I have reported this as spam. Scott Pierce

Re: befuddled with formfields.py

2005-09-18 Thread scottpierce
I don't know that I would call it hacking around. Yes. There seems to be a lot of stuff within the admin that is not exposed outside of the admin. Manipulators will act accordingly if given formfieldcollections for "inline" tables; however, they aren't exposed outside the admin as they should o

Re: befuddled with formfields.py

2005-09-17 Thread scottpierce
See http://code.djangoproject.com/ticket/338. The patch works. Scott Pierce

Re: befuddled with formfields.py

2005-09-17 Thread scottpierce
Look into core/meta/__init__.py at the various methods dealing w/ relationship fields (many_to_many)... Scott Pierce

Re: subclassing context and generics

2005-09-17 Thread scottpierce
marcink on #django made a good point that this isn't a good place for it anyway as you don't want to be applying logic here. However, I was thinking about a BaseContext class to add site vars similar to how garth is doing it w/ templatetags. Doing it with context would allow you to simply impor

subclassing context and generics

2005-09-17 Thread scottpierce
I have a middleware module to close my site to anonymous users and redirects to a login. I was thinking of changing it to use a subclassed context but realized that this would not be used with generics. At least not without hacking views/generic/list_detail.py. Scott Pierce

formfieldcollection and error dictionary

2005-09-15 Thread scottpierce
I am having a hard time fully grasping how dictionaries are dealt with in the templating language. I have a template form feed a formwrapper with a parent table and a formfieldcollection for one2many in a child table. After 3 days of constant tinkering I have the update form showing w/ proper dat

Re: limit_choices_to users in a specific group

2005-09-02 Thread scottpierce
Well, I gave up. I had hoped it would be a little cleaner but this works: def _getTeachers(): u = users.get_list( tables=['auth_users_groups','auth_groups'], where=["auth_groups.name = 'teacher'", "auth_users_groups.group_id = auth_groups.id", "auth_u

Re: extending admin interface

2005-09-02 Thread scottpierce
Post the code after making the recommended changes.

limit_choices_to users in a specific group

2005-09-01 Thread scottpierce
I am writing a little assignments app for my homeschooled children where I and their mother can post assignments with a due date, etc... My model looks like this so far: from django.models.auth import User from django.models.auth import users from django.models.auth import groups class Assignme

Re: associating permissions with groups in the model

2005-09-01 Thread scottpierce
OK, got it. Now I feel stupid for overlooking that one. I now see where you set the groups and permissions (don't know how I overlooked that one), but I would still like to set this somewhere other than TTW. I will likely discover the means 10 minutes after this post. I'm sure I can use inher

associating permissions with groups in the model

2005-09-01 Thread scottpierce
I believe I am missing something in regards to the subject (or else I wouldn't be posting this right!). You can set permissions in the model. And you can set a user to a group in the admin as well as create a new group. The docs also talk about setting a user to a group and that user inheriting