3:24 AM
jlillest
After processing my form in a view, what's the difference between rendering a Thank You page and using a HttpResponseRedirect?
3:25 AM
bobbymcghee has quit
3:25 AM
reisio
redirect to a thankyou page?
3:25 AM
jlillest
I'd like to customize my thank you page with some details from what was submitted
3:25 AM
mattmcc
3:25 AM
reisio
you can do that with a "rendered" one, but...
3:26 AM
jlillest
can I add contect to the redirect?
3:26 AM
reisio: it's bad form?
3:26 AM
reisio
you can use session variables, or query strings, or any number of things
3:26 AM
bobbymcghee joined the channel
3:26 AM
jlillest
s/contect/context/
3:27 AM
eldritchideen joined the channel
3:28 AM
so, best practices says the HttpResponseRedirect is the best choice?
3:29 AM
mattmcc
If you're writing something to the DB, you could set a session variable with the object's PK.
3:29 AM
reisio
either will suffice, so you may as well go with the path of least resistence
3:29 AM
glassresistor joined the channel
3:31 AM
cssko has quit
3:32 AM
garrypolley joined the channel
3:35 AM
zeioth has quit
3:36 AM
garrypolley has quit
3:36 AM
mehola joined the channel
3:37 AM
djapo has quit
3:38 AM
morenoh149 joined the channel
3:39 AM
sprix joined the channel
3:39 AM
Koterpillar
3:39 AM
wldcordeiro joined the channel
3:40 AM
therue joined the channel
3:42 AM
jlillest
mattmcc: Thanks for the wiki link, that's exactly what I needed!
3:42 AM
whaack joined the channel
3:45 AM
ycon_ joined the channel
3:47 AM
django091 joined the channel
3:48 AM
django091
hello everyone
3:49 AM
bobbymcghee has quit
3:49 AM
jaddison joined the channel
3:49 AM
mkoistinen joined the channel
3:50 AM
whaack has quit
3:51 AM
whaack joined the channel
3:51 AM
karim_ has quit
3:52 AM
ycon__ joined the channel
3:52 AM
ycon_ has quit
3:52 AM
reisio
'lo django091
3:52 AM
django091 has quit
3:52 AM
mstrcnvs joined the channel
3:52 AM
Koterpillar
sorry, .com
3:53 AM
robattila256 joined the channel
3:53 AM
karim_ joined the channel
3:53 AM
reisio
Koterpillar: I always want to type .org, too
3:54 AM
karim_ has quit
3:54 AM
YANOME is now known as yanome
3:54 AM
Koterpillar
it's registered but doesn't resolve, on purpose, I guess
3:55 AM
whaack has quit
3:56 AM
mkoistinen has quit
3:56 AM
roflmyeggo has quit
3:56 AM
roflmyeggo joined the channel
3:57 AM
linx has quit
3:59 AM
bobbymcghee joined the channel
4:00 AM
blackcross_ has quit
4:01 AM
chid joined the channel
4:01 AM
chid
Are there any simple security checkers for django?
4:01 AM
MoZu4k_ joined the channel
4:01 AM
MoZu4k__ joined the channel
4:02 AM
Koterpillar
what do you want to check?
4:02 AM
reisio
think a large part of using django at all is that it has a lot of security builtin
4:02 AM
JohnnyZ_ joined the channel
4:02 AM
gayathri_ joined the channel
4:04 AM
badon has quit
4:04 AM
badon_ joined the channel
4:04 AM
blackcross joined the channel
4:04 AM
chid
Koterpillar: well I'm not exactly sure, anything, leaky cold
4:04 AM
gmond071 joined the channel
4:05 AM
eg. is there anything like
4:05 AM
4:05 AM
Koterpillar
chid: you can do something like manage.py check (and I think there are more *check), but really, read OWASP and think
4:05 AM
MoZu4k_
Koterpillar: Hey, a few days ago I asked about is_popular. Remember?
4:05 AM
chid
well I'm reading OWASP but I'm really after automatic checking
4:05 AM
Koterpillar
no package will warn you that one of your views does an eval() on things, or you put {{ stuff | safe }} where you shouldn't have
4:05 AM
retailify joined the channel
4:05 AM
MoZu4k_: I remember that you did
4:06 AM
chid
Koterpillar: it'll be nice if there was a package that listed them all out
4:06 AM
Koterpillar
well, pylint will do some things
4:06 AM
badon joined the channel
4:06 AM
MoZu4k_
Koterpillar: I went and studied up on db indexes; Now I’m unsure as to how having an index on the is_popular field which is just true or false allows for instant access from an index, since it will still have all the posts just sorted by is_popular
4:06 AM
Koterpillar: am I still thinking about this incorrectly?
4:07 AM
Koterpillar
they are not just sorted by is_popular; there's a pointer to where the "true" starts
4:07 AM
chid
4:07 AM
MoZu4k_
Koterpillar: Oh! Is there? Why is that the case?
4:07 AM
Koterpillar: I thought each row in the index just had the pointers to the related row
4:08 AM
Koterpillar
MoZu4k_: ever seen an index in a paper book?
4:08 AM
MoZu4k_
Koterpillar: Yes
4:08 AM
alexhayes has quit
4:08 AM
Koterpillar
it lists words for each letter
4:08 AM
alexhaye1 has quit
4:08 AM
so you can quickly find the letter you need and then all the words that start with it
4:08 AM
in your case, you will have two "letters": True and False
4:09 AM
once you find "True", you'll be able to list all records that have is_popular=True
4:10 AM
retailify has quit
4:10 AM
ycon__ has quit
4:10 AM
ycon_ joined the channel
4:11 AM
sprix has quit
4:12 AM
MoZu4k_
Koterpillar: How is this actually implemented? Does the index store those pointers in a bookkeeping block or something?
4:13 AM
Koterpillar
you can visualize it as {"a": [10, 12, 13], "b": [11, 14, 9]}
4:13 AM
that's stored on disk, of course, not as a Python dictionary, and is much more complex, but the principle is the same
4:14 AM
MoZu4k_
right, it’s a b-tree or something I think
4:14 AM
thanks Koterpillar
4:14 AM
Koterpillar
look up "database index" or some DBMS courses for more details... these are heavily optimized, so there's a lot of techniques
4:17 AM
MoZu4k_
oh, indexes are b-trees in postgres. cool
4:21 AM
mattmcc
They might be.
4:21 AM
Postgres supports several index types, optimized for different kinds of data.
4:22 AM
4:22 AM
andy50 has quit
4:23 AM
autrilla joined the channel
4:23 AM
jaddison has quit
4:25 AM
CtrlC has quit
4:25 AM
DiCablo has quit
4:26 AM
arthurl has quit
4:26 AM
krfa joined the channel
4:26 AM
BeerLover joined the channel
4:27 AM
BeerLover has quit
4:27 AM
Leeds has quit
4:27 AM
BeerLover joined the channel
4:29 AM
CtrlC joined the channel
4:30 AM
ardu_ has quit
4:33 AM
dsea joined the channel
4:33 AM
dsea has quit
4:33 AM
the_rat joined the channel
4:33 AM
django982 joined the channel
4:33 AM
django982 has quit
4:34 AM
dsea joined the channel
4:35 AM
roflmyeggo has quit
4:36 AM
smacko joined the channel
4:37 AM
AntiSpamMeta has quit
4:37 AM
AntiSpamMeta joined the channel
4:37 AM
the_rat has quit
4:37 AM
newbie joined the channel
4:39 AM
jessamynsmith joined the channel
4:39 AM
bobbymcghee has quit
4:43 AM
jessamynsmith has quit
4:44 AM
hutch34 has quit
4:45 AM
bobbymcghee joined the channel
4:46 AM
vsg1990 has quit
4:46 AM
ramky joined the channel
4:46 AM
mkrza joined the channel
4:47 AM
tezro joined the channel
4:47 AM
tezro has quit
4:48 AM
pipostor has quit
4:49 AM
xall has quit
4:49 AM
kingarmadillo joined the channel
4:50 AM
jabirahmed joined the channel
4:50 AM
patricles joined the channel
4:51 AM
bobbymcghee has quit