Reverse for 'archive' with arguments '()' and keyword arguments '{u'paper_code': u'GRES-24'}' not found. 1 pattern(s) tried: [u'papers_recommendations/archive/(?P<paper_code>\\w+)?/?$']
benbacardi
Possibly. You may just want [A-Z]{4} for all we know ;-)
shangxiao
lol
benbacardi
GRES-24 doesn't match \w+
It has a - in it
[\w-]+
swi
[\w\W]+
chau joined the channel
romerocesar joined the channel
shangxiao
[\w\W]+ is just .+
?
benbacardi
Well that'd be a pointless regex, it'd match everything
shangxiao: yes!
swi: How about you tell us, in English, what characters your paper codes can contain. Then we can help you write the regex
swi
benbacardi: let it match everything - it' checked against db anyway
shangxiao
fwiw i open online regex testers when i want to quickly check my regexes
benbacardi
swi: yes, but it will match against / too, which may break further url matching
shangxiao
^ that
davidself has quit
swi
benbacardi: latin, cyrilic digits point and who know what else
swi: then use [^/]+ (not sure you may have to escape)
krwl_ joined the channel
the_rat has quit
swi
shangxiao: may be something like [\w\d.-]+ ?
mkoistinen joined the channel
shangxiao
\w includes \d iirc
benbacardi
\w contains \d automatically,
FinalAngel joined the channel
mohabaks has quit
And a . inside [] will match a literal period, which may be what you want
shangxiao
think of \w as a valid python variable name
swi forgot regexp a little
well, except that you can start with a number
benbacardi
shangxiao: not necessarily... ;-) a var can't start with a number
lol
shangxiao
hehe yep
jinx
chau has quit
jabirahmed joined the channel
jabirahmed has quit
jabirahmed joined the channel
darenthis joined the channel
rouentry has quit
bmispelon has quit
pcsssss has left the channel
swi
hmm.. [\w-] must match ABCD-22 right ?
[\w-]+
shangxiao
looks right
mattmcc
You can test in a Python shell..
mkoistinen has quit
the_rat joined the channel
Debnet`Work joined the channel
re.match(r'([-\w]+)', 'ABCD-22').groups()
swi
mattmcc: yes, in shell it's match
akki joined the channel
badon joined the channel
Debnet has quit
pajinek2 has quit
shangxiao
tomiit_: ah right (converse in here so others can chime in)… it looks as though there's no option to make it secure… i'm not sure there are any security implications…
MarkusH
Do we have a checklist what to look for when transitioning from USE_TZ=True, TIME_ZONE='UTC' to USE_TZ=True, TIME_ZONE='something/else'?
shangxiao
(well at least replace "any" with high risk)
MarkusH
is there even something I need to care about
mohabaks joined the channel
xcesariox joined the channel
considering that datetime.datetime.now() and django.utils.timezone.now() both give me UTC times, but the former being naive and the latter aware
shangxiao
MarkusH: have you got good test coverage to catch those gotchas and then come up with a checklist? :)
swi will kill some stupid monkey that put space at the begin of paper_code!
mayank96 joined the channel
MarkusH
shangxiao: I wish ...
;)
but getting there
shangxiao
yes that's something we probably all wish ;)
aristipp_ has quit
greg_f joined the channel
mitaka joined the channel
staticshock_ joined the channel
staticshock_ has quit
mitaka1 joined the channel
PaulN joined the channel
mitaka has quit
akki has left the channel
cookie2 joined the channel
mohabaks has quit
mitaka1 has quit
ardu joined the channel
ThisIsJack joined the channel
Paradisee__ has quit
ThisIsJack
I'm struggling with creating an updateform within using the Generic.UpdateForm builtin, I've got this far http://dpaste.com/28BE9VM but I don't know how to pass my object data to the form, how would I go about doing this?
aleray joined the channel
aleray
hi, how can I delete all the objects in a given app? If I run "python manage.py sqlclear course" django complains that course is an app with migrations
ThisIsJack: What's Generic.UpdateForm? If you mean Django's generic UpdateView https://docs.djangoproject.com/en/1.9/ref/class... - that's a class based view, and your code snippet is a function that doesn't use anything generic?