got error when use code of djangobook chapter 7 for searching

2008-01-19 Thread [EMAIL PROTECTED]

all code came from here:
http://djangobook.com/en/1.0/chapter07/

in my view:
def search(request):
query = request.GET.get('q', '')
if query:
qset = (
Q(title__icontains=query) |
Q(forum__title__icontains=query) |
Q(color__icontains=query)
)
results = Thread.objects.filter(qset).distinct()
else:
results = []

return render_to_response("groups/search.html", {
"results": results,
"query": query
})


when running, got this error:
ValueError at /groups/search/
The view groups.views.search didn't return an HttpResponse object.

thanks!
--~--~-~--~~~---~--~~
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.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: got error when use code of djangobook chapter 7 for searching

2008-01-19 Thread [EMAIL PROTECTED]

it is ok now, due to aligning of   return render_to_response("groups/
search.html", {




On 1月19日, 下午4时28分, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> all code came from here:http://djangobook.com/en/1.0/chapter07/
>
> in my view:
> def search(request):
> query = request.GET.get('q', '')
> if query:
> qset = (
> Q(title__icontains=query) |
> Q(forum__title__icontains=query) |
> Q(color__icontains=query)
> )
> results = Thread.objects.filter(qset).distinct()
> else:
> results = []
>
> return render_to_response("groups/search.html", {
> "results": results,
> "query": query
> })
>
> when running, got this error:
> ValueError at /groups/search/
> The view groups.views.search didn't return an HttpResponse object.
>
> thanks!
--~--~-~--~~~---~--~~
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.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: got error when use code of djangobook chapter 7 for searching

2008-01-19 Thread Fredrik Lundh

[EMAIL PROTECTED] wrote:

> all code came from here:
> http://djangobook.com/en/1.0/chapter07/

> in my view:
> def search(request):
> query = request.GET.get('q', '')
> if query:
> qset = (
> Q(title__icontains=query) |
> Q(forum__title__icontains=query) |
> Q(color__icontains=query)
> )
> results = Thread.objects.filter(qset).distinct()
> else:
> results = []
> 
>   return render_to_response("groups/search.html", {
> "results": results,
> "query": query
> })

indentation matters in Python.

for the above code to work, the return statement should be aligned with 
the "if" statement, not the "results = []"

judging from your post, you've used spaces for some of the indents and 
4-space tabs for others.  the python interpreter does allow tabs for 
indentation, but assumes that they have the standard size (8 spaces).  I 
suggest configuring your editor to prevent it from inserting tabs, or at 
least configuring it to use 8-space tabs.

(and if your editor doesn't allow you to configure indentation size 
independently from tab size, get a better editor...)




--~--~-~--~~~---~--~~
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.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



limit_choices_to in ModelForm

2008-01-19 Thread Kenneth Gonsalves

hi,
I have a limit_choices_to in my model - but this does work on my  
ModelForm. How do I do this?
-- 

regards
kg
http://lawgon.livejournal.com
http://nrcfosshelpline.in/web/
Foss Conference for the common man: http://registration.fossconf.in/web/



--~--~-~--~~~---~--~~
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.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Django Tutorial02 / TEMPLATE_DIRS

2008-01-19 Thread code_berzerker

This was one of my most stupid problems. PyDev with RSE was not saving
file fo linux virtual machine correctly and this caused the problem.

Thank you for all the help. I hope, I'll come up with wiser problems
next time ;)
--~--~-~--~~~---~--~~
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.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Free softwares & more only @... ns-ismail.page.tl

2008-01-19 Thread [EMAIL PROTECTED]

Hai friends
Log on to http://ns-ismail.page.tl/ to get (download) software's and
all other accessories for free in http://ns-ismail.page.tl/ .
To get free gift's Log on to http://ns-ismail.page.tl/ and so on.
The site consist of many useful material's like Google search, games,
and etc.
Download Free pictures and wallpaper in http://ns-ismail.page.tl/  .
You can earn money through http://ns-ismail.page.tl/ also.
Every thing is free in this site.
Thanking You!!

--~--~-~--~~~---~--~~
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.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: svn hook to update dev server svn & restart server.

2008-01-19 Thread dall

also I get this error when I commit:

Warning: 'post-commit' hook failed with error output:
svn: Can't open file '.svn/lock': Permission denied

--~--~-~--~~~---~--~~
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.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



ImageField Example

2008-01-19 Thread Darthmahon

Hey,

Does anyone have a working example of uploading images using Django?
I've looked extensively and haven't found anything - any idea how I
save images using Django? I've put an ImageField in my model with the
path to where it should save, but how do I tell Django to save it when
a form is submitted? I'm using NewForms btw.

Cheers,
Chris
--~--~-~--~~~---~--~~
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.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



svn hook to update dev server svn & restart server.

2008-01-19 Thread dall

Hello,

Now I'm trying to create svn post-commit hook, who will update dev
server svn and restart server.

post-commit

#!/bin/bash

PROJDIR="/opt/system/chill"
PIDFILE="$PROJDIR/chill.pid"
SOCKET="$PROJDIR/chill.sock"

cd $PROJDIR && svn update && ./restart.sh


restart.sh

#!/bin/bash

# Replace these three settings.
PROJDIR="/opt/system/chill"
PIDFILE="$PROJDIR/chill.pid"
SOCKET="$PROJDIR/chill.sock"

cd $PROJDIR
if [ -f $PIDFILE ]; then
kill `cat -- $PIDFILE`
rm -f -- $PIDFILE
fi

exec /usr/bin/env - \
  PYTHONPATH="../python:.." \
  ./manage.py runfcgi socket=$SOCKET pidfile=$PIDFILE


but I got error on restart.sh execution ": No such file or directory"

don't know what is the problem, help!
--~--~-~--~~~---~--~~
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.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: best practices for a production site

2008-01-19 Thread Ned Batchelder
Updating to just a particular revision may work, but it is very easy for 
the trunk to get into a state where it would be hard to pick out just 
the fixes by updating specific files to specific revisions.  This is 
labor intensive and confusing, and therefore error prone.

Other people in this thread have suggested branches for the fixes, 
rather than branches for the features, and I agree with them. It works 
very well to use branches this way, since the minority of trunk checkins 
will have to be merged onto the fixes branch, most of your development 
is simple a checkin-to-the-trunk model.  Only when you have a fix that 
needs to leapfrog ahead of the feature work do you need to merge anything.

--Ned.
http://nedbatchelder.com

Kenneth Gonsalves wrote:
> On 18-Jan-08, at 9:54 PM, William Siegrist wrote:
>
>   
>> If the spelling changes are in 1 file, and the new feature is in  
>> another file, can't you "svn update" just the spelling change file  
>> and not the new feature file? And if they are in the same file, I  
>> think the --revision option to svn update might also help.
>> 
>
> I am an idiot - why didnt I think of that?
>
>   


--~--~-~--~~~---~--~~
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.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



manage.py dbshell not working

2008-01-19 Thread shabda

I am trying to use the manage.py dbshell call. I give the command,
F:\djangoprojects\polls>manage.py dbshell
This is giving me an error like
 F:\djangoprojects\polls> ERROR 1045 (28000): Access denied for user
'ODBC'@'localhost' (using password: NO)
However in my settings.py I have set the user and password.
django\db\backends\mysql\client.py is the file which is used when
manage.py dbshell is used, so I modified the file to print the
arguments passed to
os.execvp('mysql', args)
call. This prints the value of args as expected.

F:\djangoprojects\polls>manage.py dbshell
['', '--user=root', '--password=081084', 'pollngo']

F:\djangoprojects\polls> ERROR 1045 (28000): Access denied for user
'ODBC'@'localhost' (using password: NO)

