Re: How to use pre-built HTML forms in Django

2010-03-10 Thread esatterwh...@wi.rr.com
I would build a form using the forms library - subclass forms.Form and
let django do the validation for you and return the errors.

Once you have that bit in place, you can add your javascript
enhancements and logic ontop of it.

if need js funcionality for specific fields that Django doesn't
supply, you create acustom field widget to do that part. This would be
the easiest way.

It looks like by all of your posts you are trying to build a django
application with out any django!

On Mar 9, 11:26 am, MMRUser  wrote:
> So as per your knowledge can u suggest a proper way of getting data
> from a form but not as mentioned inhttp://www.djangobook.com/en/2.0/chapter07/
> that way is too rusty.
>
> Thanks.
>
> On Mar 9, 7:28 pm, rebus_  wrote:
>
> > On 9 March 2010 15:22, MMRUser  wrote:
>
> > > The problem I's having is that my HTML form depends upon lot of
> > > external resources like javascript validation libraries and lots of
> > > css on fields (and some may differ from each other), and I think that
> > > I don't need to use re-usable templates because I just want to design
> > > a one simple form so there's only one HTML file.Do you think that is
> > > it ok to just ignore the Django's template system and get along with
> > > the normal way.
>
> > > On Mar 9, 2:32 pm, rebus_  wrote:
> > >> On 9 March 2010 05:54, MMRUser  wrote:
>
> > >> > Thanks another doubt,what about the css mappings class="field text
> > >> > medium" do they also need to include in the class definition in
> > >> > Django.
>
> > >> > On Mar 9, 9:21 am, rebus_  wrote:
> > >> >> On 9 March 2010 05:04, MMRUser  wrote:
>
> > >> >> > I have an pre-built HTML form (means I design the HTML form
> > >> >> > separately) and I need to reuse it with Django form class
> > >> >> > (django.forms), So how do I incorporate my HTML form with Django 
> > >> >> > form
> > >> >> > class. for example
>
> > >> >> > HTML:
>
> > >> >> > 
> > >> >> >  
> > >> >> >  Username
> > >> >> >  *
> > >> >> >  
> > >> >> >  
> > >> >> >  
> > >> >> >  
> > >> >> > 
>
> > >> >> > How do I map this HTML in to Django form definition, I know that it
> > >> >> > can be done by modifying Django form fields according to this HTML.
> > >> >> > But I guess it's a time consuming approach,so I would like to know
> > >> >> > that is there any easy and time saving solutions for this issue.
>
> > >> >> > Thanks.
>
> > >> >> > --
> > >> >> > You received this message because you are subscribed to the Google 
> > >> >> > Groups "Django users" group.
> > >> >> > To post to this group, send email to django-us...@googlegroups.com.
> > >> >> > To unsubscribe from this group, send email to 
> > >> >> > django-users+unsubscr...@googlegroups.com.
> > >> >> > For more options, visit this group 
> > >> >> > athttp://groups.google.com/group/django-users?hl=en.
>
> > >> >> Well usually you first create a form in django and use its instance to
> > >> >> generate the HTML.
>
> > >> >> You can also write the HTML by yourself and all you need to be careful
> > >> >> of is that name and id attributes of you inputs and input type are
> > >> >> same as in the class you define.
>
> > >> >> Your HTML corresponds to:
>
> > >> >> class MyForm(forms.Form):
> > >> >>    Field11 = forms.CharField(label="Username",  max_length=255)
>
> > >> >> I highly recommend to first setup a form class then write HTML and
> > >> >> making form fields have more sensible names then Field11.
>
> > >> >> Also i suggest these links as further reading:
>
> > >> >>http://docs.djangoproject.com/en/dev/topics/forms/http://docs.djangop...
>
> > >> > --
> > >> > You received this message because you are subscribed to the Google 
> > >> > Groups "Django users" group.
> > >> > To post to this group, send email to django-us...@googlegroups.com.
> > >> > To unsubscribe from this group, send email to 
> > >> > django-users+unsubscr...@googlegroups.com.
> > >> > For more options, visit this group 
> > >> > athttp://groups.google.com/group/django-users?hl=en.
>
> > >> No, CSS classes are not defined in form class (as far as i know).
>
> > >> I would suggest using reusable form templates [1] and putting the CSS
> > >> classes on field wrappers for example.
>
> > >> This is what you are interested in:
>
> > >>http://docs.djangoproject.com/en/dev/topics/forms/#reusable-form-temp..
>
> > >> Which ever approach you decide to use is valid, but writing a bunch of
> > >> your own HTML for forms takes more time but is also more customisable,
> > >> on the other hand using shortcut methods such as "as_p" [1] or
> > >> "as_table" [2] is faster but you have less control over the outputted
> > >> HTML.
>
> > >> [1]http://docs.djangoproject.com/en/dev/ref/forms/api/#as-p
> > >> [2]http://docs.djangoproject.com/en/dev/ref/forms/api/#as-table
>
> > > --
> > > You received this message because 

Re: How to use pre-built HTML forms in Django

2010-03-09 Thread MMRUser
So as per your knowledge can u suggest a proper way of getting data
from a form but not as mentioned in http://www.djangobook.com/en/2.0/chapter07/
that way is too rusty.

Thanks.

On Mar 9, 7:28 pm, rebus_  wrote:
> On 9 March 2010 15:22, MMRUser  wrote:
>
>
>
> > The problem I's having is that my HTML form depends upon lot of
> > external resources like javascript validation libraries and lots of
> > css on fields (and some may differ from each other), and I think that
> > I don't need to use re-usable templates because I just want to design
> > a one simple form so there's only one HTML file.Do you think that is
> > it ok to just ignore the Django's template system and get along with
> > the normal way.
>
> > On Mar 9, 2:32 pm, rebus_  wrote:
> >> On 9 March 2010 05:54, MMRUser  wrote:
>
> >> > Thanks another doubt,what about the css mappings class="field text
> >> > medium" do they also need to include in the class definition in
> >> > Django.
>
> >> > On Mar 9, 9:21 am, rebus_  wrote:
> >> >> On 9 March 2010 05:04, MMRUser  wrote:
>
> >> >> > I have an pre-built HTML form (means I design the HTML form
> >> >> > separately) and I need to reuse it with Django form class
> >> >> > (django.forms), So how do I incorporate my HTML form with Django form
> >> >> > class. for example
>
> >> >> > HTML:
>
> >> >> > 
> >> >> >  
> >> >> >  Username
> >> >> >  *
> >> >> >  
> >> >> >  
> >> >> >  
> >> >> >  
> >> >> > 
>
> >> >> > How do I map this HTML in to Django form definition, I know that it
> >> >> > can be done by modifying Django form fields according to this HTML.
> >> >> > But I guess it's a time consuming approach,so I would like to know
> >> >> > that is there any easy and time saving solutions for this issue.
>
> >> >> > Thanks.
>
> >> >> > --
> >> >> > You received this message because you are subscribed to the Google 
> >> >> > Groups "Django users" group.
> >> >> > To post to this group, send email to django-us...@googlegroups.com.
> >> >> > To unsubscribe from this group, send email to 
> >> >> > django-users+unsubscr...@googlegroups.com.
> >> >> > For more options, visit this group 
> >> >> > athttp://groups.google.com/group/django-users?hl=en.
>
> >> >> Well usually you first create a form in django and use its instance to
> >> >> generate the HTML.
>
> >> >> You can also write the HTML by yourself and all you need to be careful
> >> >> of is that name and id attributes of you inputs and input type are
> >> >> same as in the class you define.
>
> >> >> Your HTML corresponds to:
>
> >> >> class MyForm(forms.Form):
> >> >>    Field11 = forms.CharField(label="Username",  max_length=255)
>
> >> >> I highly recommend to first setup a form class then write HTML and
> >> >> making form fields have more sensible names then Field11.
>
> >> >> Also i suggest these links as further reading:
>
> >> >>http://docs.djangoproject.com/en/dev/topics/forms/http://docs.djangop...
>
> >> > --
> >> > You received this message because you are subscribed to the Google 
> >> > Groups "Django users" group.
> >> > To post to this group, send email to django-us...@googlegroups.com.
> >> > To unsubscribe from this group, send email to 
> >> > django-users+unsubscr...@googlegroups.com.
> >> > For more options, visit this group 
> >> > athttp://groups.google.com/group/django-users?hl=en.
>
> >> No, CSS classes are not defined in form class (as far as i know).
>
> >> I would suggest using reusable form templates [1] and putting the CSS
> >> classes on field wrappers for example.
>
> >> This is what you are interested in:
>
> >>http://docs.djangoproject.com/en/dev/topics/forms/#reusable-form-temp..
>
> >> Which ever approach you decide to use is valid, but writing a bunch of
> >> your own HTML for forms takes more time but is also more customisable,
> >> on the other hand using shortcut methods such as "as_p" [1] or
> >> "as_table" [2] is faster but you have less control over the outputted
> >> HTML.
>
> >> [1]http://docs.djangoproject.com/en/dev/ref/forms/api/#as-p
> >> [2]http://docs.djangoproject.com/en/dev/ref/forms/api/#as-table
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Django users" group.
> > To post to this group, send email to django-us...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > django-users+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/django-users?hl=en.
>
> Well, if you need a high level of customization you can write your own
> HTML for forms of course.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit 

Re: How to use pre-built HTML forms in Django

2010-03-09 Thread MMRUser
The problem I's having is that my HTML form depends upon lot of
external resources like javascript validation libraries and lots of
css on fields (and some may differ from each other), and I think that
I don't need to use re-usable templates because I just want to design
a one simple form so there's only one HTML file.Do you think that is
it ok to just ignore the Django's template system and get along with
the normal way.

On Mar 9, 2:32 pm, rebus_  wrote:
> On 9 March 2010 05:54, MMRUser  wrote:
>
>
>
> > Thanks another doubt,what about the css mappings class="field text
> > medium" do they also need to include in the class definition in
> > Django.
>
> > On Mar 9, 9:21 am, rebus_  wrote:
> >> On 9 March 2010 05:04, MMRUser  wrote:
>
> >> > I have an pre-built HTML form (means I design the HTML form
> >> > separately) and I need to reuse it with Django form class
> >> > (django.forms), So how do I incorporate my HTML form with Django form
> >> > class. for example
>
> >> > HTML:
>
> >> > 
> >> >  
> >> >  Username
> >> >  *
> >> >  
> >> >  
> >> >  
> >> >  
> >> > 
>
> >> > How do I map this HTML in to Django form definition, I know that it
> >> > can be done by modifying Django form fields according to this HTML.
> >> > But I guess it's a time consuming approach,so I would like to know
> >> > that is there any easy and time saving solutions for this issue.
>
> >> > Thanks.
>
> >> > --
> >> > You received this message because you are subscribed to the Google 
> >> > Groups "Django users" group.
> >> > To post to this group, send email to django-us...@googlegroups.com.
> >> > To unsubscribe from this group, send email to 
> >> > django-users+unsubscr...@googlegroups.com.
> >> > For more options, visit this group 
> >> > athttp://groups.google.com/group/django-users?hl=en.
>
> >> Well usually you first create a form in django and use its instance to
> >> generate the HTML.
>
> >> You can also write the HTML by yourself and all you need to be careful
> >> of is that name and id attributes of you inputs and input type are
> >> same as in the class you define.
>
> >> Your HTML corresponds to:
>
> >> class MyForm(forms.Form):
> >>    Field11 = forms.CharField(label="Username",  max_length=255)
>
> >> I highly recommend to first setup a form class then write HTML and
> >> making form fields have more sensible names then Field11.
>
> >> Also i suggest these links as further reading:
>
> >>http://docs.djangoproject.com/en/dev/topics/forms/http://docs.djangop...
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Django users" group.
> > To post to this group, send email to django-us...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > django-users+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/django-users?hl=en.
>
> No, CSS classes are not defined in form class (as far as i know).
>
> I would suggest using reusable form templates [1] and putting the CSS
> classes on field wrappers for example.
>
> This is what you are interested in:
>
> http://docs.djangoproject.com/en/dev/topics/forms/#reusable-form-temp...http://docs.djangoproject.com/en/dev/topics/forms/#displaying-a-form-...
>
> Which ever approach you decide to use is valid, but writing a bunch of
> your own HTML for forms takes more time but is also more customisable,
> on the other hand using shortcut methods such as "as_p" [1] or
> "as_table" [2] is faster but you have less control over the outputted
> HTML.
>
> [1]http://docs.djangoproject.com/en/dev/ref/forms/api/#as-p
> [2]http://docs.djangoproject.com/en/dev/ref/forms/api/#as-table

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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.



Re: How to use pre-built HTML forms in Django

2010-03-09 Thread rebus_
On 9 March 2010 15:22, MMRUser  wrote:
> The problem I's having is that my HTML form depends upon lot of
> external resources like javascript validation libraries and lots of
> css on fields (and some may differ from each other), and I think that
> I don't need to use re-usable templates because I just want to design
> a one simple form so there's only one HTML file.Do you think that is
> it ok to just ignore the Django's template system and get along with
> the normal way.
>
> On Mar 9, 2:32 pm, rebus_  wrote:
>> On 9 March 2010 05:54, MMRUser  wrote:
>>
>>
>>
>> > Thanks another doubt,what about the css mappings class="field text
>> > medium" do they also need to include in the class definition in
>> > Django.
>>
>> > On Mar 9, 9:21 am, rebus_  wrote:
>> >> On 9 March 2010 05:04, MMRUser  wrote:
>>
>> >> > I have an pre-built HTML form (means I design the HTML form
>> >> > separately) and I need to reuse it with Django form class
>> >> > (django.forms), So how do I incorporate my HTML form with Django form
>> >> > class. for example
>>
>> >> > HTML:
>>
>> >> > 
>> >> >  
>> >> >  Username
>> >> >  *
>> >> >  
>> >> >  
>> >> >  
>> >> >  
>> >> > 
>>
>> >> > How do I map this HTML in to Django form definition, I know that it
>> >> > can be done by modifying Django form fields according to this HTML.
>> >> > But I guess it's a time consuming approach,so I would like to know
>> >> > that is there any easy and time saving solutions for this issue.
>>
>> >> > Thanks.
>>
>> >> > --
>> >> > You received this message because you are subscribed to the Google 
>> >> > Groups "Django users" group.
>> >> > To post to this group, send email to django-us...@googlegroups.com.
>> >> > To unsubscribe from this group, send email to 
>> >> > django-users+unsubscr...@googlegroups.com.
>> >> > For more options, visit this group 
>> >> > athttp://groups.google.com/group/django-users?hl=en.
>>
>> >> Well usually you first create a form in django and use its instance to
>> >> generate the HTML.
>>
>> >> You can also write the HTML by yourself and all you need to be careful
>> >> of is that name and id attributes of you inputs and input type are
>> >> same as in the class you define.
>>
>> >> Your HTML corresponds to:
>>
>> >> class MyForm(forms.Form):
>> >>    Field11 = forms.CharField(label="Username",  max_length=255)
>>
>> >> I highly recommend to first setup a form class then write HTML and
>> >> making form fields have more sensible names then Field11.
>>
>> >> Also i suggest these links as further reading:
>>
>> >>http://docs.djangoproject.com/en/dev/topics/forms/http://docs.djangop...
>>
>> > --
>> > You received this message because you are subscribed to the Google Groups 
>> > "Django users" group.
>> > To post to this group, send email to django-us...@googlegroups.com.
>> > To unsubscribe from this group, send email to 
>> > django-users+unsubscr...@googlegroups.com.
>> > For more options, visit this group 
>> > athttp://groups.google.com/group/django-users?hl=en.
>>
>> No, CSS classes are not defined in form class (as far as i know).
>>
>> I would suggest using reusable form templates [1] and putting the CSS
>> classes on field wrappers for example.
>>
>> This is what you are interested in:
>>
>> http://docs.djangoproject.com/en/dev/topics/forms/#reusable-form-temp...http://docs.djangoproject.com/en/dev/topics/forms/#displaying-a-form-...
>>
>> Which ever approach you decide to use is valid, but writing a bunch of
>> your own HTML for forms takes more time but is also more customisable,
>> on the other hand using shortcut methods such as "as_p" [1] or
>> "as_table" [2] is faster but you have less control over the outputted
>> HTML.
>>
>> [1]http://docs.djangoproject.com/en/dev/ref/forms/api/#as-p
>> [2]http://docs.djangoproject.com/en/dev/ref/forms/api/#as-table
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-us...@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.
>
>

