> So If I create a newforms field then how do I tell the admin to use
> that when building the form in the admin?
If you need this in admin then possibly you have to define your own
newforms field
with validation. It may be called: myfields.MyField
Then you define descednant of CharField from django.db.models like:

class MyDBField(models.CharField):
    def get_internal_type(self):
        return "CharField

   def formfield(self, **kwargs):
        defaults = {'form_class': myfields.MyField}
        defaults.update(kwargs)
        return super(MyDBField, self).formfield(**defaults)

and you use MyDBField instead of CharField in your models.py file.

I've never tried this with Admin, so I'm not sure if this will do what
you want, but
it is simple enough to check it.

--
Maciej Wisniowski
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to