On Wed, May 24, 2017 at 11:03 AM, Jim Anderson <[email protected]>
wrote:

> Hi James,
>
> I'm attaching the stacktrace as you requested.
>
>
Thanks. It is quite telling:

  File 
"/home/jja/testenv3.5/lib/python3.5/site-packages/django/db/backends/sqlite3/base.py",
line 337, in execute
    return Database.Cursor.execute(self, query, params)
django.db.utils.IntegrityError: UNIQUE constraint failed: siggy_stemplate.name


The object you are working with is having a 'name' clash with another
object of the same type. You've set the 'name' field to be unique, so
you'll need to ensure that each object has a unique value for the 'name'
field. Either check for uniqueness before assigning it, or attempt to save,
catch this exception, and generate a more unique value as needed, rinse and
repeat as necessary.

-James

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2Be%2BciXe1xbw0F9su1RsVbbN_jeGhFynzLjGExL%3DiSAwT45svw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to