#django

/

      • brockhaywood has quit
      • f3lp joined the channel
      • brockhaywood joined the channel
      • WillisMan joined the channel
      • RyanMercury
        Boogymanx: Double check the paths and permission.
      • Boogymanx
        oh I just thought of something
      • could it be because i still have the )+STATIC in my urls.py?
      • brockhaywood has quit
      • well that wasnt it
      • what permission does my folder need to have Ryan?
      • sgbirch joined the channel
      • they're all chowned to the user running nginx
      • sgbirch has left the channel
      • encod3 joined the channel
      • RyanMercury
        readwrite for the user accessing them
      • kosh joined the channel
      • Haudegen joined the channel
      • Boogymanx
        Ryan: he has that
      • RyanMercury
        hm
      • sgbirch joined the channel
      • dblado has quit
      • Pull up your browsers dev tools and see what urls it shows.
      • areski joined the channel
      • Boogymanx
      • geisst-london joined the channel
      • geisst-london has quit
      • wilson_ joined the channel
      • geisst-london joined the channel
      • in nginx, I have a location ~^/static/ { root /opt/yoonify/Yoonify/static/ }
      • which is where my static folder is
      • sgbirch has quit
      • erve joined the channel
      • at first I had an alias there for the same location but that didn't work either
      • dAnjou
        Boogymanx: maybe ask in #nginx?
      • Boogymanx
        Fair enough
      • vdboor has quit
      • sivy joined the channel
      • agemaniac joined the channel
      • june_1389 joined the channel
      • pretty dead in #nginx
      • sivy has quit
      • keimlink joined the channel
      • june_1389 has quit
      • F1LT3R joined the channel
      • keimlink has quit
      • grumpi has quit
      • jwa
        Boogymanx: can you paste your complete nginx.conf for this server{} block?
      • Boogymanx
      • although I have to say I only just removed two slashes from location ~ ^ static
      • Hairy joined the channel
      • just to see if trailing slashes were the issue
      • keimlink joined the channel
      • tianyi joined the channel
      • howdytom joined the channel
      • oh wait
      • that's not what you asked
      • idontneedanick has quit
      • https://dpaste.de/F0mx here it is jwa
      • I haven't made any changes to it
      • f3lp joined the channel
      • Bogh joined the channel
      • jwa
        Boogymanx: did you try location /static/ { ... }
      • idontneedanick joined the channel
      • Boogymanx
        I did, that's what it said first
      • but someone on SO said to use the ~ ^ so I tried that to see if it would work
      • jwa
        are you sure your nginx is listening on port 8000?
      • bikeshedder joined the channel
      • bikeshedder has quit
      • limbera joined the channel
      • Boogymanx
        not really, I was just following the DigitalOcean tutorial
      • how do I make sure?
      • limbera
        hey all, has anyone ever used shopify_django_app
      • Boogymanx
        it is in the proxy_pass in my sites-available/yoonify
      • Hairy has quit
      • sayan joined the channel
      • jwa
        Boogymanx: that is gunicorn listening on port 8000. nginx listens on default port 80 if you don't specify anything other
      • Boogymanx: the idea is that you access http://mysite and nginx internally redirects to localhost:8000
      • erve has quit
      • Gud
        Anybody here has a recommandation for a facebook api package for python? :)
      • sgbirch joined the channel
      • davidneale joined the channel
      • bmispelon joined the channel
      • graingert joined the channel
      • atula has quit
      • Sinestro has quit
      • prohobo joined the channel
      • jarshwah joined the channel
      • Lauxley joined the channel
      • hirokiky joined the channel
      • vranac joined the channel
      • romgar joined the channel
      • grumpi joined the channel
      • akamos has quit
      • metastableb joined the channel
      • Ergo joined the channel
      • akamos joined the channel
      • maryokhin joined the channel
      • Left_Turn joined the channel
      • greg_f joined the channel
      • raskel joined the channel
      • tonythomas joined the channel
      • eVRiAL joined the channel
      • akamos
        Is there any thing existing to organize model logic, something like: a parent has children, if all children "are turned off", that the parent also got's turned off
      • sonthonax joined the channel
      • *and can not turned on, like disabled
      • foofoobar joined the channel
      • maryokhin has quit
      • skyrz
        hrm...
      • foofoobar
        Hi. I have an old django 1.4 project I need to run. It runs fine on my computer and currently I’m trying to set it up in a docker container. When running the same command in the docker container I get: „Error: No module named myapp.other“. („other“ is a submodule I have in this project)
      • What can I do to fix this ?
      • skyrz
        akamos, good question. it seems like something might exist, but i havent used it.
      • AtomicSpark
        Why does STATIC_ROOT default to None when MEDIA_ROOT and MEDIA_URL default to an empty string?
      • skyrz
        akamos, it wouldn't be terribly hard to implement that functionality though
      • AtomicSpark
        "Changed in Django 1.6.2"
      • akamos
        skyrz: how I can define it? Is there anyway still in models to define?
      • Bogh has quit
      • kezabelle
        AtomicSpark: staticfiles is a contrib app, and so shouldn't be *required*, AFAIK
      • AtomicSpark
        Oh!
      • skyrz
        akamos, off the top of my head, I can think of a couple ways to implement it. with mixins, signals, altering get_queryset, or just stringing queries together. but ultimately it's going to revolve around some sort of boolean field on atleast one model
      • AtomicSpark
        If it's an empty string, it spams your root directory. That's... not safe. https://code.djangoproject.com/ticket/21581
      • kezabelle
        well, that ticket is marked as fixed, so?
      • sgbirch has left the channel
      • limbera has quit
      • AtomicSpark
        kezabelle: Fixed awhile ago. I was just intrigued why it was different.
      • dheerajchand has quit
      • Hollinski joined the channel
      • MEDIA_ROOT should default to None too IMHO, if we're going with that approach. I accidentally spammed my project directory with pictures earlier today.
      • kezabelle
        well, that's more difficult, because Image/File fields aren't contrib
      • [well, that's one argument, anyway]
      • [I can't speak for the overall validity of the notion]
      • maryokhin joined the channel
      • akamos
        skyrz: what you mean with the boolean fields?
      • skyrz
        akamos, a boolean field is True or False, so if your field was named `turned_on` you would append to your query `turned_on=True`.
      • desophos_ joined the channel
      • akamos
        skyrz: ah yes of course, i will try to write a mixin
      • benoitbb joined the channel
      • skyrz
        that way you can "turn on/off" what you wish. how you chain that up or down your relationships is where the decisions must be made
      • F1LT3R joined the channel
      • akamos
        but how I make it nested? lets tell i have 4/5/6 levels
      • skyrz
        it might be safer to alter get_queryset so that stipulation is always included
      • desophos_ has quit
      • desophos has quit
      • evilfelicity has left the channel
      • akamos, there's several ways to do that. you could put a `turned_on` field on all your models with a mixin, overwrite save to turn off the rest. or you could put only one turned_off at the head/root and when you make the query, follow the query all the way up to the head/foot node. i dont know there's plenty of ways, and im just thinking off the top of my head
      • DNX joined the channel
      • but i have to go to work and can't really work through the implications right now
      • jmurphyau has quit
      • akamos
        skyrz: you still gave me good inputs, i think i can do it
      • dv-hq-lap-avnees joined the channel
      • Looney joined the channel