okcomputer: but ya, you're probably better off with your VPS !:)
Kingino has left the channel
okcomputer
johnnny22: the benefit of it is you can fix problems yourself. I had a host where the database servers dns systems went down and the site crashed
johnnny22
okcomputer: webfaction proxies all through nginx, dispatched to an apache wsgi setup for django. By default, but you can run your supervisord and so forth if your prefer.
okcomputer: yeah, you're seriously, for sure, definitely better with your vps !! :)
okcomputer; you have 100% control! :)
tbaxter
rns: did you check the path and perms?
rns
tbaxter, path is correct
johnnny22
okcomputer: webfaction just made it for me, since it's simple to setup things for small to medium sites like tbaxter said, and it's very django friendly. They have a setup tool that sets a django app for you :P (oooh lazy me)
okcomputer
johnnny22: now that django is serving properly, if i change the '/' url will it serve a default view or does that need to be created?
tbaxter
rns: and the perms?
rns
tbaxter, and permissions are okay...I get the same error with sudo
tbaxter, actually correction
tbaxter, with sudo I get this error: ImportError: No module named django.core.management
okcomputer
johnnny22: i hate app setup tools personally. i'd rather do it the dirty way :)
bforbes has quit
tbaxter
rns: you said this was a virtualenv, right?
rns
tbaxter, yes
kanja has quit
johnnny22
okcomputer: keep your nginx.configs as is, and setup your urls.py so that /^ gets handled by a view. You can use one of those generic views to simply return a static file like an html page.
tbaxter
and there's probably a python install on the system, as well as the virtualenv… open up manage.py and look at the first line
wilywonka has quit
johnnny22
okcomputer: basically, now all that needs to be changed is in django :)
okcomputer: that`s in the ideal situation. You can always make your nginx return some pages statically, but they won't be handled by django then.
InvidFlower joined the channel
codygman
In Django's new configurable user model do I need to specify things like has_perm, is_staff, etc?
jamescarr joined the channel
mattmcc
Not if you use AbstractUser.
johnnny22
okcomputer: you could add (r'^/', TemplateView.as_view(template_name="index.html")), in your urls.py for example (PS: TemplateView is in from django.views.generic import TemplateView )
okcomputer
johnnny22: thats my plan. leave the server config alone and work within django
rns: tell you what.. run manage.py start project, and see what it puts in the created manage.py in the new project
okcomputer
johnnny22: i did the tutorial on my mac, but using the dev server and sqlite. everything changed once i tried to install on a real server
johnnny22
okcomputer: the concepts are still similar, update your urls.py to point to a view (either hand-made view or a generic one with the proper arguments) and voilĂ
okcomputer
i'd have to say the docs for production servers are not too detailed probably because of the number of variables involved
Dearon
tbaxter, for me manage.py always uses /usr/bin/env since Python will be the same both in and outside of a virtualenv
johnnny22
okcomputer: oh and restart your gunicorn ;o)
kanja has quit
okcomputer: gotta head out ! getting well needed shoes.. mine are sooooo old and full of salt :o/
okcomputer
johnnny22: salt?
johnnny22
okcomputer: ya, winter salt :P
okcomputer: we use salt on our streets here :P
Dearon
tbaxter (and rns), the error "ImportError: No module named django.core.management" suggest to me that Django is not installed in either the virtual enviroment or that rns's isn't running Django from the virtual enviroment
jSanp has quit
okcomputer
johnnny22: i'm in AZ, no snow
johnnny22
okcomputer: ooh, i'm in Montreal :P
okcomputer: lucky you !:P
tigerbreath has quit
bbradley joined the channel
tbaxter
Dearon: you came late. He can run most (but not all) manage.py commands
okcomputer
johnnny22: thats cool, i've only been to toronto
but i'm going to BC this summer
johnnny22
okcomputer: next time, do that extra 5.5 hours of road and come see this place :)
Dearon
tbaxter, aah okay, that does make it a lot weirder then yeah
okcomputer
johnnny22: i heard its a great city actually
johnnny22
okcomputer: but be ready to cross french speaking people :)
tbaxter
I think it's a venv/path issue
johnnny22
okcomputer: and in montreal, most are bilingual (most is probably relative a bit)
Dearon
It does seem like the most likely problem based on that error
lightstrike has quit
Ariel_Calzada has quit
johnnny22
okcomputer: BC is nice too :)
Ariel_Calzada joined the channel
jSanp joined the channel
jSanp has quit
jSanp joined the channel
okcomputer
johnnny22: I've been to france and most of them spoke enough english to communicate with
johnnny22
lol
okcomputer; then you'll probably be way better off in Mtl, must more bilingual usually
okcomputer
my neighbor is canadian, he always says eh? after everything
markekramer has quit
johnnny22
okcomputer: ooh those canadians :P
okcomputer: i should say, ooh those english speaking canadians :P
eh ? :P
lol
averagecase joined the channel
okcomputer; ok, we are way off topic now, should get back to my things :0
okcomputer
johnnny22: crazy canadians
yeah me too
johnnny22
ttyl
enjoy django! :D
okcomputer
thanks
moreisee joined the channel
johnnny22 bows
cheshair
Hi! I have this url "/model/<some-slug>/add-submodel/" that creates a new SubModel instance with a FK set to "some-slug" Model instance.
okcomputer
no need, i bow to you
prudnikov joined the channel
cheshair
I would like the url to be served by a CBV
Ariel_Calzada has quit
but I need some tips on how to make the creation form aware of my "some-slug" thing
tbaxter
createView, plus capture the slug in dispatch()
markekramer joined the channel
cheshair
tbaxter: dispatch... nice, that's what i was looking for, thanks!!!
jSanp has quit
ojii is now known as ojii|afk
Dearon
A CreateView can already take a slug field tho, can't it?
Dearon: yep you are right... that looks weird to me...
Dearon
I don't think it's used for anything
Sharebear joined the channel
cheshair
Dearon: it inherits that from SingleObjectMixin which is weird too since the object doesn't exist yet...
Dearon
At least, not that part of the SingleObjectMixin
But you might be able to reuse it fairly easily
JackH joined the channel
cheshair
Dearon: i see... but i am afraid it could be a bit of a hack, don't you think?
Ariel_Calzada joined the channel
Dearon: i prefer to do it more explicitly
kenbolton joined the channel
faldridge has quit
okcomputer
i'm getting an invalid syntax on urls.py, line 16 which i haven't modified is this still correct?: url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
Dearon
cheshair, You certainly could just copy and paste the small bit of logic used for slugs too