dodobas: oh no you go home and tell them you're recording them so they can't run amok
or tell them since they only did 1/2 of what you asked, you only pay them 1/2 the money :)
stavros0x00 joined the channel
oh there's even a PR for that remaining release blocker
Basti_BRG
just looked at the PR ;) It seems there was a fugly solution at first ;)
dodobas
shangxiao: and then thay sue me for harassment :)
shangxiao
sue them for dereliction of duty or something ;)
ironfroggy joined the channel
dodobas
shangxiao: there is still hope, maybe someday ... they embrace the responosibility, maybe ... :)
idwaker joined the channel
X-virus joined the channel
mike_papa joined the channel
mike_papa
Hello. I just created app "main" in my project. It has a simple "hellow world" type view, and nothing else in it. Django complains "django.core.exceptions.ImproperlyConfigured: 'main.apps.AppConfig' must supply a name attribute."
shangxiao
mike_papa: did you create the app using `./manage.py startapp` ?
mike_papa
I've never touched apps.py file, and it has MainConfig class in it with name attribute set to "main"
shangxiao: Yes.
Django 1.9.6
shangxiao
mike_papa: can you dpaste.de the code + full traceback?
vmonteco joined the channel
mike_papa
shangxiao: Sure. Give me sec please.
vmonteco
Hello!
mike_papa
shangxiao: Here is code: https://dpaste.de/Zv6E (I have touched only views.py - no other files were ever edited)
I'm trying to set up nginx to serve a Django project. I found this conf file : http://bit.ly/2aFqV1Q But I don't get how the wsgi.py file is used in it.
iivvoo
anyone here using huey as taskrunner?
mike_papa
Oh... sorry. I did edit urls. But it doesn't look like urls problem.
vmonteco
(When using it I get a 400 : bad request)
iivvoo
I have the impression huey completely halts when a crontab tasks raises an exception
jtiai
vmonteco: You need something to serve django. Like uwsgi or gunicorn.
iivvoo
but I can't really reproduce this in a minimal non-django setup because huey won't even run any tasks there (but does pick them up)
jtiai
vmonteco: That example actually seem to use uwsgi, so you need to configure uwsgi to serve django
jarshwah
mike_papa: main.apps.AppConfig should be main.apps.MainConfig
vmonteco
jtiai: I installed uwsgi and copied the uwsgi_params file into my project, but is the wsgi.py file used from uwsgi or from nginx? AFAIR, with apache, I gave a reference to my wsgi.py file in my apache conf files.
jtiai
vmonteco: uwsgi. nginx just proxies requests to uwsgi.
mike_papa
jarshwah: Thanks. Code completition makes me so lazy sometimes, and I overlook those small things.
Works good now.
jarshwah
it happens :) no problem
peibolvig joined the channel
vmonteco
jtiai: Ok, so if I understand well, I must configure uwsgi to pass those requests to the wsgi.py file?
jarshwah
I've been meaning to write a blog post (and setup a blog to do so..) explaining an "easy" way of deploying django on uwsgi + nginx
vmonteco: gimme one minute, I'll give you a gist
shangxiao
Funky Bob already has a easy django + uwsgi + nginx deployment blog post ;P
hi, i have a requirement where i need to call os level commands like file copy, move, rename etc from a web application., are there any frameworks on the web that i can leverage ?
fleetfox
automation?
johnmilton has quit
look at ansilbe/salt
t0n1c
hi totally django noob, I was wondering if there is some way to treat templates as a scaffold where you can build more powerful apps? is that even within the Django philosophy?
fleetfox
t0n1c: no, django achieves everything with composition. No code generation
jarshwah
shangxiao FunkyBob good guide up until I got to "We'll be running uWSGI in emperor mode."
t0n1c
fleetfox: interesting, what do you mean by composition? some article where I can check that?
jarshwah
my "protip" is to install uwsgi into the virtualenv, then use the init system to launch it
emperor mode sucks for automation if you're running multiple sites under different pythons
fleetfox
t0n1c: you have inheritance and overloading for templates, why do you want to scaffold anything
shangxiao
interesting
jarshwah
however, I run redhat not debian.. so maybe you can selectively bring in both python2 and python3 plugins into the same uwsgi emperor
gianluca_r joined the channel
t0n1c
ok cool got it
jarshwah
if that's the case (using apt) then emperor would be fine
t0n1c
thanks
fleetfox
t0n1c: do you come from rails?
t0n1c
fleetfox: hehe kind of, first time I learned MVC pattern was using rails
Is it possible to raise a HTTP 400, similar to a form validation error, from a model clean()? We have a constraint that we wish to enforce on the model level, but any errors raised in model clean() will lead to Django raising HTTP 500 in response. The constraint needs to be on model level.
lumidify joined the channel
kezabelle
not unless you implement it yourself, or find a package whose middleware handles that, AFAIK
jtiai
iceboxx: Surely you can do that.
Leeds has quit
fleetfox
maybe fabric
jarshwah
gianluca_r: only obvious thing I can see is you're missing *args, **kwargs from the save() defintion and call site
iceboxx
jtiai: i was hoping there is a name for what i am trying to do.. :) other dev's who have attempted to build a bridge across
the_rat
VaticanCameos: you are supposed to raise ValidationError
iceboxx: Well your problem is how to launch something that can receive events from remote site on "client" machine.
iceboxx: Once you resolve that problem, rest is really easy to do.
iceboxx
jtiai: exactly!!
VaticanCameos
the_rat: So if my custom exception is a subclass of ValidationError, that should do?
gianluca_r
jarshwah: it doesn't change, i have overridden that method before without specifiyng "*args, **kwargs"; if they're not in the `def save(...` method definition are not needed to be passed, so that's not the point imHo
the_rat
VaticanCameos: never had to do that, but I would guess so...