Re: Retrieve `request` object in `urls.py`?

2007-03-25 Thread Alex Dong
Thanks Malcolm, sounds like `getattr` might be a good solution. I'll take a look into that and post back. -- Alex On Mar 26, 9:58 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Sun, 2007-03-25 at 18:22 -0700, Alex Dong wrote: > > Hi Malcolm, > > > Thanks for the quick reply. > > > What I'

proxied to a directory

2007-03-25 Thread Ross M Karchner
Hello-- I'm running a django project mod_proxy'ed to a directory of a non-django site, so that the django root is accessible at: http://domain.com/tools/ Django is oblivious to the 'tools'-- in the url above, request.path would just be "/", which makes perfect sense. This causes problems for any

Re: Retrieve `request` object in `urls.py`?

2007-03-25 Thread Malcolm Tredinnick
On Sun, 2007-03-25 at 18:22 -0700, Alex Dong wrote: > Hi Malcolm, > > Thanks for the quick reply. > > What I'm wondering about is that I've seen the pattern repeat itself > quite a few times where I have to write a little wrapper doing nothing > more than retrieving something from the `request`

Re: ImportError: MySQLdb-1.2.1p2 or newer is required; you have 1.2.1g3

2007-03-25 Thread James Bennett
On 3/25/07, coulix <[EMAIL PROTECTED]> wrote: > Apparently we need to upgrade Mysql, which is already the 5.0 on my > host and no latest version is available, or put mysql_old in the > settings.py. No, MySQL is the database server, and does not need to be upgraded. MySQLdb (note the "db" on the

Re: psyco

2007-03-25 Thread sansmojo
Well, I had looked in my error log and I just checked again. Nothing. I obviously am missing a lot. Any recommendations? On Mar 25, 7:16 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Sun, 2007-03-25 at 10:15 -0700, sansmojo wrote: > > I was trying to test out psyco, according to the in

Re: Retrieve `request` object in `urls.py`?

2007-03-25 Thread Alex Dong
Hi Malcolm, Thanks for the quick reply. What I'm wondering about is that I've seen the pattern repeat itself quite a few times where I have to write a little wrapper doing nothing more than retrieving something from the `request` object. Like * request.user.get_home_url * request.user.get_watch_

Re: Deploying multiple sites on one computer using SSL

2007-03-25 Thread Dan Goldner
Sincere thanks to both Malcom and Waylan. Things are working fine now. Waylan's suggestion didn't have an effect, but after following Malcom's debugging advice I found that while I had remembered to create a link from the httpd DocumentRoot to the project1 directory, I had not created a link to th

Re: django as a platform for a commercial SaaS project?

2007-03-25 Thread Jonas Maurus
On Mar 24, 4:59 pm, "walterbyrd" <[EMAIL PROTECTED]> wrote: > SaaS = Software as a service, just in case that was not clear. > > If I wanted to create commercial quality hosted software, would django > be the best solution? The sort of things I have in mind would be very > database oriented, and i

Re: Retrieve `request` object in `urls.py`?

2007-03-25 Thread Malcolm Tredinnick
Hi Alex, On Sun, 2007-03-25 at 17:55 -0700, Alex Dong wrote: > Hi folks, > I'd like to refactor the following code into one line in urls.py: > > Now: > in `urls.py`: > +(r'^watchlist/$', > 'package.watchlist.views.rredirect_to_personalized_watch_list'), > +(r'^users/(?P.*)/watchlist/$',

Retrieve `request` object in `urls.py`?

2007-03-25 Thread Alex Dong
Hi folks, I'd like to refactor the following code into one line in urls.py: Now: in `urls.py`: +(r'^watchlist/$', 'package.watchlist.views.rredirect_to_personalized_watch_list'), +(r'^users/(?P.*)/watchlist/$', 'package.watchlist.views.watchlist'), in `views.py`: [EMAIL PROTECTED] +def r

How would You like to get $15,000 Absolutely Free within 30 Days ?

2007-03-25 Thread denglianchu
Certainly, It'll be very interesting. But the story began about one month ago. It was 23rd November' 2006, 9:30pm. As an accountant of a non-govt. organization, I've always a little time to relax after my all day hard work. And there is no exception today. After my dinner, for relaxing I sat

Re: ImportError: MySQLdb-1.2.1p2 or newer is required; you have 1.2.1g3

2007-03-25 Thread Malcolm Tredinnick
On Mon, 2007-03-26 at 00:14 +, coulix wrote: > Same problem, > ImproperlyConfigured: Error importing middleware > django.contrib.flatpages.middleware: "MySQLdb-1.2.1p2 or newer is > required; you have 1.2.1g3" > > Apparently we need to upgrade Mysql, which is already the 5.0 on my > host and

Re: Trouble setting up Django and Apache

2007-03-25 Thread Malcolm Tredinnick
Hi Ben, On Sun, 2007-03-25 at 14:23 -0700, benrawk wrote: > Hello all, > > With Graham's hint about possible problems caused by SELinux, I > finally figured out what was going on. Django can now serve pages! > Here is what I learned: Firstly, well done for sticking at solving the problem rather

Re: fcgi - issues

2007-03-25 Thread Malcolm Tredinnick
On Sun, 2007-03-25 at 15:54 -0700, David M. Besonen wrote: > are there any issues/caveats/problems around using django + fcgi? > > i'm guessing there might things to be wary of, given that > mod_python appears more prominently in the installation > instructions. Every installation method has its

Re: psyco

2007-03-25 Thread Malcolm Tredinnick
On Sun, 2007-03-25 at 10:15 -0700, sansmojo wrote: > I was trying to test out psyco, according to the information at > http://code.djangoproject.com/wiki/PsycoMiddleware > For some reason, the following works at the shell (python manage.py > shell), but not on the web: > > import psyco > psyco.fu

Re: multiple field primary key and foreign keys as primary keys

2007-03-25 Thread Malcolm Tredinnick
On Sun, 2007-03-25 at 10:52 +, Michael wrote: > Hi Francesco, > I had a similar issue the other day, and came up with a solution of > sorts - but will be interested to hear from people with more Django > experience as to whether what I've done is a good idea. > > If we your example to: > > c

Re: ImportError: MySQLdb-1.2.1p2 or newer is required; you have 1.2.1g3

2007-03-25 Thread coulix
Same problem, ImproperlyConfigured: Error importing middleware django.contrib.flatpages.middleware: "MySQLdb-1.2.1p2 or newer is required; you have 1.2.1g3" Apparently we need to upgrade Mysql, which is already the 5.0 on my host and no latest version is available, or put mysql_old in the setting

fcgi - issues

2007-03-25 Thread David M. Besonen
are there any issues/caveats/problems around using django + fcgi? i'm guessing there might things to be wary of, given that mod_python appears more prominently in the installation instructions. thanks, david --~--~-~--~~~---~--~~ You received this message becau

Re: psyco

2007-03-25 Thread sansmojo
Thanks, Jeremy. I just typed it wrong here instead of copying and pasting. On Mar 25, 2:01 pm, "Jeremy Dunck" <[EMAIL PROTECTED]> wrote: > On 3/25/07, sansmojo <[EMAIL PROTECTED]> wrote: > > > import psyco > > psyco.full > > Unrelated to your import error, but make sure you use parens after > .f

Re: Trouble setting up Django and Apache

2007-03-25 Thread benrawk
Hello all, With Graham's hint about possible problems caused by SELinux, I finally figured out what was going on. Django can now serve pages! Here is what I learned: SELinux is installed and running by default on Fedora Core 6. This means that along with the correct file permissions, for files t

Re: django as a platform for a commercial SaaS project?

2007-03-25 Thread ScottB
Hi Walter. On Mar 24, 3:59 pm, "walterbyrd" <[EMAIL PROTECTED]> wrote: > If I wanted to create commercial quality hosted software, would django > be the best solution? The sort of things I have in mind would be very > database oriented, and involve a lot of forms and reports. I would > like to be

Re: Fwd: Different subdomain for each application (again)

2007-03-25 Thread ScottB
Hi Tom. On Mar 24, 2:42 pm, Tom Smith <[EMAIL PROTECTED]> wrote: > A while ago Doug and Eivind asked about using subdomains for each app. > > I'd like to do this, but in the example they had a stab at they were > using Apache whereas I'm using Lighttpd... One thing you might like to consider is

Re: psyco

2007-03-25 Thread Jeremy Dunck
On 3/25/07, sansmojo <[EMAIL PROTECTED]> wrote: > import psyco > psyco.full Unrelated to your import error, but make sure you use parens after .full(). iPython is probably helping you with that, but modpython won't. --~--~-~--~~~---~--~~ You received this message

Re: Django and Routing SUBDOMAIN STYLE URL

2007-03-25 Thread Michael Cuddy
> I have tried: > > http://api.localhost:8000/ > http://api.127.0.0.1:8000/ > > This is not working on my windows machine (using development server, > not apache+mod_python). You have two choices. If you have access to /etc/hosts on the server, you can define somehost.localhost and someother.l

Re: Django and Routing SUBDOMAIN STYLE URL

2007-03-25 Thread johnny
I have tried: http://api.localhost:8000/ http://api.127.0.0.1:8000/ This is not working on my windows machine (using development server, not apache+mod_python). Thank you. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

psyco

2007-03-25 Thread sansmojo
I was trying to test out psyco, according to the information at http://code.djangoproject.com/wiki/PsycoMiddleware For some reason, the following works at the shell (python manage.py shell), but not on the web: import psyco psyco.full It seems that the second I attempt to import psyco through a

Re: Newbie problem with view/model interaction

2007-03-25 Thread Ross Burton
(re-sending, apologies if this hits the list twice) On Mar 24, 5:27 pm, "Todd O'Bryan" <[EMAIL PROTECTED]> wrote: > What is it you want to do with the ones they've voted on vs. haven't? If > you're going to hide the ones they've already voted on, just write a > query in the view method that only

Re: building a django rpm, probs with adding documentation

2007-03-25 Thread Paul Rauch
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Lars Stavholm schrieb: > Paul Rauch wrote: >> Hello, >> >> I'm currently building a rpm of django for suse. >> >> But I can't figure out how to add the documentation, it doesn't get >> added, when running "python setup.py build" > > Assuming that you

Re: building a django rpm, probs with adding documentation

2007-03-25 Thread Lars Stavholm
Paul Rauch wrote: > Hello, > > I'm currently building a rpm of django for suse. > > But I can't figure out how to add the documentation, it doesn't get > added, when running "python setup.py build" Assuming that you've unpacked your source with... %prep %setup -q ...you should be able to do..

Re: multiple field primary key and foreign keys as primary keys

2007-03-25 Thread Michael
Hi Francesco, I had a similar issue the other day, and came up with a solution of sorts - but will be interested to hear from people with more Django experience as to whether what I've done is a good idea. If we your example to: class MyModel(models.Model): field1 = ForeignKey('table1', db_i

Re: ANN: Django-0.96 hosting available at WebFaction

2007-03-25 Thread chasfs
Thanks for the post, Remi. I may be moving over from Dreamhost when my contract expires. It would be great to have a fully supported Django environment. -chasfs On Mar 24, 1:47 pm, "Remi" <[EMAIL PROTECTED]> wrote: > Hi everyone, > > I'm happy to announce that WebFaction have added Django-0.96

Re: django as a platform for a commercial SaaS project?

2007-03-25 Thread frank h.
> If I wanted to create commercial quality hosted software, would django > be the best solution? it depends! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email t