wwilliams: i'd put a pdb.set_trace() in your get_random_filename method and see what's happening
hell_razer
shinobi_one, , django.newforms - hello from 2005
SmileyChris
it should be working as far as i can tell
conwayb has quit
wwilliams
Agree, seems like it should be good. Not familiar with the pdb.set_trace, I'll look it up. Thanks.
hell_razer
wwilliams, instance.filename=filename - its just it your local instance in function
SmileyChris
no it's not
hell_razer
wwilliams, it will no effect to model
SmileyChris
yes it will
wwilliams
lol
thats sort of my point
SmileyChris
it's passed by reference, hell_razer
joshfinnie joined the channel
wwilliams
it definitely should from my understanding
hyperboloid has quit
zapo has quit
estebistec joined the channel
SmileyChris
so are we stepping through it yet, wwilliams ? :)
hell_razer
SmileyChris, hmmm will try
SmileyChris
import pdb; pdb.set_trace()
Siecje joined the channel
knite joined the channel
adamsilver joined the channel
zacharypch joined the channel
MicahCarrick has quit
knite
why might Django (1.5) not respect settings.APPEND_SLASH? I have an entry in urls.py that ends with 'foo/$', and settings.APPEND_SLASH is true. shouldn't 'foo' redirect to 'foo/'?
mattmcc
knite: Only if 'foo' doesn't match any other pattern.
thallada has left the channel
APPEND_SLASH only kicks in if a 404 would occur.
knite
mattmcc: roger that, I'm getting a 404.
SmileyChris
maybe foo/ doesn't match any patterns either?
knite
SmileyChris: foo/ works correctly.
foo works if I change the pattern.
so only the foo -> foo/ redirect fails.
mattmcc
What does the whole urlconf look like?
urth
knite: and your middleware
SmileyChris
and your mother's maiden name
mattmcc
For example, a view could accept 'foo', but still raise a 404. That won't result in a redirect, because a view did handle the request.
urth
looking for a date?
knite
mattmcc: a-ha, that's a good point which didn't occur to me.
radez is now known as radez_g0n3
Siecje
What do you do when a package you are using is not in pip and you want to write install instructions
cewing has quit
mattmcc
I package it. :P
GrahamDumpleton_
mmello: Am back.
H25 has quit
mattmcc
We maintain an in-house chishop server for packaging stuff that isn't packaged that we depend on.
urth
Siecje: put it on github yourself or provide a local tar.gz
ripplebit
guys when i put a random url into my django page, i get a server error (instead of a 404). DEBUG is off
Siecje
it is on github, can I put a link to that in my requirements file?
mmello
GrahamDumpleton_: hey.. I was reading some docs and maybe using FastCGI is a solution
GrahamDumpleton_: what do you think?
urth
yes, pip can install directly from a github repo
adamsilver has left the channel
SmileyChris
so can distribute's install_requires
Siecje
just link to the base repo ?
mattmcc
It can, though I wouldn't deploy to production that way.
ripplebit: You're probably using Django < 1.5 and don't have a 404.html template.
mmello: If your hosting provider controls the Apache and thus port 80, you are more or less stuck with either using their mod_wsgi or FASTCGI if they also support that. Only other option is if they allow people to proxy through to their own application, which requires them to change the Apache and so highly unlikely.
eraldo has quit
ripplebit
mattmcc: im using 1.5 and i do have 404.html in my template root
mattmcc
ripplebit: Okay, then I'd ask what the exception & traceback is.
urth
ripplebit: if you enable logging that should give the error in a nice format
mmello
GrahamDumpleton_: even using fastCGI do you think I'll not be able to execute it?
mattmcc: I put a depends in User for channel, but then I get an error about the channel not existing. See my channel/user model here: http://sprunge.us/DWMQ?python
SmileyChris
hell_razer: sure it does, something is either not saving it or switching it back afterwards is all
ripplebit
mattmcc: when debug is true, it gives a 404, when it is false, i get a server 50 error. no traceback (at least that i know how to get)
urth: how do i enable logging?
joshfinnie has quit
mmello
GrahamDumpleton_: hm.. so I should find another provider to host my application
urth
hell_razer: the order of the fields in the model matter, move filename below fileobj and it should work
thallada joined the channel
GrahamDumpleton_
mmello: There are certainly more Python friendly ones. The one right now I think is most promising is dotcloud, but there is also heroku, OpenShift, WebFaction and Elastic Beenstalk.
iiie has quit
FunkyBob
GrahamDumpleton_: actually, I generally find Apache/FastCGI (forced to use it on CPanel hosts) is generally quite easy
it's just that HostGator do strange stuff with their Python
SmileyChris
ripplebit: do you have a 404.html template?
mattmcc
codygman: So in users/migrations/0001_initial.py you have something like depends_on = (('channels', '0001_initial'),) ?
jsfan2 has quit
FSCV has quit
ripplebit
SmileyChris: yeah i do, in my templates/ directory. Im not sure if there's some other configuration i need to do other than setting debug to off. maybe im missing something
Hey Guys. I'm having a little trouble creating my own UserModel. From what I've read on the tutorials, you can use the default Django UserManager, if the model defines the same fields as the default UserModel. Does this mean, that _all_ fields have to be the same?
ripplebit
FunkyBob: never knew that, thanks. do i just set it to localhost?
phildini has quit
urth: im just using the django test server, not sure if it has logs
FunkyBob
ripplebit: set it to ['*'] for now
urth
ripplebit: that should output tracebacks in the console
(I think)
ripplebit
FunkyBob: brilliant, thanks for that
FunkyBob
ripplebit: it was a recent-ish security change in 1.5
ripplebit
urth: all good now, thanks for the help
FunkyBob: what was the reasoning behind its implementation?
jarshwah joined the channel
urth
codygman: I seems migrations do not support a custom user model/table yet
FunkyBob
ripplebit: best to read the release notes
epiloque_ has quit
urth
ripplebit: to prevent host header spoofing
codygman
urth: Really, how would you handle that?
urth
not sure, I rarely use south
baniir joined the channel
ripplebit
oh ok
FunkyBob
urth: I don't see why they wouldn't... it's just another model
urth
True, but that migration referenced auth_user which is not used
tbaxter
Slawa: if you only want to change a little, or add a few fields, use AbstractUser. It's phenomenally easier (and buried in the docs)
But with AbstractUser, all the regular django Admin stuff continues to work.
urth
codygman: had to read back a bit, did your code use the default User model at one point? you'll need to add the contrib.auth app back to INSTALLED_APPS before starting the migration to get the same starting point
Slawa
tbaxter: So I can add (required) fields?
tbaxter
Sure. It will be up to you to make sure they get filled in, though. Not tough with a modelform
codygman
urth: No problem. It did, but I just created new migrations from the current state. I have contrib.auth in my INSTALLED_APPS
ajw0100 has quit
Slawa
Do I still have to define stuff like "is_superuser" in the model?
FunkyBob
Slawa: read the docs, they cover what the abstract models will provide
Slawa
FunkyBob: Got it, thanks.
hyperair has quit
rydgel has quit
velcrow joined the channel
d4rkr4i joined the channel
baniir has quit
CollinPDX has quit
Hmm…I'm still getting the "takes exactly 4 arguments (3 given)"-Error. (https://dpaste.de/vy5hS/)
lojak joined the channel
MicahCarrick joined the channel
twoolie joined the channel
bytephilia has quit
fission6
post your code and traceback
csotelo has quit
ojh joined the channel
polishnorbi has quit
Slawa
Code: https://dpaste.de/vy5hS/ . The error appears on the development server console, when trying to create a superuser. ( TypeError: create_superuser() takes exactly 4 arguments (3 given) )