What am I missing?
--~--~-~--~~~---~--~~
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.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: got error when use code of djangobook chapter 7 for searching

2008-01-19 Thread [EMAIL PROTECTED]

Yes, you are right.
i use Editplus, i found this is a big problem.
thanks!


> indentation matters in Python.
>
> for the above code to work, the return statement should be aligned with
> the "if" statement, not the "results = []"
>
> judging from your post, you've used spaces for some of the indents and
> 4-space tabs for others.  the python interpreter does allow tabs for
> indentation, but assumes that they have the standard size (8 spaces).  I
> suggest configuring your editor to prevent it from inserting tabs, or at
> least configuring it to use 8-space tabs.
>
> (and if your editor doesn't allow you to configure indentation size
> independently from tab size, get a better editor...)
>
> 
--~--~-~--~~~---~--~~
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.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



ANN: Django meetup @Bangalore, India on 26th Jan

2008-01-19 Thread Ramdas S
The Bangalore Python User Group, BangPypers is planning a Django special
meetup on the 26th of January 2008, Saturday.


 The venue is


*ThoughtWorks Technologies (India) Pvt Ltd.
2nd Floor, Tower C, Corporate Block, Diamond District
Airport Road, Bangalore - 560 008, India
t: +91 80 2508 9572
f: +91 80 2508 9584*



 *Agenda*


a discussion on state of Django development/ usage in the country

to build a platform for Django developers in Bangalore to get together and
exchange notes, learn and get to know the kind of work which is happening.

We might have a talk or two, however nothing is finalized. If you want to
share your knowledge, post a proposal on [EMAIL PROTECTED] . Try
avoiding beginners topic.




 If you are a django developer from Bangalore, or is likely to be in
Bangalore around the time, do come and meet us.



 Thanks





 Ramdas

--~--~-~--~~~---~--~~
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.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Running django+apache on my macbook

2008-01-19 Thread Heather

You have to do some editing to make it work for 64 bit.  If you google
mod_python leopard 64 bit you'll find some pages.  Here is one...
http://blog.wired.com/monkeybites/2007/11/tips-and-tricks.html
I have a macbook pro and am running django w/ mod_python and the built
in apache2 and mysql.


On Jan 18, 11:51 pm, John M <[EMAIL PROTECTED]> wrote:
> Thakn you Graham, thats what I'm talking about.  I just finished
> trying to compile mod_python, and it's not working, and I figured it
> was something like that.
>
> So it's off to try mod_wsgi.
>
> Thanks
>
> J
>
> On Jan 18, 4:29 pm, Graham Dumpleton <[EMAIL PROTECTED]>
> wrote:
>
> > On Jan 19, 8:49 am, John M <[EMAIL PROTECTED]> wrote:
>
> > > I guess I wasn't clear on the PURPOSE to do it, experience, not
> > > practicality.
>
> > > I love the built-in django server, it's awesome, how much easier could
> > > anyone make it, I think none.  But, I wanted to get ready for what it
> > > might be like to deploy django at a hosting facility, or maybe even on
> > > a home setup in Apache, thats all.  Since I have a macbook, with
> > > Apache 2 installed, I figured I'd try it.  after checking the config
> > > and various googles, it turns out that gettingmod_pythonon the mac
> > > os X might not be as easy as say a debian apt-get kind of thing :).
>
> > > So, back to the question, how do I get a mac book with stock apache
> > > installed, to run django?
>
> > Simple, don't use mod_python as it hasn't been patched to build
> > cleanly on a 64bit Intel MacOSX Leopard machine. Use instead mod_wsgi
> > 2.0 (RC) as it will build out of the box on MacOSX. See:
>
> >  http://www.modwsgi.org
> >  http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango
> >  http://code.google.com/p/modwsgi/wiki/InstallationOnMacOSX
>
> > Graham
>
> > > Thanks
>
> > > John
>
> > > On Jan 18, 12:08 pm, Christian Joergensen <[EMAIL PROTECTED]> wrote:
>
> > > > John M wrote:
> > > > > OK,
>
> > > > > So I know Linux / Apache pretty well, never really done any hard-core
> > > > > stuff with it.  Now I want to use apache on my macbook (intel) OSx
> > > > > 10.5 (upgrade),but have no clue about how to do it.
>
> > > > > Googling for how to installmod_pythonresults in a lot of issues from
> > > > > what I can find, 64bit vs 32bit, etc.
>
> > > > > So my question is, whats the easiest way to just get my macbook intel
> > > > > 10.5 to run apache and Django.
>
> > > > You don't really need Apache andmod_pythonfor developing Django, just
> > > > use the built-in webserver.
>
> > > > Take a look here:http://www.djangoproject.com/documentation/install/
>
> > > > Note the first paragraph of "Install Apache andmod_python". Developing
> > > > your applications undermod_pythonis quite a hassle IMO.
>
> > > > Regards,
>
> > > > --
> > > > Christian Joergensen | Linux, programming or web 
> > > > consultancyhttp://www.razor.dk|   Visit us at:http://www.gmta.info
--~--~-~--~~~---~--~~
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.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



admin page seg faults

2008-01-19 Thread Heather

Has anyone had this problem and fixed it?  This is happening using
apache2, mod_python, & mysql on ubuntu.  The rest of the site works
just fine.  I have the same exact project on my development machine
(os x, apache2, mod_python, mysql) and there is no problem at all w/
the admin.  I am at a loss.  The only other reference I have found w/
respect to the admin page seg faulting had to do w/ python and apache
using different versions of expat but I've checked and this isn't the
case.  Ideas?  The only other "weirdness" I can think of w/ this setup
is that I am not able to update mysqldb at this moment so I have to
use mysql_old in the settings file but not on my development machine.

Thanks
Heather
--~--~-~--~~~---~--~~
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.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Running django+apache on my macbook

2008-01-19 Thread luxagraf

Since I wrote that little guide Heather links to, I should point out
that while the mod_python bit works fine, the real problem on a
macbook with Leopard installed ends up being mysqldb (see
). I never have
been able to successful compile a version of mysqldb that would work
with Leopard's default Apache and MySQL.

In the end I wanted to mirror my remote production setup as closely a
possible so I went ahead and installed my own Apache2, python 2.4 and
the rest (OS X 10.5 comes with python 2.5, which can cause problems
when your production environment is python2.4).

But if you have any questions, feel free to e-mail me.

cheers
sng


On Jan 19, 2008 10:32 AM, Heather <[EMAIL PROTECTED]> wrote:
>
> You have to do some editing to make it work for 64 bit.  If you google
> mod_python leopard 64 bit you'll find some pages.  Here is one...
> http://blog.wired.com/monkeybites/2007/11/tips-and-tricks.html
> I have a macbook pro and am running django w/ mod_python and the built
> in apache2 and mysql.
>
>
> On Jan 18, 11:51 pm, John M <[EMAIL PROTECTED]> wrote:
> > Thakn you Graham, thats what I'm talking about.  I just finished
> > trying to compile mod_python, and it's not working, and I figured it
> > was something like that.
> >
> > So it's off to try mod_wsgi.
> >
> > Thanks
> >
> > J
> >
> > On Jan 18, 4:29 pm, Graham Dumpleton <[EMAIL PROTECTED]>
> > wrote:
> >
> > > On Jan 19, 8:49 am, John M <[EMAIL PROTECTED]> wrote:
> >
> > > > I guess I wasn't clear on the PURPOSE to do it, experience, not
> > > > practicality.
> >
> > > > I love the built-in django server, it's awesome, how much easier could
> > > > anyone make it, I think none.  But, I wanted to get ready for what it
> > > > might be like to deploy django at a hosting facility, or maybe even on
> > > > a home setup in Apache, thats all.  Since I have a macbook, with
> > > > Apache 2 installed, I figured I'd try it.  after checking the config
> > > > and various googles, it turns out that gettingmod_pythonon the mac
> > > > os X might not be as easy as say a debian apt-get kind of thing :).
> >
> > > > So, back to the question, how do I get a mac book with stock apache
> > > > installed, to run django?
> >
> > > Simple, don't use mod_python as it hasn't been patched to build
> > > cleanly on a 64bit Intel MacOSX Leopard machine. Use instead mod_wsgi
> > > 2.0 (RC) as it will build out of the box on MacOSX. See:
> >
> > >  http://www.modwsgi.org
> > >  http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango
> > >  http://code.google.com/p/modwsgi/wiki/InstallationOnMacOSX
> >
> > > Graham
> >
> > > > Thanks
> >
> > > > John
> >
> > > > On Jan 18, 12:08 pm, Christian Joergensen <[EMAIL PROTECTED]> wrote:
> >
> > > > > John M wrote:
> > > > > > OK,
> >
> > > > > > So I know Linux / Apache pretty well, never really done any 
> > > > > > hard-core
> > > > > > stuff with it.  Now I want to use apache on my macbook (intel) OSx
> > > > > > 10.5 (upgrade),but have no clue about how to do it.
> >
> > > > > > Googling for how to installmod_pythonresults in a lot of issues from
> > > > > > what I can find, 64bit vs 32bit, etc.
> >
> > > > > > So my question is, whats the easiest way to just get my macbook 
> > > > > > intel
> > > > > > 10.5 to run apache and Django.
> >
> > > > > You don't really need Apache andmod_pythonfor developing Django, just
> > > > > use the built-in webserver.
> >
> > > > > Take a look here:http://www.djangoproject.com/documentation/install/
> >
> > > > > Note the first paragraph of "Install Apache andmod_python". Developing
> > > > > your applications undermod_pythonis quite a hassle IMO.
> >
> > > > > Regards,
> >
> > > > > --
> > > > > Christian Joergensen | Linux, programming or web 
> > > > > consultancyhttp://www.razor.dk|   Visit us at:http://www.gmta.info
> >
>

--~--~-~--~~~---~--~~
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.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Running django+apache on my macbook

2008-01-19 Thread John M

sng, Thank you for the offer.  Thats a great idea, and one I will
probably purse, and if I have any issues, I'll post them here, but
thanks for the phone offer, thats is most generous.

John


On Jan 19, 10:30 am, luxagraf <[EMAIL PROTECTED]> wrote:
> Since I wrote that little guide Heather links to, I should point out
> that while the mod_python bit works fine, the real problem on a
> macbook with Leopard installed ends up being mysqldb (see
> ). I never have
> been able to successful compile a version of mysqldb that would work
> with Leopard's default Apache and MySQL.
>
> In the end I wanted to mirror my remote production setup as closely a
> possible so I went ahead and installed my own Apache2, python 2.4 and
> the rest (OS X 10.5 comes with python 2.5, which can cause problems
> when your production environment is python2.4).
>
> But if you have any questions, feel free to e-mail me.
>
> cheers
> sng
> 
>
> On Jan 19, 2008 10:32 AM, Heather <[EMAIL PROTECTED]> wrote:
>
>
>
> > You have to do some editing to make it work for 64 bit.  If you google
> > mod_python leopard 64 bit you'll find some pages.  Here is one...
> >http://blog.wired.com/monkeybites/2007/11/tips-and-tricks.html
> > I have a macbook pro and am running django w/ mod_python and the built
> > in apache2 and mysql.
>
> > On Jan 18, 11:51 pm, John M <[EMAIL PROTECTED]> wrote:
> > > Thakn you Graham, thats what I'm talking about.  I just finished
> > > trying to compile mod_python, and it's not working, and I figured it
> > > was something like that.
>
> > > So it's off to try mod_wsgi.
>
> > > Thanks
>
> > > J
>
> > > On Jan 18, 4:29 pm, Graham Dumpleton <[EMAIL PROTECTED]>
> > > wrote:
>
> > > > On Jan 19, 8:49 am, John M <[EMAIL PROTECTED]> wrote:
>
> > > > > I guess I wasn't clear on the PURPOSE to do it, experience, not
> > > > > practicality.
>
> > > > > I love the built-in django server, it's awesome, how much easier could
> > > > > anyone make it, I think none.  But, I wanted to get ready for what it
> > > > > might be like to deploy django at a hosting facility, or maybe even on
> > > > > a home setup in Apache, thats all.  Since I have a macbook, with
> > > > > Apache 2 installed, I figured I'd try it.  after checking the config
> > > > > and various googles, it turns out that gettingmod_pythonon the mac
> > > > > os X might not be as easy as say a debian apt-get kind of thing :).
>
> > > > > So, back to the question, how do I get a mac book with stock apache
> > > > > installed, to run django?
>
> > > > Simple, don't use mod_python as it hasn't been patched to build
> > > > cleanly on a 64bit Intel MacOSX Leopard machine. Use instead mod_wsgi
> > > > 2.0 (RC) as it will build out of the box on MacOSX. See:
>
> > > >  http://www.modwsgi.org
> > > >  http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango
> > > >  http://code.google.com/p/modwsgi/wiki/InstallationOnMacOSX
>
> > > > Graham
>
> > > > > Thanks
>
> > > > > John
>
> > > > > On Jan 18, 12:08 pm, Christian Joergensen <[EMAIL PROTECTED]> wrote:
>
> > > > > > John M wrote:
> > > > > > > OK,
>
> > > > > > > So I know Linux / Apache pretty well, never really done any 
> > > > > > > hard-core
> > > > > > > stuff with it.  Now I want to use apache on my macbook (intel) OSx
> > > > > > > 10.5 (upgrade),but have no clue about how to do it.
>
> > > > > > > Googling for how to installmod_pythonresults in a lot of issues 
> > > > > > > from
> > > > > > > what I can find, 64bit vs 32bit, etc.
>
> > > > > > > So my question is, whats the easiest way to just get my macbook 
> > > > > > > intel
> > > > > > > 10.5 to run apache and Django.
>
> > > > > > You don't really need Apache andmod_pythonfor developing Django, 
> > > > > > just
> > > > > > use the built-in webserver.
>
> > > > > > Take a look here:http://www.djangoproject.com/documentation/install/
>
> > > > > > Note the first paragraph of "Install Apache andmod_python". 
> > > > > > Developing
> > > > > > your applications undermod_pythonis quite a hassle IMO.
>
> > > > > > Regards,
>
> > > > > > --
> > > > > > Christian Joergensen | Linux, programming or web 
> > > > > > consultancyhttp://www.razor.dk|  Visit us at:http://www.gmta.info
--~--~-~--~~~---~--~~
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.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



How sublcass a form and get the fields not on top?

2008-01-19 Thread mamcxyz

Hi, I have a community website where is important set the city of
difierent things (events, news, etc...).

So, I have this form:

class CityForm(forms.Form):
country = forms.ModelChoiceField(queryset=Country.objects.all(),
help_text=u'País del evento. Para eventos en internet o en varias
ciudades no elegir ninguna.', required=True, label=u'País')
state = forms.CharField(max_length=50, help_text=u'Departamento
del evento', required=True, label=u'Departamento / Estado')
city = forms.CharField(max_length=50,help_text=u'Ciudad del
evento.', required=True, label=u'Ciudad')

def getCity(self,depto,cityName):
depto = State.objects.filter(id=int(depto))[0]

if City.objects.filter(name=cityName).count()==0:
City(name=cityName,depto=depto).save()

return City.objects.filter(name=cityName)[0]

def getDepto(self,country,deptoName):
pais = Country.objects.filter(id=int(country))[0]

if State.objects.filter(name=deptoName).count()==0:
State(name=deptoName,country=pais).save()

return State.objects.filter(name=deptoName)[0]

However, if I subclass this form this fields get on TOP of it (I
prefer have it on bottom or in the middle). Exist a way to control
this?
--~--~-~--~~~---~--~~
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.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Strange Many-to-Many relationship question

2008-01-19 Thread Darthmahon

Hi,

I'm using the built in authentication of Django, so new users who
register go through the User model. I also have a custom UserProfile
model that links directly to the User model via a ForeignKey.

This is my completed UserProfile model:


# File: people/models.py

class UserProfile(models.Model):
user = models.ForeignKey(User, unique=True)
gender = models.CharField(maxlength=100, choices=GENDER_CHOICES,
blank=True)
birthday = models.DateField(blank=True)
living = models.ForeignKey(Locations, blank=True)
friends = models.ManyToManyField(User, blank=True,
related_name='friend_set')
avatar = models.ImageField(upload_to='photos/', blank=True,
null=True)


The part I am having a slight problem with is the friends field. As
you can see it has a ManyToMany relationship with User, which is fine.
I can add add friends without any problems, but when it comes to
accessing the list of friends I'm having some problems seeing the
Avatar and Gender, which live within UserProfile.

This is how I am pulling out the data:


# File: people/views.py

def people_friends(request,u):
user = UserProfile.objects.get(user=u)
friends = user.friends.all()

# Use the object list view for the heavy lifting
return list_detail.object_list(
request,
queryset = friends,
template_name = "people/people_by_user.html",
template_object_name = "people"
)


And then in my template file I am printing them like this:


# File: templates/people/people_by_user.html

{% for people in people_list %}
{{ people.username }}
{{ people.avatar }}
{% endfor %}


As mentioned above, the problem is people.avatar doesn't print
anything. I tried people.userprofile.avatar but again, nothing
happens...

Any ideas? Do I need to setup a ManyToMany with an intermediary table
or something?

Cheers,
Chris
--~--~-~--~~~---~--~~
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.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Help with either setting or lack of knowledge of Custom error_class

2008-01-19 Thread Roboto

I've made my own custom error list and the response I continue to get
is this when I try to use it.

TypeError at /login/
__init__() got an unexpected keyword argument 'error_class'
Request Method: POST
Request URL:http://beta.ready-ready.org/login/
Exception Type: TypeError
Exception Value:__init__() got an unexpected keyword argument
'error_class'
Exception Location: /home/advanced/rchan/lib/python/beta/website/
views.py in viewLogin, line 22

I can't figure it out... did I code something wrong? or is django not
being able to recognize the error_class arguement?

here is my views.py
http://pastebin.com/m7a1ce7fb

here is my custom error list from my forms.py
http://pastebin.com/m6d4c1c03

any ideas would be greatly appreciated!

--~--~-~--~~~---~--~~
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.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



How to check if my 1-1 record is there?

2008-01-19 Thread John M

I am using a one-to-one relationship (I know I know...), and i'm using
the Super() to create the record in one of my save() routines.

My question is, how do I check to see if a record is already linked to
an existing 1-1 record?

For example

Model A():
   Field 1 = charfield()
   field 2 = charfield()

   def save(self):
  Super(modelA, self)

<<<  how can I tell if i have already created a Mb?

  Mb = ModelB()
  Mb.ModelA = self
  Mb.save()

Model b():
   onetoonerecord = models.onetoonefield(modelA)
   field A = charfield()
   field B = charfield()


Basically, in the save() routine, is there a way to check if the 1-1
is already there?

thanks

John

--~--~-~--~~~---~--~~
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.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Strange Many-to-Many relationship question

2008-01-19 Thread Alex Koshelev

In your template people_list is list of UserProfile instances so
avatar is accessed by {{people.avatar}}
If you try to iterate through friends that you can access to avatar
like so:
{{friend.get_profile.avatar}}
Of course if you set proper AUTH_PROFILE_MODULE setting.

On 19 янв, 22:24, Darthmahon <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm using the built in authentication of Django, so new users who
> register go through the User model. I also have a custom UserProfile
> model that links directly to the User model via a ForeignKey.
>
> This is my completed UserProfile model:
>
> 
> # File: people/models.py
> 
> class UserProfile(models.Model):
> user = models.ForeignKey(User, unique=True)
> gender = models.CharField(maxlength=100, choices=GENDER_CHOICES,
> blank=True)
> birthday = models.DateField(blank=True)
> living = models.ForeignKey(Locations, blank=True)
> friends = models.ManyToManyField(User, blank=True,
> related_name='friend_set')
> avatar = models.ImageField(upload_to='photos/', blank=True,
> null=True)
> 
>
> The part I am having a slight problem with is the friends field. As
> you can see it has a ManyToMany relationship with User, which is fine.
> I can add add friends without any problems, but when it comes to
> accessing the list of friends I'm having some problems seeing the
> Avatar and Gender, which live within UserProfile.
>
> This is how I am pulling out the data:
>
> 
> # File: people/views.py
> 
> def people_friends(request,u):
> user = UserProfile.objects.get(user=u)
> friends = user.friends.all()
>
> # Use the object list view for the heavy lifting
> return list_detail.object_list(
> request,
> queryset = friends,
> template_name = "people/people_by_user.html",
> template_object_name = "people"
> )
> 
>
> And then in my template file I am printing them like this:
>
> 
> # File: templates/people/people_by_user.html
> 
> {% for people in people_list %}
> {{ people.username }}
> {{ people.avatar }}
> {% endfor %}
> 
>
> As mentioned above, the problem is people.avatar doesn't print
> anything. I tried people.userprofile.avatar but again, nothing
> happens...
>
> Any ideas? Do I need to setup a ManyToMany with an intermediary table
> or something?
>
> Cheers,
> Chris
--~--~-~--~~~---~--~~
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.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Strange Many-to-Many relationship question

2008-01-19 Thread Alex Koshelev

If you try to iterate through `friends` then you can access to avatar
like so:
{{friend.get_profile.avatar}}
Of course if you set proper AUTH_PROFILE_MODULE setting.

On 19 янв, 22:24, Darthmahon <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm using the built in authentication of Django, so new users who
> register go through the User model. I also have a custom UserProfile
> model that links directly to the User model via a ForeignKey.
>
> This is my completed UserProfile model:
>
> 
> # File: people/models.py
> 
> class UserProfile(models.Model):
> user = models.ForeignKey(User, unique=True)
> gender = models.CharField(maxlength=100, choices=GENDER_CHOICES,
> blank=True)
> birthday = models.DateField(blank=True)
> living = models.ForeignKey(Locations, blank=True)
> friends = models.ManyToManyField(User, blank=True,
> related_name='friend_set')
> avatar = models.ImageField(upload_to='photos/', blank=True,
> null=True)
> 
>
> The part I am having a slight problem with is the friends field. As
> you can see it has a ManyToMany relationship with User, which is fine.
> I can add add friends without any problems, but when it comes to
> accessing the list of friends I'm having some problems seeing the
> Avatar and Gender, which live within UserProfile.
>
> This is how I am pulling out the data:
>
> 
> # File: people/views.py
> 
> def people_friends(request,u):
> user = UserProfile.objects.get(user=u)
> friends = user.friends.all()
>
> # Use the object list view for the heavy lifting
> return list_detail.object_list(
> request,
> queryset = friends,
> template_name = "people/people_by_user.html",
> template_object_name = "people"
> )
> 
>
> And then in my template file I am printing them like this:
>
> 
> # File: templates/people/people_by_user.html
> 
> {% for people in people_list %}
> {{ people.username }}
> {{ people.avatar }}
> {% endfor %}
> 
>
> As mentioned above, the problem is people.avatar doesn't print
> anything. I tried people.userprofile.avatar but again, nothing
> happens...
>
> Any ideas? Do I need to setup a ManyToMany with an intermediary table
> or something?
>
> Cheers,
> Chris
--~--~-~--~~~---~--~~
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.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Incorrect ImageField get_file_url() output on Windows?

2008-01-19 Thread tom

I'm doing local development on XP, and with the exeception of this, it
has worked really well. In my settings.py, I have

MEDIA_ROOT = 'C:/worker/cms/media/'
MEDIA_URL = 'http://localhost:8000/docs/'
ADMIN_MEDIA_PREFIX = '/media/'

and then in a model:

imagefile = models.ImageField(upload_to="images/")

It gets uploaded to the right place, but calling get_imagefile_url on
an object returns the following URL

http://localhost:8000/docs//worker/cms/media/images/flat_hat_flathat.jpg

Which is obviously very wrong (the MEDIA_ROOT is not a public media
root in this situation or in the settings.py example, so I have no
idea why it's appended here)

Anyone experienced this or have any wisdom to share? Thanks for any
help.
--~--~-~--~~~---~--~~
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.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Strange Many-to-Many relationship question

2008-01-19 Thread Darthmahon

Ahh thanks for the reply Alex - didn't realise you could use
get_profile within the template! :)

Working perfectly now.

On Jan 19, 7:46 pm, Alex Koshelev <[EMAIL PROTECTED]> wrote:
> If you try to iterate through `friends` then you can access to avatar
> like so:
> {{friend.get_profile.avatar}}
> Of course if you set proper AUTH_PROFILE_MODULE setting.
>
> On 19 янв, 22:24, Darthmahon <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > I'm using the built in authentication of Django, so new users who
> > register go through the User model. I also have a custom UserProfile
> > model that links directly to the User model via a ForeignKey.
>
> > This is my completed UserProfile model:
>
> > 
> > # File: people/models.py
> > 
> > class UserProfile(models.Model):
> >         user = models.ForeignKey(User, unique=True)
> >         gender = models.CharField(maxlength=100, choices=GENDER_CHOICES,
> > blank=True)
> >         birthday = models.DateField(blank=True)
> >         living = models.ForeignKey(Locations, blank=True)
> >         friends = models.ManyToManyField(User, blank=True,
> > related_name='friend_set')
> >         avatar = models.ImageField(upload_to='photos/', blank=True,
> > null=True)
> > 
>
> > The part I am having a slight problem with is the friends field. As
> > you can see it has a ManyToMany relationship with User, which is fine.
> > I can add add friends without any problems, but when it comes to
> > accessing the list of friends I'm having some problems seeing the
> > Avatar and Gender, which live within UserProfile.
>
> > This is how I am pulling out the data:
>
> > 
> > # File: people/views.py
> > 
> > def people_friends(request,u):
> >         user = UserProfile.objects.get(user=u)
> >         friends = user.friends.all()
>
> >         # Use the object list view for the heavy lifting
> >         return list_detail.object_list(
> >                 request,
> >                 queryset = friends,
> >                 template_name = "people/people_by_user.html",
> >                 template_object_name = "people"
> >         )
> > 
>
> > And then in my template file I am printing them like this:
>
> > 
> > # File: templates/people/people_by_user.html
> > 
> > {% for people in people_list %}
> > {{ people.username }}
> > {{ people.avatar }}
> > {% endfor %}
> > 
>
> > As mentioned above, the problem is people.avatar doesn't print
> > anything. I tried people.userprofile.avatar but again, nothing
> > happens...
>
> > Any ideas? Do I need to setup a ManyToMany with an intermediary table
> > or something?
>
> > Cheers,
> > Chris
--~--~-~--~~~---~--~~
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.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: How sublcass a form and get the fields not on top?

2008-01-19 Thread Pigletto

> However, if I subclass this form this fields get on TOP of it (I
> prefer have it on bottom or in the middle). Exist a way to control
> this?

If you're talking about fields order then try:

class AnotherCityForm(CityForm):
def __init__(self, *args, **kwargs):
super(AnotherCityForm, self).__init__(*args, **kwargs)
self.fields.keyOrder = ['new1', 'new2', 'country', 'state',
'city', 'new3']

--
Maciej Wisniowski
--~--~-~--~~~---~--~~
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.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: limit_choices_to in ModelForm

2008-01-19 Thread James Bennett

On Jan 19, 2008 3:51 AM, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote:
> I have a limit_choices_to in my model - but this does work on my
> ModelForm. How do I do this?

Either set up the ModelChoiceField manually and specify the QuerySet,
or hang on while I get around to adding tests to the patch on #4046
(which I'd forgotten about in the middle of a bunch of other stuff).

http://code.djangoproject.com/ticket/4046

-- 
"Bureaucrat Conrad, you are technically correct -- the best kind of correct."

--~--~-~--~~~---~--~~
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.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



tagging

2008-01-19 Thread Chris

Hello I wrote a tagging app and it is not validating when I attempt to
install it into my database. The error is related to the TAG_FILTER
tuple located in my models file. Its not validating b/c the table does
not exist. Does anyone know of a better way of doing what I am trying
to accomplish.

Code:

from django.db import models
from django.contrib.contenttypes.models import ContentType

try:
TAG_FILTER = (
(content.id,'%s | %s' % (content.app_label,content.name)) for
content in ContentType.objects.all()
)
except:
TAG_FILTER = ()

class Tag(models.Model):
"""Tagging model"""
name = models.CharField(max_length=25,)
slug = models.SlugField(choices=TAG_FILTER)
--~--~-~--~~~---~--~~
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.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Incorrect ImageField get_file_url() output on Windows?

2008-01-19 Thread Alex Koshelev

What path is saved into field?

On 19 янв, 23:38, tom <[EMAIL PROTECTED]> wrote:
> I'm doing local development on XP, and with the exeception of this, it
> has worked really well. In my settings.py, I have
>
> MEDIA_ROOT = 'C:/worker/cms/media/'
> MEDIA_URL = 'http://localhost:8000/docs/'
> ADMIN_MEDIA_PREFIX = '/media/'
>
> and then in a model:
>
> imagefile = models.ImageField(upload_to="images/")
>
> It gets uploaded to the right place, but calling get_imagefile_url on
> an object returns the following URL
>
> http://localhost:8000/docs//worker/cms/media/images/flat_hat_flathat.jpg
>
> Which is obviously very wrong (the MEDIA_ROOT is not a public media
> root in this situation or in the settings.py example, so I have no
> idea why it's appended here)
>
> Anyone experienced this or have any wisdom to share? Thanks for any
> help.
--~--~-~--~~~---~--~~
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.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: tagging

2008-01-19 Thread Chris

Never mind had a brain fart. I should use
models.ForeignKey(ContentType,).

On Jan 19, 4:36 pm, Chris <[EMAIL PROTECTED]> wrote:
> Hello I wrote a tagging app and it is not validating when I attempt to
> install it into my database. The error is related to the TAG_FILTER
> tuple located in my models file. Its not validating b/c the table does
> not exist. Does anyone know of a better way of doing what I am trying
> to accomplish.
>
> Code:
>
> from django.db import models
> from django.contrib.contenttypes.models import ContentType
>
> try:
> TAG_FILTER = (
> (content.id,'%s | %s' % (content.app_label,content.name)) for
> content in ContentType.objects.all()
> )
> except:
> TAG_FILTER = ()
>
> class Tag(models.Model):
> """Tagging model"""
> name = models.CharField(max_length=25,)
> slug = models.SlugField(choices=TAG_FILTER)
--~--~-~--~~~---~--~~
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.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Another database for unit tests

2008-01-19 Thread Jim Crossley

What's the common way of making unit tests use a different database
than what's in settings.DATABASE_{ENGINE,USER,PASSWORD,HOST,PORT}?

Thanks,
Jim

--~--~-~--~~~---~--~~
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.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Another database for unit tests

2008-01-19 Thread James Bennett

On Jan 19, 2008 5:05 PM, Jim Crossley <[EMAIL PROTECTED]> wrote:
> What's the common way of making unit tests use a different database
> than what's in settings.DATABASE_{ENGINE,USER,PASSWORD,HOST,PORT}?

http://www.djangoproject.com/documentation/settings/#test-database-name


-- 
"Bureaucrat Conrad, you are technically correct -- the best kind of correct."

--~--~-~--~~~---~--~~
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.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Problem with url conf from chapter 7 of djangobook

2008-01-19 Thread Lee Hinde

Hi;

I have the admin site working, now I'm trying to add my first
standalone form.

Working from the 'simple' example from Chapter 7 of the book. I've
adapted it to my practice project.

After modifying the urls.py file I get this error when trying to
access anything, including admin:

Error while importing URLconf 'winesite.urls': name 'winesite' is not
defined

If I remove my 'search' line, admin/ works again.

mysite = winesite
myapp = winecomp

INSTALLED_APPS includes: 'winesite.winecomp',

so, my urls.py in the folder winesite is:

from django.conf.urls.defaults import *
from winesite.winecomp.views import search

urlpatterns = patterns('',
# Example:
# (r'^winesite/', include('winesite.foo.urls')),

# Uncomment this for admin:
   (r'^admin/', include('django.contrib.admin.urls')),
   (r'^search/$', include(winesite.winecomp.views.search)),

)

I added the implied, but not specified import for my views.py file.
Removing it doesn't make a difference.
I've quoted the include on my 'search' url. I get a different error.

Inside winesite is the directory winecomp which has a file called
views.

I have a symlink to my project (added after I got this error and
suggested for a similar error (I thought) in this group. The admin app
doesn't seem to need it.)

Any suggestions on how to fix this error?


--~--~-~--~~~---~--~~
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.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Problem with url conf from chapter 7 of djangobook

2008-01-19 Thread Lee Hinde

On Jan 19, 6:06 pm, Lee Hinde <[EMAIL PROTECTED]> wrote:
> Hi;
>
> I have the admin site working, now I'm trying to add my first
> standalone form.
>
> Working from the 'simple' example from Chapter 7 of the book. I've
> adapted it to my practice project.
>
> After modifying the urls.py file I get this error when trying to
> access anything, including admin:
>
> Error while importing URLconf 'winesite.urls': name 'winesite' is not
> defined
>
> If I remove my 'search' line, admin/ works again.
>
> mysite = winesite
> myapp = winecomp
>
> INSTALLED_APPS includes:     'winesite.winecomp',
>
> so, my urls.py in the folder winesite is:
>
> from django.conf.urls.defaults import *
> from winesite.winecomp.views import search
>
> urlpatterns = patterns('',
>     # Example:
>     # (r'^winesite/', include('winesite.foo.urls')),
>
>     # Uncomment this for admin:
>    (r'^admin/', include('django.contrib.admin.urls')),
>    (r'^search/$', include(winesite.winecomp.views.search)),
>
> )
>
> I added the implied, but not specified import for my views.py file.
> Removing it doesn't make a difference.
> I've quoted the include on my 'search' url. I get a different error.
>
> Inside winesite is the directory winecomp which has a file called
> views.
>
> I have a symlink to my project (added after I got this error and
> suggested for a similar error (I thought) in this group. The admin app
> doesn't seem to need it.)
>
> Any suggestions on how to fix this error?

Well I'm  too clever by half.

If modify my urls.py file as presented: (modified for my app)

from django.conf.urls.defaults import *
# from winesite.winecomp import views

urlpatterns = patterns('',
# Example:
# (r'^winesite/', include('winesite.foo.urls')),

# Uncomment this for admin:
   (r'^admin/', include('django.contrib.admin.urls')),
   (r'^search/$', include('winesite.winecomp.views.search')),

)

I seem to be ok.

Of course, I get a different error, but I'll save that for a new
thread.
--~--~-~--~~~---~--~~
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.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Problem with url conf from chapter 7 of djangobook

2008-01-19 Thread Lee Hinde



On Jan 19, 6:25 pm, Lee Hinde <[EMAIL PROTECTED]> wrote:
> On Jan 19, 6:06 pm, Lee Hinde <[EMAIL PROTECTED]> wrote:
> >
>
> > Hi;
>
> > I have the admin site working, now I'm trying to add my first
> > standalone form.
>
> > Working from the 'simple' example from Chapter 7 of the book. I've
> > adapted it to my practice project.
>
> > After modifying the urls.py file I get this error when trying to
> > access anything, including admin:
>
> > Error while importing URLconf 'winesite.urls': name 'winesite' is not
> > defined
>
> > If I remove my 'search' line, admin/ works again.
>
> > mysite = winesite
> > myapp = winecomp
>
> > INSTALLED_APPS includes:     'winesite.winecomp',
>
> > so, my urls.py in the folder winesite is:
>
> > from django.conf.urls.defaults import *
> > from winesite.winecomp.views import search
>
> > urlpatterns = patterns('',
> >     # Example:
> >     # (r'^winesite/', include('winesite.foo.urls')),
>
> >     # Uncomment this for admin:
> >    (r'^admin/', include('django.contrib.admin.urls')),
> >    (r'^search/$', include(winesite.winecomp.views.search)),
>
> > )
>
> > I added the implied, but not specified import for my views.py file.
> > Removing it doesn't make a difference.
> > I've quoted the include on my 'search' url. I get a different error.
>
> > Inside winesite is the directory winecomp which has a file called
> > views.
>
> > I have a symlink to my project (added after I got this error and
> > suggested for a similar error (I thought) in this group. The admin app
> > doesn't seem to need it.)
>
> > Any suggestions on how to fix this error?
>
> Well I'm  too clever by half.
>
> If modify my urls.py file as presented: (modified for my app)
>
> from django.conf.urls.defaults import *
> # from winesite.winecomp import views
>
> urlpatterns = patterns('',
>     # Example:
>     # (r'^winesite/', include('winesite.foo.urls')),
>
>     # Uncomment this for admin:
>    (r'^admin/', include('django.contrib.admin.urls')),
>    (r'^search/$', include('winesite.winecomp.views.search')),
>
> )
>
> I seem to be ok.
>
> Of course, I get a different error, but I'll save that for a new
> thread.

Ok, same thread; it's still a urls.py error:

My error now is:

Error while importing URLconf 'winesite.winecomp.views.search': No
module named search

winecomp/views.py looks like this:

# Create your views here.
from django.db.models import Q
from django.shortcuts import render_to_response
from models import Winery

def search(request):
query = request.GET.get('q', '')
if query:
qset = (
Q(name__icontains=query)|
Q(corporate_name__icontains=query)|
Q(county__icontains=query)
)
results= Winery.objects.filter(qset).distinct()
else:
results = []
return render_to_response("wineries/search.html",{
"results":results,
"query":query
})

It's pretty much the same as the sample, just modified for my model.
--~--~-~--~~~---~--~~
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.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: ImageField Example

2008-01-19 Thread Kenneth Gonsalves


On 19-Jan-08, at 6:02 PM, Darthmahon wrote:

> Does anyone have a working example of uploading images using Django?
> I've looked extensively and haven't found anything - any idea how I
> save images using Django? I've put an ImageField in my model with the
> path to where it should save, but how do I tell Django to save it when
> a form is submitted? I'm using NewForms btw.

http://www.djangosnippets.org/snippets/463/

-- 

regards
kg
http://lawgon.livejournal.com
http://nrcfosshelpline.in/web/
Foss Conference for the common man: http://registration.fossconf.in/web/



--~--~-~--~~~---~--~~
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.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Another database for unit tests

2008-01-19 Thread Jim Crossley

Thanks, but...

"James Bennett" <[EMAIL PROTECTED]> writes:

> On Jan 19, 2008 5:05 PM, Jim Crossley <[EMAIL PROTECTED]> wrote:
>> What's the common way of making unit tests use a different database
>> than what's in settings.DATABASE_{ENGINE,USER,PASSWORD,HOST,PORT}?
>
> http://www.djangoproject.com/documentation/settings/#test-database-name

Yes, I knew I could override the NAME, but I'd like to override the
ENGINE,USER,PASSWORD,HOST, and PORT, too.  Our settings are configured
for mysql/innodb, to match our production environment.  But as our
test suite and initial_data grows, it takes a frustratingly long time
to run the tests.  I'd like to use the faster sqlite, but just for the
tests.  Can you suggest an approach?

Jim

--~--~-~--~~~---~--~~
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.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Help with either setting or lack of knowledge of Custom error_class

2008-01-19 Thread Karen Tracey
On Jan 19, 2008 2:02 PM, Roboto <[EMAIL PROTECTED]> wrote:

>
> I've made my own custom error list and the response I continue to get
> is this when I try to use it.
>
> TypeError at /login/
> __init__() got an unexpected keyword argument 'error_class'
> Request Method: POST
> Request URL:http://beta.ready-ready.org/login/
> Exception Type: TypeError
> Exception Value:__init__() got an unexpected keyword argument
> 'error_class'
> Exception Location: /home/advanced/rchan/lib/python/beta/website/
> views.py in viewLogin, line 22
>
> I can't figure it out... did I code something wrong? or is django not
> being able to recognize the error_class arguement?
>
> here is my views.py
> http://pastebin.com/m7a1ce7fb
>
> here is my custom error list from my forms.py
> http://pastebin.com/m6d4c1c03
>
> any ideas would be greatly appreciated!
>

The exception is being reported at line 22 but the file at pastebin has only
19 lines.  Did you chop off the top, like maybe the include's?  They would
have been helpful to see, not only because it would have been easier to
identify the line causing the error but because it would have revealed where
loginForm came from.  Where does it come from?  It's the one that doesn't
seem to be expecting error_class as a keyword argument, so its code would be
helpful to see.

Karen

--~--~-~--~~~---~--~~
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.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Another database for unit tests

2008-01-19 Thread James Bennett

On Jan 19, 2008 10:24 PM, Jim Crossley <[EMAIL PROTECTED]> wrote:
> Yes, I knew I could override the NAME, but I'd like to override the
> ENGINE,USER,PASSWORD,HOST, and PORT, too.  Our settings are configured
> for mysql/innodb, to match our production environment.  But as our
> test suite and initial_data grows, it takes a frustratingly long time
> to run the tests.  I'd like to use the faster sqlite, but just for the
> tests.  Can you suggest an approach?

Yes. Create another settings file, and in it put the following:

from your_real_settings import *

DATABASE_ENGINE = 'sqlite3'
DATABASE_HOST = '/some/filename/'

etc...


-- 
"Bureaucrat Conrad, you are technically correct -- the best kind of correct."

--~--~-~--~~~---~--~~
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.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Problem with url conf from chapter 7 of djangobook

2008-01-19 Thread Karen Tracey
On Jan 19, 2008 9:37 PM, Lee Hinde <[EMAIL PROTECTED]> wrote:

>
> [snipped]
>
> > from django.conf.urls.defaults import *
> > # from winesite.winecomp import views
> >
> > urlpatterns = patterns('',
> > # Example:
> > # (r'^winesite/', include('winesite.foo.urls')),
> >
> > # Uncomment this for admin:
> > (r'^admin/', include('django.contrib.admin.urls')),
> > (r'^search/$', include('winesite.winecomp.views.search')),
> >
> > )
> >
>

Since search is a function, as you show later, you do not want to have the
include() wrapped around it here.  include() is for specifying a whole other
URLconf module to handle the tree of urls specified by the first item in the
tuple.  You might want to review the doc here:

http://www.djangoproject.com/documentation/0.96/url_dispatch/#id1

since you might actually want to set things up this way at some point.  But
for what you are doing right now, try just removing the include().

Karen

--~--~-~--~~~---~--~~
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.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Another database for unit tests

2008-01-19 Thread Jim Crossley

"James Bennett" <[EMAIL PROTECTED]> writes:

> On Jan 19, 2008 10:24 PM, Jim Crossley <[EMAIL PROTECTED]> wrote:
>> Yes, I knew I could override the NAME, but I'd like to override the
>> ENGINE,USER,PASSWORD,HOST, and PORT, too.  Our settings are configured
>> for mysql/innodb, to match our production environment.  But as our
>> test suite and initial_data grows, it takes a frustratingly long time
>> to run the tests.  I'd like to use the faster sqlite, but just for the
>> tests.  Can you suggest an approach?
>
> Yes. Create another settings file, and in it put the following:
>
> from your_real_settings import *
>
> DATABASE_ENGINE = 'sqlite3'
> DATABASE_HOST = '/some/filename/'

So then I assume I must do something like this to run my tests?

DJANGO_SETTINGS_MODULE=test.settings ./manage.py test

Do you prefer that to having some kind of global variable indicating
tests are being run that the normal settings file could query to know
which db settings to use?  It seems the TEST_DATABASE_NAME goes
partially in that direction -- why not go all the way?  :-)


--~--~-~--~~~---~--~~
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.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Problem with url conf from chapter 7 of djangobook

2008-01-19 Thread Lee Hinde

Terrific; thank you. The book was right, I got got carried away with
some copy and pasting.

On Jan 19, 8:30 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
> On Jan 19, 2008 9:37 PM, Lee Hinde <[EMAIL PROTECTED]> wrote:
>
>
>
> > [snipped]
>
> > > from django.conf.urls.defaults import *
> > > # from winesite.winecomp import views
>
> > > urlpatterns = patterns('',
> > > # Example:
> > > # (r'^winesite/', include('winesite.foo.urls')),
>
> > > # Uncomment this for admin:
> > > (r'^admin/', include('django.contrib.admin.urls')),
> > > (r'^search/$', include('winesite.winecomp.views.search')),
>
> > > )
>
> Since search is a function, as you show later, you do not want to have the
> include() wrapped around it here.  include() is for specifying a whole other
> URLconf module to handle the tree of urls specified by the first item in the
> tuple.  You might want to review the doc here:
>
> http://www.djangoproject.com/documentation/0.96/url_dispatch/#id1
>
> since you might actually want to set things up this way at some point.  But
> for what you are doing right now, try just removing the include().
>
> Karen
--~--~-~--~~~---~--~~
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.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Help with either setting or lack of knowledge of Custom error_class

2008-01-19 Thread Roboto

Hey Karen,

I've reapplied pastebin - the error that line 22 is pointing to is the
call form = loginForm(data, error_class=pError) line



On Jan 19, 11:36 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
> On Jan 19, 2008 2:02 PM, Roboto <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > I've made my own custom error list and the response I continue to get
> > is this when I try to use it.
>
> > TypeError at /login/
> > __init__() got an unexpected keyword argument 'error_class'
> > Request Method: POST
> > Request URL:http://beta.ready-ready.org/login/
> > Exception Type: TypeError
> > Exception Value:__init__() got an unexpected keyword argument
> > 'error_class'
> > Exception Location: /home/advanced/rchan/lib/python/beta/website/
> > views.py in viewLogin, line 22
>
> > I can't figure it out... did I code something wrong? or is django not
> > being able to recognize the error_class arguement?
>
> > here is my views.py
> >http://pastebin.com/m7a1ce7fb
>
> > here is my custom error list from my forms.py
> >http://pastebin.com/m6d4c1c03
>
> > any ideas would be greatly appreciated!
>
> The exception is being reported at line 22 but the file at pastebin has only
> 19 lines.  Did you chop off the top, like maybe the include's?  They would
> have been helpful to see, not only because it would have been easier to
> identify the line causing the error but because it would have revealed where
> loginForm came from.  Where does it come from?  It's the one that doesn't
> seem to be expecting error_class as a keyword argument, so its code would be
> helpful to see.
>
> Karen
--~--~-~--~~~---~--~~
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.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Help with either setting or lack of knowledge of Custom error_class

2008-01-19 Thread Roboto

whoops - here is the re-edited pastebin

http://pastebin.com/m225477f8

On Jan 19, 11:36 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
> On Jan 19, 2008 2:02 PM, Roboto <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > I've made my own custom error list and the response I continue to get
> > is this when I try to use it.
>
> > TypeError at /login/
> > __init__() got an unexpected keyword argument 'error_class'
> > Request Method: POST
> > Request URL:http://beta.ready-ready.org/login/
> > Exception Type: TypeError
> > Exception Value:__init__() got an unexpected keyword argument
> > 'error_class'
> > Exception Location: /home/advanced/rchan/lib/python/beta/website/
> > views.py in viewLogin, line 22
>
> > I can't figure it out... did I code something wrong? or is django not
> > being able to recognize the error_class arguement?
>
> > here is my views.py
> >http://pastebin.com/m7a1ce7fb
>
> > here is my custom error list from my forms.py
> >http://pastebin.com/m6d4c1c03
>
> > any ideas would be greatly appreciated!
>
> The exception is being reported at line 22 but the file at pastebin has only
> 19 lines.  Did you chop off the top, like maybe the include's?  They would
> have been helpful to see, not only because it would have been easier to
> identify the line causing the error but because it would have revealed where
> loginForm came from.  Where does it come from?  It's the one that doesn't
> seem to be expecting error_class as a keyword argument, so its code would be
> helpful to see.
>
> Karen
--~--~-~--~~~---~--~~
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.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Help with either setting or lack of knowledge of Custom error_class

2008-01-19 Thread Roboto

and here is the beta.website.forms code

http://pastebin.com/m79fa445e

On Jan 20, 12:31 am, Roboto <[EMAIL PROTECTED]> wrote:
> whoops - here is the re-edited pastebin
>
> http://pastebin.com/m225477f8
>
> On Jan 19, 11:36 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
>
> > On Jan 19, 2008 2:02 PM, Roboto <[EMAIL PROTECTED]> wrote:
>
> > > I've made my own custom error list and the response I continue to get
> > > is this when I try to use it.
>
> > > TypeError at /login/
> > > __init__() got an unexpected keyword argument 'error_class'
> > > Request Method: POST
> > > Request URL:http://beta.ready-ready.org/login/
> > > Exception Type: TypeError
> > > Exception Value:__init__() got an unexpected keyword argument
> > > 'error_class'
> > > Exception Location: /home/advanced/rchan/lib/python/beta/website/
> > > views.py in viewLogin, line 22
>
> > > I can't figure it out... did I code something wrong? or is django not
> > > being able to recognize the error_class arguement?
>
> > > here is my views.py
> > >http://pastebin.com/m7a1ce7fb
>
> > > here is my custom error list from my forms.py
> > >http://pastebin.com/m6d4c1c03
>
> > > any ideas would be greatly appreciated!
>
> > The exception is being reported at line 22 but the file at pastebin has only
> > 19 lines.  Did you chop off the top, like maybe the include's?  They would
> > have been helpful to see, not only because it would have been easier to
> > identify the line causing the error but because it would have revealed where
> > loginForm came from.  Where does it come from?  It's the one that doesn't
> > seem to be expecting error_class as a keyword argument, so its code would be
> > helpful to see.
>
> > Karen
--~--~-~--~~~---~--~~
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.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Help with either setting or lack of knowledge of Custom error_class

2008-01-19 Thread Karen Tracey
On Jan 20, 2008 12:31 AM, Roboto <[EMAIL PROTECTED]> wrote:

>
> whoops - here is the re-edited pastebin
>
> http://pastebin.com/m225477f8
>

So is loginForm coming from beta.website.forms?  It's the definition of
loginForm that would be most helpful to see.

Karen


> On Jan 19, 11:36 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
> > On Jan 19, 2008 2:02 PM, Roboto <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> >
> >
> > > I've made my own custom error list and the response I continue to get
> > > is this when I try to use it.
> >
> > > TypeError at /login/
> > > __init__() got an unexpected keyword argument 'error_class'
> > > Request Method: POST
> > > Request URL:http://beta.ready-ready.org/login/
> > > Exception Type: TypeError
> > > Exception Value:__init__() got an unexpected keyword argument
> > > 'error_class'
> > > Exception Location: /home/advanced/rchan/lib/python/beta/website/
> > > views.py in viewLogin, line 22
> >
> > > I can't figure it out... did I code something wrong? or is django not
> > > being able to recognize the error_class arguement?
> >
> > > here is my views.py
> > >http://pastebin.com/m7a1ce7fb
> >
> > > here is my custom error list from my forms.py
> > >http://pastebin.com/m6d4c1c03
> >
> > > any ideas would be greatly appreciated!
> >
> > The exception is being reported at line 22 but the file at pastebin has
> only
> > 19 lines.  Did you chop off the top, like maybe the include's?  They
> would
> > have been helpful to see, not only because it would have been easier to
> > identify the line causing the error but because it would have revealed
> where
> > loginForm came from.  Where does it come from?  It's the one that
> doesn't
> > seem to be expecting error_class as a keyword argument, so its code
> would be
> > helpful to see.
> >
> > Karen
> >
>

--~--~-~--~~~---~--~~
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.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



newforms validator_list

2008-01-19 Thread Daniel

Hello,

As I understand it the model field paramater "validator_list" is now
being phased out with newforms.  I'm using newforms-admin, and am in
need of a similar way of doing validation.  Are there any hooks or
even hacks available that could achieve this?

I understand the preferred method is to create a custom form Field,
and do validation in its clean() method.  However, this appears to be
lacking in a couple ways.

First of all, it assumes you're generating the form manually.  What if
you're using form_for_model, or more critically, using the admin
interface?  Is there a way to specify custom form Field instances for
a corresponding model Field in the admin?

Secondly, in the admin the potential to do multi-field validation is
gone (or seems to be).  The old validator function passed the values
(field_data, all_data), allowing one to check the value of other
fields in the form via the all_data field.  Is it no longer possible
to, for instance, trigger validation of one field off another via the
admin in newforms-admin?  (ie, if field1 is None, field2 is required;
if field1 is filled, field2 is not required.)

Any suggestions would be much appreciated.

Thanks,
Dan


--~--~-~--~~~---~--~~
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.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---