Hey guys; I have a working setup both for apache and for the manage runserver setup. But when I try to access the admin app from the apache version I get a 404, but not when I use the manage.py runserver version. Any idea why this is happening?
When i use the manage.py runserver version it works i mean.
Dmit3Y has quit
tbaxter has quit
what_larks has quit
kilae has quit
Ah, found a page saying that the development server does a lot of magic that I need to handle in my virtualhost setup.
sgambino joined the channel
rideh joined the channel
apollo13
na, it does no magic regarding admin views
chrislkeller joined the channel
the only magic it's doing is serving static files
MicahCarrick has quit
Mogget
yeah, I realised that. I am trying to find those static files as they are different on debian that what they are writing it seems.
sebleblanc has quit
joshfinnie has quit
apollo13
Mogget: run collectstatic and you got everything in your STATIC_ROOT
markvandenborre
I wonder what the cleanest way would be to have users store some very simple configuration in the database
apollo13
a key value table
markvandenborre
I could create a Configuration class in the database?
apollo13: indeed, thx
zoumpis joined the channel
Mogget
apollo13: Nice, I learned something new today too. :D
Thank you.
apollo13
np
bradleyayers has quit
now if someone could explain singular value decomposition to me :þ
raijin joined the channel
markvandenborre
is there anything default builtin like that?
apollo13
no
sputnikus has quit
markvandenborre
I've googled stuff like django-settings
bmispelon has quit
the really lazy and dirty approach would of course be to just add some new Class in the admin, and use the first object created in there
apollo13: but that's like ... really really dirty
apollo13
you can take a look at django-constance
markalanevans has quit
markvandenborre
thx, just found that one out too!
looks really useful
maspwr has quit
rideh has quit
ex-parrot has quit
cypher497 joined the channel
tashi_ is now known as tashi
colinbits has quit
tourniquet has quit
seanbrant joined the channel
revolunet joined the channel
hwrd|work has quit
thnee joined the channel
seanbrant
anyone have advice on 2 way encryption of user data? I want to store some data in such a way that only the user of that data can view it, possible using a user provided key
hwrd|work joined the channel
juliaelman has quit
sebleblanc joined the channel
thnee
When using a custom auth backend, I am setting all my usernames to username__prefix to distinguish them from normal site users. How can I hook some function that strips out the __prefix from each user's username?
I'm on 1.4 so I don't think I can extend the User model?
pjs
sure you can, you just can't substitute the User model with something new all together
thnee
Oh ok
pjs: In that case, what way do you prefer to extend the User model?
end0 joined the channel
joshfinnie joined the channel
FunkyBob
thnee: model with a one-to-one field to User
end0
Are the Bitnami EC2 servers with django pre-installed considered safe from a security perspective?
pjs
thnee, sorry, in the middle of 5 things.. what FunkyBob said
maspwr joined the channel
thnee
FunkyBob, pjs: But where do I hook that in? Setting AUTH_PROFILE_MODULE would affect normal site users as well, instead of only my custom auth backend users
FunkyBob
thnee: "hook" that in? huh?
don't use AUTH_PROFILE bulshit
just... follow the relation as you normally would
thnee
ah allright, well the problem is this
I have already manually stripped __prefix in all of *my* view code
but they still show up as username__prefix in the admin site
FunkyBob
huh?
pjs
thnee, I don't think we understand your issue.. what is this __prefix stuff?
thnee
I am adding a __prefix to all usernames that come from my custom auth backend
FunkyBob
why?
pjs
thnee, you mean, if they login with username "foo" using your custom backend, you're updating/saving the record with username of "foo__prefix"?
thnee
FunkyBob: to distinguish them from normal site users
FunkyBob
even though it's a suffix
pjs
hah
FunkyBob
thnee: what is the difference between these users?
thnee
well they are logging on a certain section of the site, and are not admins
at3560k has quit
EyePulp has quit
the point is that the actual database of users is somewhere else, and I access it via an API
and a user in the other database might have the same username as one of the django admins
SimplySeth
django complains that null values are not allowed but this can't be true .... server_storage = models.ForeignKey(Storage,null=True,blank=True)
apollo13
SimplySeth: drop the table and recreate it
SimplySeth
apollo13: OK
apollo13
and yes, what django says is usually true, if not all the time :þ
thnee
FunkyBob: make sense?
FunkyBob
thnee: you do understand Django comes with a Groups system, so you can control access using that?
as well as permissoins
joshfinnie has quit
thnee
FunkyBob: Um yeah I am also adding them to a specific group to indicate that.. But I was under the impression that usernames must be globally unique
mengu has quit
joshfinnie joined the channel
derek_c has quit
gazumps joined the channel
FunkyBob
yes, they must
thnee
hence, the __suffix
FunkyBob
though, since you can add your own auth backend to look them up by whatever field(s) you like...