Monday, October 14, 2013

Re: Image browsing in django

On Mon, Oct 14, 2013 at 9:46 PM, Harjot Mann <harjotmann1992@gmail.com> wrote:
> Done..but again getting the same error. I am doing it like this:
> This is my model:
> image=models.ImageField(upload_to='images')
>
> and then in my html form I am doing it like this:
> <form action="" method="post" encoding='multipart/form-data'>
> {% csrf_token %}
> <table >
> {{ form.as_table }}
> </table>
> <input type="submit" value="Submit">
> </form>


I have not done anything special in views..it just contains a simple
form saving code.
Should I need to do anything there?
--
Harjot Kaur Mann
Blog: http://harjotmann.wordpress.com/
Daily Dairy: http://harjotmann.wordpress.com/daily-diary/

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAB0GQhBPX54KosXS-m9PEBGEPZArGNhCxwfQdXEfgPoGPrPH6g%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate