hello, i'm a python novice taking an object oriented design course. for my class project i'm to showcase my knowledge of object oriented programming by creating a online application that would represent a pizza shop where the customers and employees would interact with the site. i want to implement this project in python, but given that i'm a python novice, would you all recommend that i use django as the web framework or a smaller fr
natea joined the channel
danostrowski joined the channel
danostrowski
s'up people.
changlp has quit
Anyone know... the easiest way to replace a URL in the urlpatterns once a site's loaded up/
?
I need to, hopefully, surgically replace two insecure views.
xyxxy
How is the view insecure?
dfdx2 has left the channel
danostrowski
umm... it has an open redirect. The author is patching it, but it's insecure right now.
jrm2k6 joined the channel
ehmatthes joined the channel
mattmcc
You're able to change the root urlconf, right?
And, what do you need to replace the view with?
sayan joined the channel
Novacha
What is the best way for a manager to reference it's class? Is there like a self.__soemthing__ method?
mattmcc
__class__?
Novacha
That will reference the manager class, won't it?
jasondot_ has quit
svetlyak40wt joined the channel
mattmcc
Oh, you want the model? self.model?
Novacha
mattmcc: That works?
munichlinux has quit
jimfmunro has quit
That returns the class, and not an instance right, mattmcc ?
mattmcc
Well, you can't access manager methods through a model instance.
moneydouble has quit
Novacha
Thanks amn
man*
nxvl joined the channel
julio_menendez has quit
sohail has quit
arturrro joined the channel
How do I put managers in a separate file without causing recursion (since I need models to be imported)?
julio_menendez joined the channel
ArcTanSusan has quit
When I say recursion, I mean recursive import errors
young001 has quit
danostrowski
mattmcc, yeah, I own the site, I can change the root urlconf.
ArcTanSusan joined the channel
mattmcc, I'm hoping to add similar/exact versions of the views, but safe, and name them the same thing.
not exact.
versions that are safe, but the kicker is the NAME needs to be the same.
mattmcc
So you can put your own urlpatterns in front of the offending ones with the same regex that point to your own views.
danostrowski
so that 3rd parties aren't broken.
Ariel_Calzada joined the channel
mattmcc
The name can be the same. Reverse lookups are done in order.
danostrowski
It's the name bit...
Oh.
OK, perfect!
That's great.
mattmcc
So your patterns just need to come first.
danostrowski
Right. Yeah, I was doing that but I was like "ohh man, these names are probably unique."
Cool.
I should have jumped into the resolver code, but it's a bit obtuse, IIRC.
So I was like ... heh... I'll just ask first. ;)
zkanda has quit
ArcTanSusan has quit
mribeirodantas has quit
bullicon joined the channel
aendrew has quit
gerard0 has quit
hoot joined the channel
aendrew joined the channel
aendrew has quit
julio_menendez has quit
gerard0 joined the channel
changlp joined the channel
batisteo joined the channel
changlp has quit
yhsiang has quit
bmispelon joined the channel
vaidik joined the channel
ArcTanSusan joined the channel
chrismed has quit
arturrro has quit
Aliks has quit
donspaulding has quit
ArcTanSusan has quit
nxvl has quit
vaidik has quit
dannib has quit
kklimonda_ joined the channel
jrm2k6 has quit
kklimonda has quit
joshua_jandyco joined the channel
hhatch joined the channel
Digital_Lemon has quit
svetlyak40wt has quit
Digital_Lemon joined the channel
svetlyak40wt joined the channel
neataroni joined the channel
situ joined the channel
situ
Is there a generic way to allow case insesntive sorting through haystack ?
danostrowski has quit
svetlyak40wt has quit
chrismed joined the channel
maztah joined the channel
vakaras joined the channel
radimnov has quit
ArcTanSusan joined the channel
dannib joined the channel
agent47 joined the channel
FunkyBob
situ: it isn't by default?
agent47 has quit
situ
I am using Solr, and it sorts in case senstitive order.
changlp joined the channel
batisteo has quit
FunkyBob
fuck you google! why do I have to tell you all my search terms are important?
nex9 joined the channel
john_nash joined the channel
sobersabre joined the channel
john_nash
will i have self.request.user without doing authenticate or login ?
FunkyBob
yes
that's what the auth docs say
arturrro joined the channel
sobersabre has quit
JainAmber joined the channel
situ
john_nash: you can check whether a user is logged in with request.user.is_anonymous().
radimnov joined the channel
foist joined the channel
jonet joined the channel
neataroni has quit
JainAmber
Am I getting it right that a field of type 'TextField' does not needs 'max_length' argument?
situ, FunkyBob :i am writing a small chat application, where i will ask anonymous user to provide email address and solve a captcha and then create a User, can i have this user instead of anonymous user without doing login or authenticate ?
FunkyBob
why not login/auth?
john_nash
coz the user is not registered with system
FunkyBob
but you just registered them
john_nash
no i only asked for email address and solve a captcha to prove they are human
FunkyBob
sounds like enough rego to me
john_nash
i din asked for password
:)
FunkyBob
perhaps you're thinking you'll need to create auth.User objects, and that's too much?