Same Name; Different People

2008-04-05 Thread LRP
This pesky problem transcends Django. But many Django users will encounter it. Say we're creating a contact or registration application. What is the best way to deal with the problem of two or more people with exactly the same name? This problem actually has two faces: 1) In an admin

Re: Django admin Error at /admin/auth/user/1/?

2008-04-05 Thread Sky
I think I solved this problem after I upgrade my python version from 2.3 to 2.5. before I used python2.3 on Dreamhost, /admin/auth/user/1/ raise a http404 exception thanks! On Apr 6, 7:31 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Sat, Apr 5, 2008 at 1:43 AM, Sky <[EMAIL PROTECTED]>

Re: Serving binary files "through" django

2008-04-05 Thread Eric Abrahamsen
Sorry, wrote too soon. http://tn123.ath.cx/mod_xsendfile/ Guess I'll have to serve the files from django's apache, not my other media server, but it seems like this will do it. E On Apr 6, 12:25 pm, Eric Abrahamsen <[EMAIL PROTECTED]> wrote: > > If you are using Apache or lighttpd as a

Re: Getting a field's type from within a template

2008-04-05 Thread Malcolm Tredinnick
On Sat, 2008-04-05 at 19:34 -0700, Julien wrote: > Hi, > > I'm using templates to customize the way my forms are displayed. I'd > like to display fields differently depending on their type. > > In python code I can do: > > type = field.field.widget.__class__.__name__ > (considering the field

Re: CheckboxSelectMultiple under modelform

2008-04-05 Thread Malcolm Tredinnick
On Sat, 2008-04-05 at 07:32 -0700, Iamnewbie wrote: > I want to use CheckboxSelectMultiple (checkbox) under modelform > instead of default ModelMultipleChoiceField settings. > > my codes are as follows: > > > class Form(ModelForm): > > def __init__(self, *args, **kwargs): > >

Re: Calendar app: how to model reccurring events?

2008-04-05 Thread Malcolm Tredinnick
On Sat, 2008-04-05 at 02:49 -0700, Benjamin Wohlwend wrote: [...] > My second idea was to use the fancy new model inheritance of the > queryset-refactor branch. Specifically I would use multi-table > inheritance. A parent model, 'Event' contains data like owner > (ForeignKey to User) and date.

Re: Serving binary files "through" django

2008-04-05 Thread Eric Abrahamsen
> If you are using Apache or lighttpd as a frontend-proxy you can use a > similar aproach with: X-Sendfile. I'd like to do something along these lines as well – keep files in a protected directory and only allow them to be served if Django says so. I'm serving static media from a different

Re: Custom ID field with random string

2008-04-05 Thread Peter of the Norse
On Mar 31, 2008, at 6:20 AM, Julien wrote: > What do you think is best practice? Also, how do you explain that > youtube, for example, only uses a dozen characters (and not 36 like a > UUID) to identify videos? UUIDs are designed to be unique within a database no matter how many tables or

Getting a field's type from within a template

2008-04-05 Thread Julien
Hi, I'm using templates to customize the way my forms are displayed. I'd like to display fields differently depending on their type. In python code I can do: type = field.field.widget.__class__.__name__ (considering the field is an instance of django.newforms.forms.BoundField) However, I

Re: relative link problem with admin login

2008-04-05 Thread MrJogo
My urls.py file is (I only used the non-testing part): from django.conf.urls.defaults import * urlpatterns = patterns('', ('', url(r'^~mysite/', include('mysite.mysiteurls'))), ) And my mysiteurls.py file: from django.conf.urls.defaults import * urlpatterns = patterns('', url(r'^admin/',

Widgets with an error class

2008-04-05 Thread J . Pablo Fernández
Hello, Is there some way to add a class="error" or wrap the inputs in a when the field has a validation error? Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: Printing only the radio input

2008-04-05 Thread J . Pablo Fernández
Just for the record, I kind of fixed it and submitted the new patch, with an added feature. On Apr 5, 8:42 pm, J. Pablo Fernández <[EMAIL PROTECTED]> wrote: > Thank you Nathaniel, > > I gave this code a try and it didn't work. It seems to be on track but > something is broken. I've submitted a

More Advanced Forms Help

2008-04-05 Thread Chris Hartjes
Thanks to all who made suggestions before. Now I have another problem I have been unable to find a way to solve in Django. Here's the scenario: I have the variable games, which contains (oddly enough) games I have the variable stadium_forms, which contains a form for each game that displays a

Re: Django admin Error at /admin/auth/user/1/?

2008-04-05 Thread Karen Tracey
On Sat, Apr 5, 2008 at 1:43 AM, Sky <[EMAIL PROTECTED]> wrote: > > my site is hosted by Dreamhost, Dreamhost can use DATABASE_ENGINE = > 'mysql_old' for djngo, my django admin panel broken at /admin/auth/ > user/1/ , but /admin/auth/user/1/password/ is fine > and on my local compute I used

Re: EmailMessage and BCC fields

2008-04-05 Thread Karen Tracey
On Sat, Apr 5, 2008 at 7:06 PM, Tim Sawyer <[EMAIL PROTECTED]> wrote: > > Hi Folks, > > I've just sent an email using EmailMessage setting the bcc field to be a > list > of recipients. It sent the email, to the correct recipients, but all my > addresses are visible in the mail header, in an

Re: Configure Mod_Python fo Django on Apache server on Ubuntu

2008-04-05 Thread HangingClowns
What's the syntax for that? Is that like that chmod? On Apr 5, 5:08 pm, Michael <[EMAIL PROTECTED]> wrote: > Simply django can't find your settings.py file. This could be a few things > but based on where the file is located my bet is that the apache process > (most likely www-data on ubuntu)

EmailMessage and BCC fields

2008-04-05 Thread Tim Sawyer
Hi Folks, I've just sent an email using EmailMessage setting the bcc field to be a list of recipients. It sent the email, to the correct recipients, but all my addresses are visible in the mail header, in an email header called bcc. It's not supposed to do that is it, hence the B bit of the

Cycle Tag Question

2008-04-05 Thread Kevin Monceaux
Django Fans, When used inside a loop is there any way to have the cycle tag simply cycle through the given strings/variables each time it's called regardless of the loop index? The spot I need to use the cycle tag within my loop is inside an ifchanged block, so the cycle tag is not called on

Re: Configure Mod_Python fo Django on Apache server on Ubuntu

2008-04-05 Thread Michael
Simply django can't find your settings.py file. This could be a few things but based on where the file is located my bet is that the apache process (most likely www-data on ubuntu) doesn't have permissions to access your settings.py file. Give www-data permissions to access the file and you should

Configure Mod_Python fo Django on Apache server on Ubuntu

2008-04-05 Thread HangingClowns
I should have the latest versions available for Apache and mod_python cause I just put those onto my server about 2 weeks ago. I'm having trouble understanding how to edit the Apache config file for Django. I currently use the code snippet below for my settings in Apache. And this is what the

Re: newforms initial value

2008-04-05 Thread Matias Surdi
Matias Surdi escribió: > Hi. > > How can I pass an initial value to a newforms form's widget? > > I know that there is an "initial" parameter for widgets, but what if I > don't know that parameter's value beforehand? > > What I'm trying to do is to be able to make a request to an url and >

newforms initial value

2008-04-05 Thread Matias Surdi
Hi. How can I pass an initial value to a newforms form's widget? I know that there is an "initial" parameter for widgets, but what if I don't know that parameter's value beforehand? What I'm trying to do is to be able to make a request to an url and depending on some url parameters generate

Re: Serving binary files "through" django

2008-04-05 Thread Thomas Kerpe
Hello Tim Am 05.04.2008 um 21:19 schrieb Tim Sawyer: > > I'd like to have a site that gives away and sells PDFs, and tracks > downloads > of those PDFs. I hope I got your question right. I have a little bit different aproach since django never serves the file directly. If you are using

Sphinx Full-Text Search

2008-04-05 Thread David Cramer
I know some of you out there use my full-text layer relying on Sphinx in Django. I released a new version yesterday, which on my initial tests is fully backwards compatible. So the point, what I'm looking for, is has anyone put the new version to use yet? If not, can you try it on your working

Re: Serving binary files "through" django

2008-04-05 Thread Matthias Kestenholz
On Sat, 2008-04-05 at 20:19 +0100, Tim Sawyer wrote: > Hi Folks, > > I'd like to have a site that gives away and sells PDFs, and tracks downloads > of those PDFs. For example, I'd like to know the IP address/useragent of who > downloaded the free files, and I'd like to record the same plus

Re: Printing only the radio input

2008-04-05 Thread J . Pablo Fernández
Thank you Nathaniel, I gave this code a try and it didn't work. It seems to be on track but something is broken. I've submitted a comment about it to the issue itself. Thank you. On Apr 5, 4:36 pm, Nathaniel Whiteinge <[EMAIL PROTECTED]> wrote: > On Apr 5, 6:36 am, J. Pablo Fernández <[EMAIL

Re: Serving binary files "through" django

2008-04-05 Thread [EMAIL PROTECTED]
You would do something like this: http://www.djangoproject.com/documentation/outputting_pdf/ but instead of generating the pdf you could just serve a file object. On Apr 5, 2:19 pm, Tim Sawyer <[EMAIL PROTECTED]> wrote: > Hi Folks, > > I'd like to have a site that gives away and sells PDFs,

Serving binary files "through" django

2008-04-05 Thread Tim Sawyer
Hi Folks, I'd like to have a site that gives away and sells PDFs, and tracks downloads of those PDFs. For example, I'd like to know the IP address/useragent of who downloaded the free files, and I'd like to record the same plus the logged in user for the pay ones (after authenticating the

Re: Memory Usage/Optimization Question

2008-04-05 Thread Eric Abrahamsen
Also, if you haven't already, I'd definitely recommend switching to mod_wsgi. I'm in the same boat as you – django apps on webfaction, running up against memory limits (to the point where I was getting my sites shut down); I started using mod_wsgi recently and haven't had any trouble

Personal Injury

2008-04-05 Thread health3
Personal injury lawyers in your area. Personal injury case money now. Personal injury settlement info. http://www.health3.com.cn/health/Personal-Injury.htm --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

Re: Printing only the radio input

2008-04-05 Thread Nathaniel Whiteinge
On Apr 5, 6:36 am, J. Pablo Fernández <[EMAIL PROTECTED]> wrote: > and what I want to do is print the individuals type="radio" ...> without any label, list or anything. No, this isn't currently possible. If you don't mind patching your Django installation, there's a ticket [1] with a patch

CheckboxSelectMultiple under modelform

2008-04-05 Thread Iamnewbie
I want to use CheckboxSelectMultiple (checkbox) under modelform instead of default ModelMultipleChoiceField settings. my codes are as follows: class Form(ModelForm): def __init__(self, *args, **kwargs): super(Form, self).__init__(*args, **kwargs)

any advise is appreciated

2008-04-05 Thread keith
I was thinking of using Lighttp on one of the 760 servers. Is there a "best OS" to make setup go smoothly, I would like to run the svn version to be sure to have all of the latest features. Any tips or references are very welcome. I need to develop then move to production on same server.

Using E-Mail address to log in.

2008-04-05 Thread Maximillian Dornseif
This might be useful to somebody else" Our users wanted to use their E-Mail address instead of the username to log in. So we wrothe an authentication backend which enables to use either username or email address in the username field when logging into django. It is part of the huDjango package

Printing only the radio input

2008-04-05 Thread J . Pablo Fernández
Hello, I have a ChoicesField defined like this: blah = forms.ChoiceField( choices=SOME_CHOICES, widget=forms.RadioSelect, initial=SOME_CHOICES[0][0]) and what I want to do is print the individuals without any label, list or anything. The reason to do that is because I have a very

Re: Memory Usage/Optimization Question

2008-04-05 Thread Fredrik Lundh
Garrett Garcia wrote: > I recently got my first django project set up on webfaction and am > feeling the constraint of their memory usage limits. > For example: > > I have a view that returns a list of objects: > > def get_meet_results(request, meet_id): > meet =

Memory Usage/Optimization Question

2008-04-05 Thread Garrett Garcia
I recently got my first django project set up on webfaction and am feeling the constraint of their memory usage limits. For example: I have a view that returns a list of objects: def get_meet_results(request, meet_id): meet = Meet.objects.get(pk=meet_id) year = meet.start.year

Re: "get next" and "get last" on any field?

2008-04-05 Thread 1234
*get next* = Info.objects.filter(id__gt=newsid).order_by('id')[:1] *get last* = Info.objects.filter(id__lt=newsid).order_by('id')[:1] 2008/4/5, SlowLearner <[EMAIL PROTECTED]>: > > > Hi, I am hoping there is a better solution to my problem than the one > I have come up with, or one built in to

"get next" and "get last" on any field?

2008-04-05 Thread SlowLearner
Hi, I am hoping there is a better solution to my problem than the one I have come up with, or one built in to the django models. I would like to include "get next" and "get last" buttons on my view. The catch is that I want to do get next, get last on an integer field (which is not a primary

Re: Weird unicode errors when using cutsom sql

2008-04-05 Thread shabda
Ouch, there was a % in the generated SQL. Guess I should have debugged a little more before posting here. :) On Apr 5, 1:44 pm, shabda <[EMAIL PROTECTED]> wrote: > I am using MYSql with latin-1 encoding. > > I get some weird intermittent errors when using custom sql. I have a > large

Re: Postgres and Fixtures

2008-04-05 Thread SlowLearner
> > Thanks, I'll give that a go next time I reload the database. I tried it and it complained that sequencereset was not a valid option. However, looking in the help there is a 'sqlsequencereset' option. Running: ./manage.py sqlsequencereset Brought up a list of the setval commands to run to