Great Thanks I will hunt around for it :)

On 22/08/2012, at 11:56 AM, Kurtis Mullins wrote:

> It looks to me like you might have a CharField with a max_length that is 
> greater than what your Database supports. That's my guess anyways :)
> 
> On Tue, Aug 21, 2012 at 9:21 PM, Mhlanga Bothin <mtshabalala....@gmail.com> 
> wrote:
> Hi,
> 
> I am very new to Django, I have created multiple models in my app. I am using 
> postgresql_psycopg2  as my data base. When I run ./manage validate it returns 
> without errors, sqlall works fine and when I syncdb it works as expected, the 
> issue occurs when I run syncdb a second time I get the following errors:
> 
> $ ./manage.py syncdb
> Creating tables ...
> Traceback (most recent call last):
>   File "./manage.py", line 10, in <module>
>     execute_from_command_line(sys.argv)
>   File 
> "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", 
> line 443, in execute_from_command_line
>     utility.execute()
>   File 
> "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", 
> line 382, in execute
>     self.fetch_command(subcommand).run_from_argv(self.argv)
>   File 
> "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 
> 196, in run_from_argv
>     self.execute(*args, **options.__dict__)
>   File 
> "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 
> 232, in execute
>     output = self.handle(*args, **options)
>   File 
> "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 
> 371, in handle
>     return self.handle_noargs(**options)
>   File 
> "/usr/local/lib/python2.7/site-packages/django/core/management/commands/syncdb.py",
>  line 110, in handle_noargs
>     emit_post_sync_signal(created_models, verbosity, interactive, db)
>   File 
> "/usr/local/lib/python2.7/site-packages/django/core/management/sql.py", line 
> 189, in emit_post_sync_signal
>     interactive=interactive, db=db)
>   File 
> "/usr/local/lib/python2.7/site-packages/django/dispatch/dispatcher.py", line 
> 172, in send
>     response = receiver(signal=self, sender=sender, **named)
>   File 
> "/usr/local/lib/python2.7/site-packages/django/contrib/auth/management/__init__.py",
>  line 54, in create_permissions
>     auth_app.Permission.objects.bulk_create(objs)
>   File "/usr/local/lib/python2.7/site-packages/django/db/models/manager.py", 
> line 140, in bulk_create
>     return self.get_query_set().bulk_create(*args, **kwargs)
>   File "/usr/local/lib/python2.7/site-packages/django/db/models/query.py", 
> line 416, in bulk_create
>     self.model._base_manager._insert(objs_without_pk, fields=[f for f in 
> fields if not isinstance(f, AutoField)], using=self.db)
>   File "/usr/local/lib/python2.7/site-packages/django/db/models/manager.py", 
> line 203, in _insert
>     return insert_query(self.model, objs, fields, **kwargs)
>   File "/usr/local/lib/python2.7/site-packages/django/db/models/query.py", 
> line 1576, in insert_query
>     return query.get_compiler(using=using).execute_sql(return_id)
>   File 
> "/usr/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", 
> line 910, in execute_sql
>     cursor.execute(sql, params)
>   File "/usr/local/lib/python2.7/site-packages/django/db/backends/util.py", 
> line 40, in execute
>     return self.cursor.execute(sql, params)
>   File 
> "/usr/local/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/base.py",
>  line 52, in execute
>     return self.cursor.execute(query, args)
> django.db.utils.DatabaseError: value too long for type character varying(50)
> 
> I have searched google and this list and have not been able to find any help. 
> Is there a limit on the amount of classes I cam specify in the models.py 
> file? Please let me know if you need any more information.
> 
> 
> Thanks a lot
> 
> Cheers
> 
> John
> 
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
> 
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to