2008-3-25

23:16 Magus-
its simply not possible with http
23:16 moos3_
just wanted to make sure
23:16 SzArAk
when i do @register.filter(name='filtername') i get NameError: name 'register' is not defined. where is register defined? :)
23:16 s3phiroth
Magus-: oh...silly me. that was exactly on the init example i had found
23:16 SzArAk
23:16 lucas_x
Magus: Thanks - how would I do that otherwise - send extra data long with a redirect?
23:17 s3phiroth
thanks once again
23:17 herman_munster
lucas_x: you can place data in the session and access after the redirect
23:17 leonel
how do I tell the admin to use other field than the primary key ??
23:18 Magus-
leonel: for what?
23:19 leonel
Magus-: I have a text field as primary key and a slug field I need the admin to use the slug for editing the data
23:19 Magus-
that makes no sense
23:19 Magus-
if you want the slug to be used as the pk, make it the pk
23:20 leonel
Magus-: in the text field the user entered something like Is this ? and the admin can't display the record to edit it
23:20 Magus-
admin is never going to use some non-pk field as the pk
23:20 Magus-
you're doing something wrong
23:20 Magus-
pastebin some code
23:21 Magus-
and is that ? supposed to be a ?, or some unicode character that isn't translating to here properly?
23:26 moos3
did template_utils.markup get removed in .97
23:26 moos3
along with permalinks
23:26 Magus-
there's no such thing as template_utils in django
23:26 Magus-
its a third party app
23:26 moos3
oh ok
23:26 Magus-
and no, of course permalinks were not removed
23:26 Magus-
and 0.97 does not exist
23:27 moos3
i'm using the latest build its pre.97
23:27 Magus-
so say trunk, or svn
23:27 Magus-
it is not 0.97
23:27 moos3
ok
23:28 moos3
from django.db.models import permalink is throwing errors does it need to have the s on the end of permalink
23:28 Magus-
of course not
23:29 Magus-
there's no such thing as permalinks
23:29 Magus-
I don't know whats wrong with yours, but its there
23:33 DaveyJoe
I'm having a problem displaying messages to a logged in user, {% if messages %} is returning true but {% for message in messages %} is not outputting the data in the loop?
23:35 leonel
Magus-: Thanks droped the primary key for the text field and added the constraint to the slug
23:40 rohitj
DaveyJoe: are you sure messages is a list?
23:40 rohitj
DaveyJoe: {% if messages %} just shows that messages is not empty
23:40 DaveyJoe
rohitj: Isn't it a list by default
23:41 DaveyJoe
23:41 rohitj
DaveyJoe: I am not good in python, but I don't think so
23:41 DaveyJoe
23:42 rohitj
DaveyJoe: please dpaste the code where you are rendering the template
23:42 axiak
DaveyJoe: did you use the contextrequest?
23:43 DaveyJoe
23:43 axiak
hmm
23:46 DaveyJoe
It seems that messages are selected once before they are deleted and once after... Here is the executed SQL (in order of execution)... http://dpaste.com/41301/
23:47 DaveyJoe
Can anybody hazard a guess as to why this is?
23:50 SzArAk
Magus-: where the code of my custom filter should be placed? i've put it in views.py of my app, but it's not visible inside a template
23:51 thebitguru
can the permalink decorator work with named urls?
23:53 Magus-
thebitguru: of course
23:53 Magus-
it just uses reverse()
23:53 Magus-
SzArAk: you put it where the template docs clearly tell you
23:53 Magus-
23:54 thebitguru
Magus-: sorry, I was looking through it and was mislead by the 'view_name' parameter
23:54 Magus-
DaveyJoe: user messages are added to context using get_and_delete_messages
23:54 Magus-
DaveyJoe: as suhc, they are indeed deleted if you don't view them in that template
23:55 DaveyJoe
Magus-: But I am viewing them in that template
23:56 Magus-
DaveyJoe: then they should work fine for one view
23:57 DaveyJoe
Magus-: hmm... Do you know why {% if messages %} would return true yet looping though the list returns nothing?
23:58 Magus-
no
23:58 Magus-
unless they don't have a str or such
23:58 Magus-
then it'd be <something>
23:58 Magus-
check in view source
23:58 DaveyJoe
Magus-: Yeah I checked, see... http://dpaste.com/41299/
23:59 SzArAk
Magus-: right. sorry, i undestood docs backwards ;p. My english is far from perfect ;)
Page 34 of 34   ← Previous  (3,365 total)