Re: Redirect after login problem

2007-09-29 Thread James Bennett
On 9/29/07, Paddy Joy <[EMAIL PROTECTED]> wrote: > views.py > @login_required(redirect_field_name='/login/') > def index(request) You're using the 'redirect_field_name' argument incorrectly. The default value is 'next', which means Django will expect something like this: http://yoursite.com/acc

Re: how to do something at startup

2007-09-29 Thread pength
well, I am doing some similiar things, for example, I want to show the time when this Django/Apache server start, and set some "gloabl variables" which all of my apps can use, just do like this: I have a primary app named "city", and every other app's views.py will add a line as "from myproject.ci

Re: Redirect after login problem

2007-09-29 Thread Przemek Gawronski
Hi > I'm using the following code, anyone got any ideas what could be > wrong? > @login_required(redirect_field_name='/login/') My guess is, that it should be: @login_required(redirect_field_name='/hosting/login/') > urls.py > # Login > (r'^hosting/login/$', 'django.contrib.auth.views.login',

Re: Help with httpd.conf for mod_wsgi and media directory

2007-09-29 Thread Steve Potter
On Sep 29, 6:58 pm, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > What version of Apache are you using? The ordering or rule evaluation > in Apache 1.3 is actually based on order of LoadModule/AddModule lines > in Apache configuration as at code level can't define the ordering > dependencies bet

Redirect after login problem

2007-09-29 Thread Paddy Joy
I'm having some problems getting the "next" variable to work in the authentication module. After a user is logged in the page is redirected to /accounts/profile rather than being directed to the "next" variable. I'm using the following code, anyone got any ideas what could be wrong? views.py @l

Re: Help with httpd.conf for mod_wsgi and media directory

2007-09-29 Thread Graham Dumpleton
What version of Apache are you using? The ordering or rule evaluation in Apache 1.3 is actually based on order of LoadModule/AddModule lines in Apache configuration as at code level can't define the ordering dependencies between modules. BTW, if you comment out the WSGIScriptAlias directive, can

Re: sharing django on production and dev

2007-09-29 Thread Milan Andric
Thanks for the input! On Sep 28, 10:18 pm, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > On 28-Sep-07, at 11:16 PM, Milan Andric wrote: > > > Is there some standard practice on a machine that has production code > > running in mod_python but also has developers running their django- > > python w

Re: url of incoming request

2007-09-29 Thread [EMAIL PROTECTED]
thanks... the dictionary request.META has what is needed, in HTTP_REFERER, right? From that link http://www.djangoproject.com/documentation/request_response/#attributes META A standard Python dictionary containing all available HTTP headers. Available headers depend on the client and server,

Re: Creating link to root

2007-09-29 Thread scooper
> I solved this problem in the following way: > 1) Set thestylesheetlink tag to > 2) Created a rule in urls.py where r"^styles\.css" points to an > appropriately written view. > 3) Created a view that output the desired CSS code as plain text > (using a template) Hi, I'm pretty new to django, an

Using localflavor for admin

2007-09-29 Thread Marc Garcia
Hi! I want to use localflavor field validation in admin. Is it possible? I'm thinking in something like this (that of course is not working): -- from django.db import models from django.contrib.localflavor.us import forms as us_forms class MyModel(models.Model): zip_code = us_fo

Re: login() doesn't log me in

2007-09-29 Thread Alper Çuğun
On Sep 28, 11:55 pm, Alper Çuğun <[EMAIL PROTECTED]> wrote: > The problem is not that sessions do not work. They do. > The problem is that after login() I do a redirect. In the view where > the redirect ends up I am not considered logged in the first time I > get there. After a refresh I am, but t

Re: Generic/Views implementation decision

2007-09-29 Thread Panos Laganakos
I created a list/detail generic view for Toy, and passed ToyPicture objects, as an extra_context. That seems to work, not sure, how to filter the objects at a URLconf level though, if that's possible, or if I'll have to filter it at a template level. Still not sure if this is the *best* way to do

**** ARE YOU LOOKING FOR PROPERTIES IN MALAYSIA ****

2007-09-29 Thread [EMAIL PROTECTED]
ARE YOU LOOKING FOR PROPERTIES IN MALAYSIA We are dedicated & dynamic team of experienced who are here to serve you, whether you are looking to buy, sell or lease for residencial , commercial and Industrial use. Dealing in Sell/Buy/Lease of - Residential as well as Commercial premis

Re: ADMIN_MEDIA_PREFIX setting weirdness

2007-09-29 Thread tonemcd
This may not be relevant, but I've had no end of confusion with ADMIN_MEDIA_PREFIX. What I've found is this; If you're running the development server, the value of ADMIN_MEDIA_PREFIX is effectively ignored. Look at the code in django/ core/servers/basehttp.py, in AdminMediaHandler and you'll see

Re: Debugging Django scripts problem

2007-09-29 Thread Tim Chase
> the symlinks I've added. For completeness sake, here's the full > listing of my site-packages directory: > > www:/usr/local/lib/python2.5/site-packages# !ls > ls -lAF > total 1034 [stuff] > -rw-r--r-- 1 root staff885 Aug 30 19:30 easy-install.pth > lrwxrwxrwx 1 root staff 26 Sep 28 15:

Re: strange UnicodeDecodeError after update to latest trunk

2007-09-29 Thread frank h.
for others stumbling upon the same problem: I found a fix and filed a ticket at http://code.djangoproject.com/ticket/5640 On Sep 25, 11:17 am, "frank h." <[EMAIL PROTECTED]> wrote: > Hello all > ever since updating to latest trunk (past merge ofunicode-branch), I > get spurious UnicodeDecodeErro

her ayda 4000 zamanla kazanmak isteyenler fırsatı kaçırmayın tek yapacağınız şey üye olmak ve wievbardan kullanmak anlatıldığı gibi

2007-09-29 Thread kasim
Zamanla ne kadar çok para kazanmışsiniz kendiniz bile inanamiyacaksiniz. Bu gerçektir. Hayal ettiğiniz şeyleri gerçekleştirebilirsiniz. Eyleme geçmek düşünerek durmaktan daha iyidir. Bizde bir nakil var düşünen düşününceye kadar tevekkül eden menzile varmış. Sizde hayal ettiğiniz menzillere varab

Re: strange behavior of primary_key and ManyToManyField

2007-09-29 Thread zeliboba
actually, I understand how it works, it seems to be a bug anyway. consider this: from django.db import models class Author(models.Model): name = models.CharField(maxlength=50) class Reference(models.Model): """ >>> a = Author(name='some name') >>> a.save() >>> r = Reference(

Re: Add field in models django 0.96

2007-09-29 Thread Xan
Hi, It worked but I HAVE A PROBLEM: After done it, the database have strange caracters: it displays "Convocatòria" instead of "Convocatòria" I presume that it's an encoding problem. How can I solve that? Please, anwer me Xan. On Sep 26, 11:33 pm, DJango Fett <[EMAIL PROTECTED]> wrote: > Here a

Re: error when trying to save unicode data

2007-09-29 Thread Kenneth Gonsalves
replying to my self On 29-Sep-07, at 12:07 PM, Kenneth Gonsalves wrote: > def lessontodict(request,id): > """ > After a lesson is approved, the words, both written and > spoken are > dumped into the word table > """ > line = Lesson_line.objects.filter(lesson=