Well, if you need a high level of customization you can write your own
HTML for forms of course.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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.



Re: How to use pre-built HTML forms in Django

2010-03-09 Thread rebus_
On 9 March 2010 05:54, MMRUser  wrote:
> Thanks another doubt,what about the css mappings class="field text
> medium" do they also need to include in the class definition in
> Django.
>
> On Mar 9, 9:21 am, rebus_  wrote:
>> On 9 March 2010 05:04, MMRUser  wrote:
>>
>>
>>
>> > I have an pre-built HTML form (means I design the HTML form
>> > separately) and I need to reuse it with Django form class
>> > (django.forms), So how do I incorporate my HTML form with Django form
>> > class. for example
>>
>> > HTML:
>>
>> > 
>> >  
>> >  Username
>> >  *
>> >  
>> >  
>> >  
>> >  
>> > 
>>
>> > How do I map this HTML in to Django form definition, I know that it
>> > can be done by modifying Django form fields according to this HTML.
>> > But I guess it's a time consuming approach,so I would like to know
>> > that is there any easy and time saving solutions for this issue.
>>
>> > Thanks.
>>
>> > --
>> > You received this message because you are subscribed to the Google Groups 
>> > "Django users" group.
>> > To post to this group, send email to django-us...@googlegroups.com.
>> > To unsubscribe from this group, send email to 
>> > django-users+unsubscr...@googlegroups.com.
>> > For more options, visit this group 
>> > athttp://groups.google.com/group/django-users?hl=en.
>>
>> Well usually you first create a form in django and use its instance to
>> generate the HTML.
>>
>> You can also write the HTML by yourself and all you need to be careful
>> of is that name and id attributes of you inputs and input type are
>> same as in the class you define.
>>
>> Your HTML corresponds to:
>>
>> class MyForm(forms.Form):
>>    Field11 = forms.CharField(label="Username",  max_length=255)
>>
>> I highly recommend to first setup a form class then write HTML and
>> making form fields have more sensible names then Field11.
>>
>> Also i suggest these links as further reading:
>>
>> http://docs.djangoproject.com/en/dev/topics/forms/http://docs.djangoproject.com/en/dev/ref/forms/api/http://docs.djangoproject.com/en/dev/ref/forms/fields/
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-us...@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.
>
>

No, CSS classes are not defined in form class (as far as i know).

I would suggest using reusable form templates [1] and putting the CSS
classes on field wrappers for example.

This is what you are interested in:

http://docs.djangoproject.com/en/dev/topics/forms/#reusable-form-templates
http://docs.djangoproject.com/en/dev/topics/forms/#displaying-a-form-using-a-template

