so there's no error... and you've restarted the service?
iron_houzi
FunkyBob: The service restarts itself, no? It certainly looks like it in the konsole output. Also, if I remove the argument to the tag (3), I get an error: get_upcoming_events did not receive value(s) for the argument(s): 'count'
OK, so the template is just compiled and checked, but the template tag itself is never called
people using uwsgi, do you install thisin your virtualenv our system ?
MAWIND has quit
ticketbot has quit
Nightwalkerkg has quit
ticketbot joined the channel
iron_houzi
FunkyBob: the extended "base.html" has a {% block content %}{% endblock %} yes
subho has quit
mattmcc
fission6: Either works for me. I tend to default to the distro package if it's new enough, and only install it in the virtualenv if I need a newer version.
shangxiao has quit
iron_houzi
FunkyBob: Perhaps I should try with an inclusion tag, just for good measure
fission6
alrighty
rpkilby joined the channel
mattmcc: having it outside the virtualenv is making it easy for upstart scripts
jessamynsmith joined the channel
_1k5 has quit
MAWIND joined the channel
jessamynsmith has quit
kenbolton joined the channel
ambar has quit
kenbolton has quit
FunkyBob
fission6: I prefer to pip install uwsgi... then I don't have to worry about plugins [default build includes all the plugins I use]
kenbolton joined the channel
also for some time the distro versions were too old
fission6
well i was asking do you install uwsgi system wide or in a venv
FunkyBob
since I use emperor, system wide
govg has quit
shangxiao joined the channel
MAWIND has quit
rpkilby has quit
shangxiao has quit
k3va joined the channel
Genitrust has quit
Genitrust joined the channel
danifus joined the channel
tmTim has quit
bcSquared
Alright. I need another pair of eyes. I had both of these forms loading last night, and now it's giving me a ManagementForm error when I get to rendering the inlineformset. https://dpaste.de/jVyT here is the template, and here is the view https://dpaste.de/3SEN
tchalla has left the channel
FunkyBob
shouldn't it be {{ lines_formset.management_form }} ?
look at the rendered page, see if anything actually renders from that
rpkilby joined the channel
mihow has quit
rpkilby has quit
nurulwai joined the channel
geetar has quit
bcSquared
But it is {{ lines_formset.management_form }} ... isn't it? Honestly at this point you could tell me I have the mark of the devil in my code and I'd probably believe it.
knbk
bcSquared: you should remove {{ form.management_form }}
my guess is you need to pass None instead of request.POST when you want an unbound formset to render
joke2k has quit
sans_s3r1f joined the channel
ybathia has quit
bcSquared
fuck. doing request.POST or None actually worked.
but why.
canton has quit
knbk
by passing anything other than None as the first argument, the formset becomes "bound", and validates all the data
bcSquared
and now back to my problem from last night. at least i feel like i got back to square one. lol
knbk, ah. cool.
DLSteve joined the channel
for shits and grins - https://docs.djangoproject.com/en/1.9/topics/fo... does this article not assume that an author_id is being passed to the view? Suggesting that the Author object already exists in which the Books are being created for?
fission6
any ideas why if i daemonize uwsgi in an upstart script i can do sudo service uwsgi start, but not stop, i get stop: Unknown instance:
sans_s3r1f has quit
tmTim joined the channel
tmTim has left the channel
tmTim joined the channel
sans_s3r1f joined the channel
knbk
fission6: don't daemonize it
fission6
apparently not
donspaulding has quit
FunkyBob
fission6: otherwise upstart can't keep track of it
fission6
yea but why!
FunkyBob
because it detaches from its controlling process
that's what daemonising is
and generally, it's someting most programs have no business being able to do
MAWIND joined the channel
knbk
bcSquared: it does assume that
bcSquared
knbk, thank you. I just wanted to make sure I wasn't crazy. So how in the hell do you create a formset for children models when the parent model hasn't been created yet?
bcSquared strolls off to stackoverflow to leave some comments
FunkyBob
save the parent first
eperzhand joined the channel
and stop reading SO
bcSquared
I thought it was worth a shot. I wanted to mainly prove to myself that all I was going to get was an RTFM answer.
FunkyBob
consider -- admin quite happily lets you create a model and its inlines in one view
bcSquared
FunkyBob, how do you do that if they are created at the same time? Should I just bite the bullet and break it in to two steps?
nimomo joined the channel
FunkyBob
bcSquared: save the parent... save the inline...
I can't be much more specific as I almost never use formsets
knbk
RqfFormSet(..., instance=form.instance)
then save the form before you save the formset
bcSquared
hrmm. form.instance.
donspaulding joined the channel
holy shit.
I just jumped out of my chair. That actually worked, knbk.
nimomo has quit
knbk
haha glad I could help
MAWIND has quit
karanlyons
I wish formsets had access to the instance they were working with as opposed to just the parent.
jwarren has left the channel
FunkyBob
don't the forms in the formset have that?
karanlyons
Maybe?
codeitloadit joined the channel
I mean, clearly something *somewhere* knows about the instances.
sbogg has quit
mattmcc
Yeah, for form in formset: form.instance should work just the same.
shangxiao joined the channel
karanlyons
Yeah, you know, I said that thing and now I don't actually know what I was thinking.
mattmcc
:)
cloudy_nz joined the channel
sans_s3r1f has quit
karanlyons
My thought process was really "I wish I could change my fieldsets in a inlinemodeladmin based on the instance", and I don't think you can do that by going form -> formset -> inlinemodeladmin, because you can't define fieldsets on a form in the same way.
MAWIND joined the channel
shangxiao
it's a bad idea to change AUTH_USER_MODEL midway through a project isn't it?
karanlyons
At least, not last time I checked. Though I guess I could go crib whatever methods render fieldsets right now and put them in my own form.
shangxiao: Not *bad* necessarily, so long as you properly port all your data into the new model before switching.
tmTim has quit
shangxiao
it's bad due to the fk switching
karanlyons
You can port that, too.
mattmcc
That doesn't make it bad, just nontrivial.
knbk
shangxiao: porting to a new user model is far from simple, see #25313