#django

/

      • doebi
        stupidystupidmcs: wash your mouth, please
      • belak has quit
      • aberrant joined the channel
      • Evanlec
        stupidystupidmcs: this is the wrong channel to hate on django ;)
      • garrypolley joined the channel
      • greg5green has quit
      • sonofdirt has quit
      • estebistec has quit
      • mstrcnvs
        stupidystupidmcs: follow the official tutorial https://docs.djangoproject.com/en/1.6/intro/tut...
      • estebistec joined the channel
      • aberrant has quit
      • Evanlec
        mattmcc: is there a way I can get on each page which result # we're looking at? for example, results_per_page=15 so on page=2 I display "showing results 16 through 30"
      • crisisking has quit
      • sonofdirt joined the channel
      • I suppose I could do some simple maths
      • stupidystupidmcs
        i have... that tutorial isnt written for beginners... its really hard. i cant get through it
      • dali has quit
      • crisisking joined the channel
      • aberrant joined the channel
      • tbaxter
        OK, set up a Virtualenv and pip install django. You have now set up django
      • mattmcc
      • stupidystupidmcs
        i tried to set up ubuntu. i cant do that either
      • mstrcnvs
        Evanlec: page.start_index(); page.end_index()
      • tbaxter
        and are you really saying the poll tutorial isn't written for beginners?
      • straycat joined the channel
      • stupidystupidmcs
        tbaxter, i mean, im a beginner, and i cant do it.
      • Evanlec
        mstrcnvs: mattmcc awesome, ty
      • tbaxter
        go through it again. The poll tutorial is very much written for beginners. It is not difficult.
      • But lets back up...
      • stupidystupidmcs
        im very stupid.
      • tbaxter
        Have you successfully installed django?
      • doebi
        stupidystupidmcs: at least you managed to join irc, so your not that stupid
      • stupidystupidmcs
        yes. django is installed. and postgres
      • tbaxter
        everybody is stupid. just about different things. That's no excuse.
      • estebistec has quit
      • OK, good. You're well on your way.
      • stupidystupidmcs
        doebi... it took me 30 minutes just to get irc working.
      • tbaxter
        You ARE getting the "welcome to django" page, correct?
      • SmileyChris joined the channel
      • SmileyChris has quit
      • garrypolley has quit
      • stupidystupidmcs
        tbaxter, yes i have welcome to django. the next step is to set up and link the sqlite db. mine isnt linking.
      • mstrcnvs
        it's a matter of habit, new technologies are hard to learn, by default
      • to everyone
      • Fuyou
        tbaxter he problem not being django beginner it seems, he is beginer on whole IT thing I believe
      • mstrcnvs
        stupidystupidmcs: sqlite or postgres?
      • tbaxter
        OK. Now you need to decide if you want a sqlite db, or, since you already installed postgres, if you want to use it.
      • Ergo joined the channel
      • Django doesn't really care which one you use. Postgres is obviously better, but sqllite MAY be easier to set up.
      • stupidystupidmcs
        i dont care which db i use. postgres looks neat. i cant get either to run
      • tbaxter
        OK, so you have a problem in your DB settings?
      • stupidystupidmcs
        fuyou, yes, IT beginner and stupid at life in general
      • Fuyou
        sqlite much easier to begin
      • tbaxter
        Tell us what error you're seeing.
      • davividal has quit
      • Goopyo has quit
      • MattBlack123
        You must say guys that for a very beginner setting up a sql server, create user and give privileges could be a little trivial
      • Gwildorix
        Weird that he must learn Django as a first project for learning Python... bad order
      • Fuyou
        stupidystupidmcs as different matter, I still recommend you to learn using linux, as dev community mostly rotates around it - this helps in many ways
      • Gwildorix
        Django is not a good way to learn Python at all xD
      • dfunckt joined the channel
      • nkuttler
        Gwildorix: worked for me
      • F1skr joined the channel
      • stupidystupidmcs
        fuyou, i tried to set up ubuntu today and failed utterly
      • Fuyou
        Gwildorix It may, if you say know Rails or general knowbledge about dbms, web etc
      • aberrant has quit
      • Gwildorix
        True
      • tbaxter
        Worked for me, too, but I agree with Gwildorix, it's much easer if you know python first.
      • Gwildorix
        I knew Python pretty well, but didn't knew MVC theory at all, and I really had a hard time learning Django and hated it as well, but then I learned MVC through Pylons (now Pyramid), and re-learned Dango, and now I love Django :p
      • tbaxter
        stupidystupidmcs: so if you're not working in ubuntu, what are you working in?
      • stupidystupidmcs
        ok, the current error i get. in the django tutorial. it wants me to sync the db. i wrote, C:\Python27\python manage.py syncdb and i get the following error - django.db.utils.OperationalError: unable to open the db file
      • tbax, im in wndows
      • Fuyou
        stupidystupidmcs I would recommend OpenSuse for its Yast GUI manager to do many things "windows-like"
      • stupidystupidmcs how (did?) you config your database settings in settings.py ?
      • sxn has quit
      • sxn joined the channel
      • tbaxter
        OK, two things: (1) get off windows as soon as you can figure out how to. It sucks to develop python in, and will cause you a lot of unneeded pain. Two, you may want to show your db settings files. Either the path the sqlite file is wrong, or you need to give the sqlite file permissions.
      • adamduren has quit
      • adamduren joined the channel
      • Z_A_M has quit
      • stupidystupidmcs
        in the class we will use os x, but to get into the class i need to write an app in django
      • MattBlack123
        What kind if app? Just asking
      • SmileyChris joined the channel
      • Of*
      • mstrcnvs
        stupidystupidmcs: you need to write a django app before learning django?
      • that's really... weird.
      • stupidystupidmcs
        yes... its unfair right
      • hexus0
        is there a way to have select_related return products even if no relationships exist
      • I want it to return the product and any of the listed relationships if they exist
      • stupidystupidmcs
        the app i need to make is... "make an app that allows users to edit, update and delete a list of contacts"
      • Z_A_M joined the channel
      • hexus0
        I'm sorry return results*
      • not products
      • stupidystupidmcs
        "deploy the app live somewhere, like on a free heroku account"
      • nkuttler
        stupidystupidmcs: that's like 20 lines of code
      • mstrcnvs
        ok, that's easy, but not for a person that doesn't know python
      • Z_A_M has quit
      • futuredale has quit
      • nkuttler
        stupidystupidmcs: that's your task before the class starts?
      • stupidystupidmcs
        yes, there are two others. one was in python. i already wrote the python one
      • AntelopeSalad
        has anyone compared pycharm to django-pipeline's sass watcher?
      • nkuttler
        pfff
      • Fuyou
        dump that class to hells granny
      • stepmr joined the channel
      • nkuttler
        really.. deploy on heroku? that's just silly
      • stupidystupidmcs
        this is the python thing: Use object-oriented Python to model a public library (w/ three classes: Library, Shelf, & Book). * The library should be aware of a number of shelves. Each shelf should know what books it contains. Make the book object have "enshelf" and "unshelf" methods that control what shelf the book is sitting on. The library should have a method to report all books it contains.
      • i already wrote that one.
      • mstrcnvs
        AntelopeSalad: you need a sass watcher?
      • F1skr has quit
      • stupidystupidmcs
        and the last one is: Make a simple html page to manage Todos. It should have an input field. When the user enters text in the input field, add that input to the top of the Todo list.
      • AntelopeSalad
        mstrcnvs: nope, but i'm using both pycharm as an ide and django-pipeline to manage assets
      • mstrcnvs
        I see
      • AntelopeSalad
        pycharm has a plugin for sass reloading but django-pipeline seems to also support doing it for you too
      • Dr_ST has quit
      • i was just curious if anyone compared the 2
      • zapo joined the channel
      • nkuttler
        stupidystupidmcs: fwiw, you could use a linux live distribution that can write to your hd. it will probably be much easier to work in such an environment
      • nicholasserra has quit
      • stepmr has quit
      • codeinthehole has quit
      • gazumps has quit
      • mstrcnvs
        or a VM!
      • gazumps joined the channel
      • nkuttler
        or a vm, right
      • stupidystupidmcs
        yeah i tried to set up ubuntu, i cant get that to work either
      • nkuttler
        stupidystupidmcs: hence the live cd
      • or just google a digitalocean promo code and get a free box for 1-2 months..
      • or use the aws free tier (pita)
      • djapo joined the channel
      • quake_guy has quit
      • stupidystupidmcs
        nkutt, that looks really hard...
      • nkuttler
        stupidystupidmcs: what looks hard?
      • stupidystupidmcs
        digitalocean
      • i just went to the website
      • nkuttler
        hence the live cd suggestion. heh, that was my first suggestion..
      • stupidystupidmcs
        where you burn the ubuntu cd? i did that
      • siqi joined the channel
      • ok for the db settings.. since im trying to use sqlite.. the only thing i changed was the db name - 'NAME': os.path.join(BASE_DIR, 'C:/Python27/retardland/mysite/database'),
      • i left everything else default.
      • radez is now known as radez_g0n3
      • glosoli joined the channel
      • klysium joined the channel
      • Pullphinger has quit
      • mstrcnvs
        stupidtstupidmcs: use os.path.join(BASE_DIR, 'database.sqlite3'),
      • faldridge joined the channel
      • jaycedars has quit
      • F1skr joined the channel
      • the_rat has quit
      • faldridge has quit
      • faldridge joined the channel