Which ever approach you decide to use is valid, but writing a bunch of
your own HTML for forms takes more time but is also more customisable,
on the other hand using shortcut methods such as "as_p" [1] or
"as_table" [2] is faster but you have less control over the outputted
HTML.

[1] http://docs.djangoproject.com/en/dev/ref/forms/api/#as-p
[2] http://docs.djangoproject.com/en/dev/ref/forms/api/#as-table

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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.



Re: How to use pre-built HTML forms in Django

2010-03-08 Thread MMRUser
Thanks another doubt,what about the css mappings class="field text
medium" do they also need to include in the class definition in
Django.

On Mar 9, 9:21 am, rebus_  wrote:
> On 9 March 2010 05:04, MMRUser  wrote:
>
>
>
> > I have an pre-built HTML form (means I design the HTML form
> > separately) and I need to reuse it with Django form class
> > (django.forms), So how do I incorporate my HTML form with Django form
> > class. for example
>
> > HTML:
>
> > 
> >  
> >  Username
> >  *
> >  
> >  
> >  
> >  
> > 
>
> > How do I map this HTML in to Django form definition, I know that it
> > can be done by modifying Django form fields according to this HTML.
> > But I guess it's a time consuming approach,so I would like to know
> > that is there any easy and time saving solutions for this issue.
>
> > Thanks.
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Django users" group.
> > To post to this group, send email to django-us...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > django-users+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/django-users?hl=en.
>
> Well usually you first create a form in django and use its instance to
> generate the HTML.
>
> You can also write the HTML by yourself and all you need to be careful
> of is that name and id attributes of you inputs and input type are
> same as in the class you define.
>
> Your HTML corresponds to:
>
> class MyForm(forms.Form):
>    Field11 = forms.CharField(label="Username",  max_length=255)
>
> I highly recommend to first setup a form class then write HTML and
> making form fields have more sensible names then Field11.
>
> Also i suggest these links as further reading:
>
> http://docs.djangoproject.com/en/dev/topics/forms/http://docs.djangoproject.com/en/dev/ref/forms/api/http://docs.djangoproject.com/en/dev/ref/forms/fields/

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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.



Re: How to use pre-built HTML forms in Django

2010-03-08 Thread rebus_
On 9 March 2010 05:04, MMRUser  wrote:
> I have an pre-built HTML form (means I design the HTML form
> separately) and I need to reuse it with Django form class
> (django.forms), So how do I incorporate my HTML form with Django form
> class. for example
>
> HTML:
>
> 
>  
>  Username
>  *
>  
>  
>  
>  
> 
>
> How do I map this HTML in to Django form definition, I know that it
> can be done by modifying Django form fields according to this HTML.
> But I guess it's a time consuming approach,so I would like to know
> that is there any easy and time saving solutions for this issue.
>
> Thanks.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-us...@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.
>
>

Well usually you first create a form in django and use its instance to
generate the HTML.

You can also write the HTML by yourself and all you need to be careful
of is that name and id attributes of you inputs and input type are
same as in the class you define.

Your HTML corresponds to:

class MyForm(forms.Form):
   Field11 = forms.CharField(label="Username",  max_length=255)


I highly recommend to first setup a form class then write HTML and
making form fields have more sensible names then Field11.

Also i suggest these links as further reading:

http://docs.djangoproject.com/en/dev/topics/forms/
http://docs.djangoproject.com/en/dev/ref/forms/api/
http://docs.djangoproject.com/en/dev/ref/forms/fields/

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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.



How to use pre-built HTML forms in Django

2010-03-08 Thread MMRUser
I have an pre-built HTML form (means I design the HTML form
separately) and I need to reuse it with Django form class
(django.forms), So how do I incorporate my HTML form with Django form
class. for example

HTML:


 
  Username
 *
 
 
  
 


How do I map this HTML in to Django form definition, I know that it
can be done by modifying Django form fields according to this HTML.
But I guess it's a time consuming approach,so I would like to know
that is there any easy and time saving solutions for this issue.

Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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.