Woah there.
Ok, well it's hard to help without more info, but here are some tips:
- please don't ask a community project to "reply soon". We will reply
when and if we can. Obviously ideally we would reply, and speedily,
but we get what we got.
- How to save the ForeignKey on an item? Well assign it. FYI, it's
incredibly difficult to help without some code to look at. HAving said
that, the Django documentation is *excellent* and you should utilise
it - like I said in my original emails, ModelFormsets are your friend,
you should look into them.
- With errors, sending them raw is not a way to get them solved. They
way I solve errors like that is to Google the error, and then look at
the line of code indicated:
"EOL while scanning string literal (views.py, line 31)" <- views, line
31. Maybe line 30, probably line 31. If Google doesn't help, and you
do need to ask here (which may well be the case), you MUST include
line 31 (pref the lines 25-35) so we have an idea of what is going on.
- The error "The view librehatti.bills.views.final didn't return an
HttpResponse object. It returned None instea" means your return
statement in the view final isn't sending a proper object back -
either change the return statement, or figure out why it's sending
None. Again, without any context at all, it's very hard to help you.
cheers
L.
On 2 July 2014 06:16, Aashita Dutta <aashitadutta@gmail.com> wrote:
>
>
> On Tuesday, July 1, 2014 5:58:59 PM UTC+5:30, Lachlan Musicman wrote:
>>
>> Hi Aashita,
>>
>> There's a couple of things happening here. I'm no expert and this is a
>> rushed end of evening email.
>>
>> For getting the obj.save() to work, here:
>>
>> cd = form.cleaned_data
>> newPI = PurchasedItem()
>> newPI.name = cd['quote_item']
>> newPI.qty = cd['quote_qty']
>> newPI.save()
>>
>> You now have a new PurchaseItem with a name and a qty.
>>
>> Having said that, is there a reason you aren't using ModelForms and
>> Generic Views?
>>
>> Then there's the PurchaseOrder. Will there be other PuchaseItems on
>> the order? Is it ManyToMany?
>>
>> If it is, it might be better to have the PurchaseOrder Form, with
>> PurchaseItem as an attached ModelFormset - in that way you can have as
>> many PIs on you PO as you want.
>>
>>
>
> now new error is coming-
>
> The view librehatti.bills.views.final didn't return an HttpResponse object.
> It returned None instea
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscribe@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/aa9f7896-e19a-46f5-ae5f-830a0484106e%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.
--
The idea is that a beautiful image is frameable. Everything you need
to see is there: It's everything you want, and it's very pleasing
because there's no extra information that you don't get to see.
Everything's in a nice package for you. But sublime art is
unframeable: It's an image or idea that implies that there's a bigger
image or idea that you can't see: You're only getting to look at a
fraction of it, and in that way it's both beautiful and scary, because
it's reminding you that there's more that you don't have access to.
It's now sort of left the piece itself and it's become your own
invention, so it's personal as well as being scary as well as being
beautiful, which is what I really like about art like that.
-----------------------------------------------------------------------------------------------------------
Adventure Time http://theholenearthecenteroftheworld.com/
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAGBeqiO58hZecxUcYPCeb2usx%2B7_DpAPt-tCqYAD8ppb2qi9tQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment