mattmcc I'll just handle that later, just removed that part for now cuz the logic stuff isnt working properly, can you take a look into this other problem? https://dpaste.de/KizO
mattmcc
When you override request methods like get, post, etc, you still need to retain their ability to accept arbitrary keyword arguments, like pk.
Since it's one of the named groups in your urlpattern.
mribeirodantas has quit
WeiJunLi
mattmcc: oh alright added *args,**kw
The view app.views.CheckOutView didn't return an HttpResponse object. It returned None instead.
should I use render_to_response instead of render?
Zanetski has left the channel
mattmcc
To keep with the UpdateView workflow, on a valid post you should return a redirect. Normally UpdateView would return self.form_valid(form)
RicoAlpha has quit
kenbolton has quit
eVRiAL has quit
WeiJunLi
mattmcc: where is that info? I can't find in the docs, also in the docs I only see 2 things about UpdateView
I can load css and js files but the images in the line 135, 141 and 147 are not rendered. However, if I go to the url, i can see the images. Does somebody know why this is not working? http://hastebin.com/ogujedelur.django
mfcovington joined the channel
SecondForm_Glenn joined the channel
mattmcc
WeiJunLi: You're not returning anything if the form is invalid.
Nux17
metaljack34: Is the path correct ?
mattmcc
It'd probably be easiest to just call up to the parent method with super()
metaljack34: What does "manage.py findstatic img/slide_one.png" say?
WeiJunLi
mattmcc: if form.is_valid() ?
metaljack34
mattmcc: Found 'img/slide_one.png' here: ~/prj/static/img/slide_one.png
Nux17
WeiJunLi: Yep, this is how you can tell a form is valid or not
mattmcc
metaljack34: Okay, so it's probably not a Django issue.
You're not seeing 404s in Firebug or other inspector tools, are you?
metaljack34
mattmcc: Nope, I can actually see the thumbnail of the image if I hover the link in the firebug
mattmcc
So, yeah, it'd be a CSS thing.
Nux17
Should be a CSS issue then
mattmcc
Maybe the divs just aren't big enough to see the image.
Or Bootstrap is doing something strange.
WeiJunLi
mattmcc: I've added def form_valid(self, form): super(CheckOutView, self).form_valid(form) but I keep receiving the same errr
elsimir joined the channel
mattmcc
WeiJunLi: It's saying you're not returning a response if the form is _not_ valid.
metaljack34
mattmcc: I see. The plain html template actually works. Anyway, I'm gonna play with the html. Thanks
voodoo-burger has quit
pax- has quit
WeiJunLi
mattmcc: can you be more specific?
pyCasso joined the channel
microdex has quit
mattmcc: I think it is pretty clear, if form.is_valid() return the render success_url otherwise form = form_class
metaljack34 has quit
if I have a post() why would be necessary a form_valid(), don't get it.
because in post it verify if the form is valid or not :\
FunkyBob
WeiJunLi: in a CBGV? because it's a hook point for you to decide what happens when the form is deemed valid
SteenJobs
any idea why manage.py migrate wouldn’t be detecting migration files? i’m trying to load fixture data and it tells me a column doesn’t exist…yet it exists in the models.py file and in a specific migration file.
WeiJunLi
FunkyBob: so would def form_valid(self, form): return super(CheckOutView, self).form_valid(form) be enough ?
mattmcc said it isn't returning a response if the for is _not_ valid and I'm not sure what he did mean by that
Nux17
SteenJobs: happened to me, finished setting the column manually through my SQL admin
FunkyBob
WeiJunLi: if that's all it did, you wouldn't need to override it
what do you want to happen when the form is valid?
I haven't seen any of your code, yet, so...
SteenJobs
Nux17: it would involve a lot of manual work though…i presume if this column doesn’t exist then there are a bunch i’d have to create in postgres from scratch, so ideally i’d like to get manage.py migrate to work...
sudomarize
mattmcc, i'm getting "Cannot use object with type float for a geometry lookup parameter." when trying to run migrate after setting up postgis. Any ideas as to what could be the problem?
FunkyBob
sudomarize: you've passed a float for use in a geometry lookup