On Jun 24, 4:05 pm, "James Bennett" <[EMAIL PROTECTED]> wrote:
> On Tue, Jun 24, 2008 at 2:53 PM, radioflyer <[EMAIL PROTECTED]> wrote:
> > I continue to struggle with what I see as some real limitations of the
> > User/UserProfile paradigm used by Dja
I continue to struggle with what I see as some real limitations of the
User/UserProfile paradigm used by Django.
The recommended policy of setting AUTH_PROFILE_MODULE works alright
for situations where the applications in your site only have need of a
single user type.
I've been working on a pro
On Jun 16, 8:10 pm, Etienne Robillard <[EMAIL PROTECTED]>
wrote:
> On Mon, 16 Jun 2008 11:58:48 -0700 (PDT)
>
>
>
> radioflyer <[EMAIL PROTECTED]> wrote:
>
> > I've spent quite a lot of time reading through information about
> > extending Dja
I've spent quite a lot of time reading through information about
extending Django's User model. I've read the arguments about
inheritance vs. user profiles. I've seen some posts in this forum
where the examples even used some of the same model scenarios that I'm
working with. Yet still...I need so
On May 27, 7:45 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]>
wrote:
> On Wed, May 28, 2008 at 2:38 AM, radioflyer <[EMAIL PROTECTED]> wrote:
>
> > Which is the most efficient, 'proper' way to get a count on a query
> > set?
>
> &
Which is the most efficient, 'proper' way to get a count on a query
set?
t_results = Track.objects.filter(query).order_by('title')
count = t_results.count() # and pass 'count' to the template.
or, in the template,
Your search returned {{t_results|length}} track{{t_results|
pluralize}}.
Thanks
Hello group,
Below is code for manual pre-save integrity check.
I think what I want is for the Validation Error (or an Integrity Error
if I go that way) to end up in forms.errors.
>From the form, I was doing:
return HttpResponseRedirect(reverse(student, args=[s.id]))
when I had a validation err
Thanks again dallas and kenneth,
Kenneth's comment about the clean process sent me back to the docs. I
was using form.cleaned_data to do my own integrity checking, but I
didn't realize what was truly available from the clean methods.
Handling the validation with custom form methods does seem lik
ays to do
it.
Dan J.
On Apr 20, 9:00 pm, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote:
> On 21-Apr-08, at 12:50 AM, radioflyer wrote:
>
>
>
>
>
> > Hello,
> > I need some help with the code after the IntegrityError exception.
>
> >
> > s
Hello,
I need some help with the code after the IntegrityError exception.
s = Student.objects.get(pk=student_id)
if request.method == 'POST':
form = ChangeForm(request.POST)
if form.is_valid():
try:
form.save()
request.user.message_set.create(message="Your reques
So the recommendation seems to be when your selection choices are not
static you should go ahead and use a Foreign Key relationship. You get
the automatic loading of the table into a select widget etc.
But there's this issue of the cascade on delete.
I have a Student model with a Foreign Key rel
not s's guardian
>
> On Dec 9, 2007 6:11 PM, radioflyer <[EMAIL PROTECTED]> wrote:
>
>
>
> > I have a m2m relationship between users (guardians) and students.
>
> > I want to check if the currently logged in user has permission to edit
> > a part
On Dec 9, 9:43 pm, radioflyer <[EMAIL PROTECTED]> wrote:
> On Dec 9, 8:52 pm, "Jeremy Dunck" <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Dec 9, 2007 5:06 PM, radioflyer <[EMAIL PROTECTED]> wrote:
>
> > > parents = students.parents.all()
&
On Dec 9, 8:52 pm, "Jeremy Dunck" <[EMAIL PROTECTED]> wrote:
> On Dec 9, 2007 5:06 PM, radioflyer <[EMAIL PROTECTED]> wrote:
>
>
>
> > parents = students.parents.all()
>
> > And then check if logged in user.id matches against any of the paren
I have a m2m relationship between users (guardians) and students.
I want to check if the currently logged in user has permission to edit
a particular student.
s = Student.objects.get(pk=student_id)
parents = s.parents.all()
And then check if logged in user.id matches against any of the parent
i
I have a m2m relationship between users (guardians) and students.
I want to check if the currently logged in user has permission to edit
a particular student.
parents = students.parents.all()
And then check if logged in user.id matches against any of the parent
ids.
Is there a query set method
d
>
> On Nov 18, 5:47 pm, radioflyer <[EMAIL PROTECTED]> wrote:
>
> > Hello,
>
> > New Django user.
>
> > I'm building an application to help manage departure scenarios for
> > elementary school students. One feature allows parents to login and
Hello,
New Django user.
I'm building an application to help manage departure scenarios for
elementary school students. One feature allows parents to login and
and make changes to their children's departure routine. ie. Instead of
"Get on your normal bus," they could change it to "Go to music les
Hello,
I've used this advice:
http://groups.google.com/group/django-users/browse_thread/thread/
bb7f406bffd697f5/76f738315a6947eb?lnk=gst&q=admin
+thumbs&rnum=1#76f738315a6947eb
to add a thumbnail to the model's list page in admin.
I would like to also be able to display the thumb on the change
Right on Aidas!
That's what I needed to get me thinking straight.
Thanks,
Dan J.
--~--~-~--~~~---~--~~
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.
...I'm new to Python and still thinking like a PHP user I'm afraid...
I've found a number of posts about dumping debug info to a template,
but I'm still a little confused. Maybe I don't understand the nature
of the 'context' returned from my view.
If I have this view:
def album(request, album_i
21 matches
Mail list logo