Wednesday, September 17, 2014

Re: UdateView Issues

Show us the URLs - the update url requires either a slug OR a pk - one is sufficient, so you don't need to set up a slug. But the update cbv can only be called from an object's url (the one that you would like to update) - it can't be called from just anywhere.

cheers
L.

On 18 September 2014 02:51, Michael Martin <mikemartin221@gmail.com> wrote:
Collin,

You are right I was missing the .as_view()

I am now getting an exception:
Exception Value:
Generic detail view GeneralConfigurationUpdate must be called with either an object pk or a slug.


I looked at the example here and I don't see anything mentioning setting up a slug.  I believe a slug is when a previous url redirects with a value attached such as (?P<pk>[0-9]+)

Does this mean that I have to create an additional view to pass the object that I am interested in?



On Wed, Sep 17, 2014 at 8:16 AM, Collin Anderson <cmawebsite@gmail.com> wrote:
are you calling as_view() when installing your view in urls.py?

Could you post the rest of the traceback?

--
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/86cd4f96-f6ed-4e79-a35a-e8a27e3cbd79%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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/CAD0urK3QzNmnXDVGf9d5%2B0VcaMPBCuWJwEmCUKHorkB7inoJxA%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.



--
You have to be really clever to come up with a genuinely dangerous thought. I am disheartened that people can be clever enough to do that and not clever enough to do the obvious thing and KEEP THEIR IDIOT MOUTHS SHUT about it, because it is much more important to sound intelligent when talking to your friends.
This post was STUPID.
-----------------------------------------------------------------------------------------------------------
The Most Terrifying Thought Experiment of All Time http://www.slate.com/articles/technology/bitwise/2014/07/roko_s_basilisk_the_most_terrifying_thought_experiment_of_all_time.html

--
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/CAGBeqiNQrnrDvH-MEMHG-7GBU1_iMie5qcUX5%2BSzFQm0n8yBBQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment