Hello!

In model i use this field:

class Article(meta.Model):
        author = meta.ForeignKey(User, raw_id_admin=True)

vews/articles.py generate form:

        <p><label for="id_author">Author:</label> {{ form.author }} 
{% if form.author.errors %}*** {{ form.author.errors|join:", " }}
{% endif % }</p>  

If the field is filled by username, form give an error. If it filled
user_id form works correct. How to make form that can be filled by
username insted of user_id?

-- 
Всего наилучшего!
greg [at] anastasia [dot] ru Григорий.

Reply via email to