I'm not sure how anything could be trying to "import django evolution" without raising an e xception
or syntax error
ErvisTusha joined the channel
jefcabatingan has left the channel
d1rkp1tt
Well nothing is running yet. Its just trying to validate or syncdb for example
hexsprite has quit
pydanny joined the channel
hexsprite joined the channel
pecu joined the channel
FunkyBob
d1rkp1tt: you have a funny idea of what constitutes running code
d1rkp1tt
ok, well site wise..
michaelmartinez has quit
Its ok, if its not a common issue I will start file comparing my branches. Just thought someone might be able to point me in the right direction
sayan has quit
archdori joined the channel
danfairs has quit
ErvisTusha has quit
hexsprite has quit
atula has quit
dodobas
yelooo
nry has quit
zxq9 joined the channel
jsfan has quit
ianawilson has quit
optixx has quit
hwrd|work has quit
rtnpro joined the channel
DDevine joined the channel
svetlyak40wt joined the channel
endra joined the channel
optixx joined the channel
zandauxzan has quit
DDevine
Greetings. I am trying to get {{ STATIC_URL }} to work in my template that I am rendering with render_to_response. I've made sure the template context processor is in settings.py and the STATIC_* things are set. I'm on Django 1.5 RC.
Nothing is output in the HTML, and there is no errors. It is like it completely ignores the tag.
kushal has quit
(Ah the docs website is up again :) )
odarbelaeze has left the channel
mattmcc
DDevine: Use render() instead, and make sure you have the request context processor enabled.
DDevine
Looks like the answer was in the docs.
aberrant joined the channel
truetype joined the channel
svetlyak40wt has quit
n1x joined the channel
bulkan has quit
For some reason if you want context processors to be used you have to pass along the request context. The docs mention this (now that the site is up, it went down for like 10 minutes). Yeah, I may as well use render() instead. Same amount of code.
tbaxter has quit
FunkyBob
DDevine: less code, in fact
since you don't also need to import RequestContext
n1x has quit
bricker is now known as bricker`work
DDevine
Yep. Ok, I'm quite happy now.
Thanks.
n1x joined the channel
thehandler joined the channel
pheller has quit
FunkyBob
no point doing all that work for a stock Context, especially as it would prevent y ou from ever using Context [and thus Templates] outside of web requests
seagreen has quit
avelino has quit
vbabiy has quit
DDevine
request basically does the same thing as render_to_response anyway.
library is kicking me out now. Cyas.
DDevine has quit
Furao has quit
ssbr_ has quit
neataroni
is there a slick way to redirect to the requesting url?
ssbr joined the channel
mattmcc
redirect(request.path)?
neataroni
mattmcc: embarrased thank you
josePhoenix
Careful not to make an infinite redirect :D
chrislkeller joined the channel
dirn joined the channel
gazumps has quit
kushal joined the channel
omnicronx joined the channel
dirn has quit
sayan joined the channel
omnicronx
I am struggling with my post variables being returned as unicode which doesn't have things like length. What is the method I am supposed to be using to work with simple post data so I can test to see if it is present and a value that is usable.
arturrro has quit
kushal has quit
mattmcc
Forms are good at validating post data..
anth0ny has quit
sayan has quit
omnicronx
mattmcc: basically it is a 1 field form with a search term. Just want to get it and do a search. Seems like form is an overkill but can't seem to get the thing to work with a manual form. Is a form object just what I have to do?
scruz joined the channel
mattmcc
Oh, yeah, searches are different.
Usually you'd just grab request.GET['q']
danfairs joined the channel
wenzhixue has quit
omnicronx
yeah i guess posting is kinda silly for this now that you mention it
neataroni
mattmcc: so i think what i was looking for was not quite request.path. If i have a page with a form, and the submit button makes a request to a new view, i want that view to return a redirect to the original page with the form
mattmcc
As a general rule, you only post when you're modifying resources.
pupil joined the channel
wenzhixue joined the channel
optixx has quit
antsygeek joined the channel
omnicronx
mattmcc: ok same problem. The search term is in a unicode object that doesn't even let me use len() on it. Am I just missing a foundational concept?
mattmcc
neataroni: The login form does that by carring the originating page in a 'next' hidden field.