#django

/

      • vmand_000
        when I visit the page http://domain.com/mysite it just lists .htacess & django.fcgi (as a directory listing). how do I get the django generated content?
      • aidan_
      • djapo
        vmand_000: don't run runserver on anything exposed to the world, via public ip. just start the server you are using, apache?
      • vmand_000
        yes bluehost use apache I suppose
      • djapo
        aidan_: congratulations it worked, now look for what is causing that 500
      • bhitov has quit
      • Gambit- has quit
      • vmand_000
        djapo: I suppose apache is already being run by bluehost. sorry for the dumb qn, what do I need to start and how do I start accessing http://domain.com/mysite like I see for http://127.0.0.1:8000/ (if i go with runserver)
      • djapo
        aidan_: since it looks like you are running in localhost, set DEBUG=True, and use a browser to see the debug .. if you want to stay n the cli use elinks
      • a_musing_moose has quit
      • vmand_000: no!, don't use runserver. you can try to restart apacheif it doesn't reload.
      • Manyman joined the channel
      • bkuberek joined the channel
      • snurfery joined the channel
      • vmand_000
        djapo: I'm not sure if I can even restart apache because I'm on shared host (bluehost).
      • djapo
        vmand_000: but if you want to use runserver, this is how
      • vmand_000: ./manage.py runserver 0.0.0.0:8000
      • aidan_
        djapo: it didn't work, that's the ImproperlyConfigured at / error that I started with
      • djapo
        but do not, do not do .. what i just showed you.
      • aidan_: do you have more debug info
      • aidan_
        The included urlconf abas.urls doesn't have any patterns in it
      • SoftwareMaven has quit
      • Venomen`off is now known as Venomen
      • djapo
        aidan_: than put some in there
      • vmand_000
        djapo: I suppose you're referring to development server. I want to run it in production mode so that I can access it publicly
      • djapo
        vmand_000: yeah, thats why you are using apache. i would recommend nginx with a gunicorn proxy to the django app
      • aidan_
        djapo: haha
      • djapo: ./manage.py runserver works fine
      • djapo: ./manage.py run_gunicorn works fine
      • djapo
        neat
      • aidan_
        right, so it's got urls in it
      • djapo
        yes
      • grafa joined the channel
      • vmand_000
        djapo: the link you've shared refers to modifying files in /etc. but I don't have root access on shared host.
      • aidan_
        so why is there a difference between ./manage.py run_gunicorn and gunicorn abas.wsgi:application?
      • how can I fix it?
      • johnraz_ joined the channel
      • vmand_000
        djapo: I'm relying on fastcgi and to that effect configured django.fcgi appropriately. shouldn't that work. http://simplyargh.blogspot.com/2012/04/python-2... suggests that it should work
      • djapo
        vmand_000:hhmmm, you might have to see for options in your shared host provider. perhaps the tutorial you followed is out of date
      • vmand_000
        djapo: I just need to know how to invoke the django code...
      • djapo
        or, you need to know if apache is getting the right configuration
      • aidan_
      • it doesn't appear to do any path setting
      • johnraz has quit
      • Debnet`Work has quit
      • Debnet`Work joined the channel
      • djapo
        vmand_000: did you do this .. Remember to change /homeX/your_username to your home directory path on bluehost.
      • aidan_
      • that does though
      • johnraz_ has quit
      • orion1111 joined the channel
      • djapo
        aidan_: can you provide a link to the raw file, im on cli only
      • vmand_000
        djapo: you mean $HOME=/homeX/username ?
      • aidan_
      • viwal_ joined the channel
      • djapo
        vmand_000: yes
      • Debnet joined the channel
      • orion1111 has left the channel
      • citizen-stig joined the channel
      • Debnet`Work has quit
      • vmand_000
        djapo: echo $HOME points to /homeX/myusername and also in the .bashrc I used ~/directory structure to add Python/django specific paths to the environment variable
      • Tyriss joined the channel
      • Tyris has quit
      • stephenmcd has quit
      • Debnet has quit
      • djapo
        vmand_000: well adjust them so they reflect your username, is your username myusername?
      • aidan_: yeah, i don't see anything special there. what does running gunicorn myproject.wsgi:application from your manage.py dir say
      • it should really be that simple
      • so if there is an error, it would produce a traceback
      • Stierlitz joined the channel
      • dodobas
        yelloo
      • vmand_000
        djapo: I don't know why you suspect ~ or $HOME would be a problem. Anyway I modified the PATH variable to reflect absolute path /home4/fourunit
      • djapo: but no luck getting django project text
      • freezevee joined the channel
      • k_sze[work] has quit
      • sayan joined the channel
      • djapo
        vmand_000: are you sure you read that page? the most important lines "Remember to change /homeX/your_username to your home directory path on bluehost. Change myproject.settings to correct project name.
      • "
      • olasitarska joined the channel
      • aidan_
        djapo: I gave you the traceback
      • djapo: it thinks there's no urls in abas.urls.py
      • stephenmcd joined the channel
      • mekhami joined the channel
      • sedeki joined the channel
      • k_sze[work] joined the channel
      • djapo
        aidan_: hmm, i don't see that in the traceback.
      • you speak of this http://dpaste.com/0B9BSQP
      • olasitarska has quit
      • vmand_000
        djapo: I've already changed django.fcgi appropriately (in fact used absolute path) as per the instruction. I thought you were referring to path in .bashrc. But no luck
      • djapo
        vmand_000: alright and you sure you followed the tutorial? well, paste everything.
      • mmcardle joined the channel
      • also cd; pwd;
      • what does that print?
      • omarek joined the channel
      • omarek
        Hi
      • djapo
        hello
      • harichetlur has quit
      • Nizumzen joined the channel
      • mekhami
        hey djapo, i'm trying to decide if i need the three tiered (parent child grandchild) database structure
      • if you remember my project at all, it's a tournament report system, user enters an event which has x rounds and y matches per round
      • mmcardle has quit
      • djapo
        yes, and you wanted formsets within formsets within formsets
      • mekhami
        well
      • not quite that bad =P
      • just one level deep =P
      • Nizumzen has quit
      • so i'm wondering how to structure my models for this
      • should i do match/round/tournament
      • or do i need the round model
      • cause a round is just a group of x matches and has no other attributes
      • but they happen sequentially so round 1, 2, 3 are separate
      • djapo
        mekhami: if a round is a group of matches, what is a round to a tournament.
      • ?
      • mekhami
        the same thing, but the order of rounds can be important
      • Venomen is now known as Venomen`off
      • mostly to calculating who had the best tiebreakers at the end of the event
      • djapo
        is there a fix number of rounds?
      • mekhami
        number of players in the event/2
      • aarose joined the channel
      • so not fixed, based on user entry
      • djapo
        if so you could do a, round1 round2 .. roundn field layout .. hmm never mind
      • what o you mean parent child granchild database structure, are you talking about using multiple databases or just model relations?
      • vmand_000 has quit
      • mekhami
        model relations
      • i wonder.. if i could just have a round_number attribute in my MATCH model.. that is determined by the ordering in the formset...
      • djapo
        mekhami: are there any fields on the round that can be use to sort them by?
      • matason joined the channel
      • Venomen`off is now known as Venomen
      • mekhami
        on the round? not yet it literally only has a foreignkey to event
      • djapo
        mekhami: doesn't match already have a relation to a round? what would be the point of having the round number on the match than?
      • mekhami
        i haevn't put the round number on the match yet because i just thought of it and i don't know exactly how to implement it
      • because the round number would have to be determiend by the formset
      • evildmp joined the channel
      • aarose has quit
      • djapo
        when you said event, did you mean match?
      • mekhami
        event = tournament
      • in the parent/child/grandchild structure: match has fk to round, round has fk to event
      • but i'm wondering if i can eliminate round entirely
      • djapo
        hmm, where would you store who won the round. or would you calculate that every time from who won the match?
      • mekhami
        that can be calculated by p1wins and p2wins from the form
      • m0rpho joined the channel
      • Itkovian joined the channel
      • hell_razer joined the channel
      • harichetlur joined the channel
      • djapo
        hmm, sounds like there is alot of implementation details i don't know about your project. like if an event is going to have rounds and those rounds have matches it sounds to me like you might want through models
      • dmitry_mikhaylov joined the channel
      • citizen-stig has quit
      • merb joined the channel
      • faldridge has quit