This is exactly what i was looking for, many thanks! Now i can render form
i need and like. Now i will test and i hope it will be same easy to write
data back to db.
Many thanks, Stanley
Dne pátek 18. března 2016 20:50:37 UTC+1 Fred Stluka napsal(a):
>
> Stanislav,
>
> Try these:
>
> {{ form.title.value }}
> {{ form.title.label }}
> {{ form.title.errors }}
> etc.
>
> --Fred
> ------------------------------
> Fred Stluka -- [email protected] <javascript:> --
> http://bristle.com/~fred/
> Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
> Open Source: Without walls and fences, we need no Windows or Gates.
> ------------------------------
> On 3/18/16 2:55 PM, Stanislav Vasko wrote:
>
> This is exactly what im trying. But if i enter *{{ form.title }}* i get
> not the data to use in form, but whole:
>
> *<input id="id_title" maxlength="200" name="title" value="Osobní schůzka,
> detailní probrání všech prací a podkladů z Topinfo" type="text">*
>
> But as i study doc, there is no simple way like Django is providing in
> other part. So, maybe Fred's way is a good one (but quite strange) and
> still dont know how i will make Fieldsets and other stuff (i need to work
> with data and some the result).
>
> Maybe there is some better Django Form plugin, but i prefer not to use
> anything outside Django, because noone knows how it will work with new
> Django versions and how buggy it can be. As beginner i'm glad for solving
> own bugs not fighting others too :)
>
> You can also do a custom template. So instead of letting Django render the
> form, you code the html yourself.
>>
>>
>> This is, instead of:
>>
>> {{ form.as_p }}
>>
>> do something like:
>>
>> <form class="form" action="" method="post">{% csrf_token %}
>> <div class="col-md-6 col-sm-6 col-xs-12 form-group has-feedback">
>> <input name="phone" class="form-control" id="id_phone"
>> placeholder="Phone" type="text">
>> <span class="fa fa-phone form-control-feedback right"
>> aria-hidden="true"></span>
>> </div>
>> ...
>> </form>
>>
>> --
> 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 [email protected] <javascript:>.
> To post to this group, send email to [email protected]
> <javascript:>.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> <https://groups.google.com/d/msgid/django-users/bb89aebe-5c3a-41dd-8f58-00acb8d78289%40googlegroups.com?utm_medium=email&utm_source=footer>
> https://groups.google.com/d/msgid/django-users/bb89aebe-5c3a-41dd-8f58-00acb8d78289%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
>
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/2da88381-e6f0-4e16-8848-c5af5dc87374%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.