Message info
 
To:django-users@googlegroups.com From:Sithembewena Lloyd Dube Subject:Re: Trouble setting up website with mysql as backend Date:Sun, 18 Mar 2012 18:09:54 +0200
 

Congrats :)

On Sun, Mar 18, 2012 at 8:55 AM, Swaroop Shankar V <swaroopsv@gmail.com> wrote:
AsAlasdair pointed out, i had few custom permission which had pretty big name. I reduce it and it got fixed. Thank you both for helping me out.

Thanks and Regards,
Swaroop Shankar V



On Sun, Mar 18, 2012 at 6:27 AM, Sithembewena Lloyd Dube <zebra05@gmail.com> wrote:
^^ What Alasdair said. If you still cannot solve this after shortening your models' names, can we see your models?


On Sat, Mar 17, 2012 at 11:54 PM, Alasdair Nicol <alasdair@memset.com> wrote:
On 17/03/12 20:49, Swaroop Shankar V wrote:
Hello All,
I was developing a website and the development was all done using sqlite database. Now the development is almost complete so i need to test the site using mysql. When i did a syncdb on a fresh database i got the following error:

Traceback (most recent call last):
File "./manage.py", line 19, in <module>
execute_manager(settings)
File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 438, in execute_manager
utility.execute()
<snip>

File "/usr/local/lib/python2.7/site-packages/django/contrib/auth/management/__init__.py", line 51, in create_permissions
content_type=ctype
<snip>

File "/usr/lib64/python2.7/site-packages/MySQLdb/cursors.py", line 92, in _warning_check
warn(w[-1], self.Warning, 3)
_mysql_exceptions.Warning: Data truncated for column 'name' at row 1

When you run syncdb for the django auth app, it creates permissions for your models [1]. It looks like it's trying to insert a permission with a name longer than 50 characters, so it's getting truncated. Perhaps you have:

* defined a custom permission with a really long name, or
* defined a model with a really long name so that "Can view <model>" is longer than 50 characters.

Regards,
Alasdair Nicol

[1]: https://docs.djangoproject.com/en/dev/topics/auth/#default-permissions

--
Alasdair Nicol
Developer, MEMSET

mail: alasdair@memset.com
web: http://www.memset.com/

Memset Ltd., registration number 4504980. 25 Frederick Sanger Road, Guildford, Surrey, GU2 7YD, UK.


--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.




--
Regards,
Sithembewena Lloyd Dube

--
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+unsubscribe@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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.



--
Regards,
Sithembewena Lloyd Dube

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.