#django

/

      • JZA
        FunkyBob: but if I do cd /; python /path/to/project/app/wsgi.py I get the same ImportError
      • FunkyBob
        ok
      • JZA
        ImportError: No module named proj_site.settings
      • CandyApples has quit
      • FunkyBob
        now do "PYTHONPATH=/path/to/project/ python /path/to/project/app/wsgi.py"
      • eka joined the channel
      • afk... sprint retrospective meeting
      • basix has quit
      • CandyApples joined the channel
      • JZA
        FunkyBob: dont get it, should there be some semicolons there?
      • schinckel
        JZA: Probably not: the first part sets an environment variable (but only for the current command).
      • The next token is the interpreter, the last one is the argument to the interpreter.
      • JZA
        schinckel: my python is on the 'bin/python'
      • icatalina joined the channel
      • path to the virtualenv might not be enough I think.
      • I just get a No such file or directory.
      • schinckel
        You should be able to pass the full path to the interpreter instead of "bin/python".
      • CandyApples has quit
      • JZA
        right but the project is not the full path to theinterpreter.
      • icatalina has quit
      • is virtualenv/bin/python
      • sorry I am confused.
      • schinckel
        Well, that's not the full path anyway, that's a relative path.
      • JZA
        oh god
      • .../virtualenv/bin/python
      • where ... IS the full path
      • schinckel
        /Users/jza/foo/bar/baz is a full path.
      • Or whatever. A full (absolute) path starts with a /
      • JZA
        I KNOW that assume is on the ...
      • my point is that the string was aiming at the virtual enviroment instead of the virtuale enviroment PLUS bin/python
      • shangxiao has quit
      • domino14 joined the channel
      • pydave6367 has quit
      • bmac has quit
      • pydave6367 joined the channel
      • ycon_ has quit
      • srj55 has quit
      • domino14 has quit
      • amites has quit
      • Melamo joined the channel
      • bigfondue joined the channel
      • basix joined the channel
      • the_rat joined the channel
      • realnot has quit
      • Bryson joined the channel
      • mehola joined the channel
      • the_rat has quit
      • Evidlo
        Could someone explain how I disable the check outlined in this post? https://code.djangoproject.com/ticket/22690
      • I have a proxy model with fields
      • ycon_ joined the channel
      • ycon_ has quit
      • ycon_ joined the channel
      • ycon_ has quit
      • ycon_ joined the channel
      • basix has quit
      • FunkyBob
        Evidlo: then it's not really a proxy model, is it?
      • uczekalla has quit
      • uczekalla joined the channel
      • pwnz0r has quit
      • pwnz0r joined the channel
      • Evidlo
        FunkyBob: I want to extend Group with an attribute, instead of amethod
      • jessamynsmith joined the channel
      • FunkyBob
        can you dpaste the model to demonstrate?
      • citizen-stig joined the channel
      • Evidlo
      • It's a bit more than just 'an attribute'
      • I used to have a one-to-one relation to group from Organization, but accessing the Group makes things cluttered conceptually
      • EduardoMartins joined the channel
      • pwnz0r has quit
      • citizen-stig has quit
      • Quitta joined the channel
      • Quitta has quit
      • teebes has quit
      • FunkyBob
        Evidlo: but... that model still has a bunch of extra fields
      • so it's NOT a proxy model
      • unlike is now known as MalConsejo
      • you could do it as a multi-table inheritance... but it's not a proxy model
      • the purpose of a proxy model is to provide a separate class for the same fields... adding extra methods, etc
      • your model clearly has 5 extra DB fields...
      • mrhanky has quit
      • robbyoconnor joined the channel
      • mrhanky joined the channel
      • shangxiao joined the channel
      • Evidlo
        FunkyBob: My motivation for doing this is that I want auth to use Organization instead of Group
      • If there was an AUTH_GROUP_MODEL setting, that would be perfect
      • robbyoconnor joined the channel
      • stantonk has quit
      • stantonk joined the channel
      • d42 joined the channel
      • holler joined the channel
      • Hairy has quit
      • FunkyBob, Is there any way I can replace Group entirely?
      • JZA
        FunkyBob: any idea why wsgi wont work for me?
      • FunkyBob
        Evidlo: why can't you just add your own Organization model, nd use it?
      • JZA: nope... but it's been [literally] years since I used mod_Wsgi
      • sbasso has quit
      • JZA: did you look into setting WSGIPythonHome ?
      • nedbat
        this might be a hopeless question, but: i'm upgrading a large code base from 1.4 to 1.8 (I know!), and I have an abstract model with a foreign key to User. Something that tries to list all the fields on User is finding these foreign keys, but then the model doesn't have those fields. Is this ringing any bells?
      • Hairy joined the channel
      • JZA
        FunkyBob: yeah I did, althought is that different from declaring a python-path on WSGIDaemon
      • icatalina joined the channel
      • how many times should I point where my virtualenv is?
      • FunkyBob
        I meant to do that instead of adding it to python-path
      • Evidlo
        django-guardian only operates on Users and Groups, not Users and Organizations
      • FunkyBob
        Evidlo: I don't recall where in this discussion you mentioned guardian was in use
      • Evidlo
        I can add users to my Organization directly, but permissions applied to Organization won't get inherited
      • icatalina has quit
      • FunkyBob
        how does your organisation differ fro ma group?
      • kingplusplus has quit
      • JZA
        FunkyBob: ok I will try that route
      • Evidlo
        Those 5 attributes and all those member functions
      • FunkyBob
        Evidlo: why can't you just extend group?
      • Evidlo
        I pasted it
      • FunkyBob
        using MTI
      • Evidlo
        I can, but that doesn't mean guardian will use my model
      • FunkyBob
        no, it will use group... from which you can access your model
      • _Atom_ has quit
      • it's almost starting to sound like guardian is the problem here
      • charettes joined the channel
      • Evidlo
        Isn't guardian an extension of auth?
      • FunkyBob
        it's one way to do it, yes
      • it's an implementation of row-level permissions...
      • contrib.auth specifically doesn't implement one, because there isn't one that fits generally
      • Evidlo
        But it uses auths Users and Groups, which is why I didn't bring up I was using guardian
      • EduardoMartins has quit
      • FunkyBob
        ...
      • yes, but then you specified your reason for not just adding Organization model as "guardian doesn't support it"
      • amites joined the channel
      • domino14 joined the channel
      • Evidlo
        Why does author let me replace the User model but not Group?
      • I could argue that django doesn't support it
      • auth*
      • I'm not really interested in arguing though. Just ideas for a solution
      • FunkyBob
        well, as I said... my path would be to add an Organization model
      • but I don't know how much of guardian you're actually using, and how much you're just acquiescing to
      • EduardoMartins joined the channel
      • Hairy has quit
      • Evidlo
        The feature I'm missing when I use Organization instead of Group is Group->User permission inheritance
      • FunkyBob
        so add that into a custom auth backend
      • domino14 has quit
      • would need to know more details about your actual needs to advise better
      • Hairy joined the channel
      • zkanda joined the channel
      • stantonk joined the channel
      • crter joined the channel
      • nitro25 has left the channel
      • holler has quit
      • pwnz0r joined the channel
      • kadfak has quit
      • bmac joined the channel