unicode error with no data?
The unicode error appears to be GroupRegistration but there is no data in that table as yet!
I checked that by rem the inlines in admin.py and separately the grup line in Register
Caught UnicodeEncodeError while rendering: 'ascii' codec can't encode character u'\xf6' in position 26:
ordinal not in range(128)
In template/home/gplectures/webapps/v31gpl/lib/python2.7/django/contrib/admin/templates/admin/edit_inline/tabular.html
,
error at line 50
model
class GroupRegistration(models.Model):
practice_id = models.CharField(max_length=30)
practice_name = models.CharField(max_length=255, null=True, blank=True)
principal_contact = models.CharField(max_length=150)
email = models.EmailField("Email ")
password = models.CharField("Password ",max_length=15)
invoice_address = models.CharField("Address ", max_length=100, null=True, blank=True)
inv_address_2 = models.CharField("Address ", max_length=100, null=True, blank=True)
town_city = models.CharField("Town/City ", max_length=50, null=True, blank=True)
postcode = models.CharField("Postcode ", max_length=50, null=True, blank=True)
county = models.CharField("County ", max_length=75, null=True, blank=True)
number_to_register = models.IntegerField()
def __unicode__(self):
return self.practice_name
class Register(models.Model):
userprofile = models.ForeignKey(UserProfile)
group = models.ForeignKey(GroupRegistration)
admin
class RegisterInline( admin.TabularInline ):
model = Register
extra = 5
class GroupRegistrationAdmin( admin.ModelAdmin ):
inlines = [RegisterInline]
list_display = ('practice_id', 'principal_contact',)
class Media:
js = (
'/media-tiny_mce/tiny_mce.js',
#'/media-tiny_mce/tiny_mce_gzip.php',
'/media/js/editor.js',
)
admin.site.register( GroupRegistration, GroupRegistrationAdmin )
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.
For more options, visit https://groups.google.com/groups/opt_out.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home