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
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
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',
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
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
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
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
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,
> 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
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
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
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
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
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
> 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:
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
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
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(
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
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=
20 matches
Mail list logo