<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>test</title> </head> <body> <form enctype= "multipart/form-data" method = "post" action = "http://127.0.0.1:8000/show_test/"> <input type = "file" name = "image" /> <input type = "submit" value = "submit"/> </form> </body> </html>
class TUser(models.Model): """ table t_user model """ name = models.CharField(max_length=50) # enciphered password. password = models.CharField(max_length=200, blank=True) email = models.EmailField() image = models.ImageField( upload_to='images/photos/%Y/%m/%d', height_field=48, width_field=48, null=True, blank=True) website = models.URLField(blank=True, null=True) class Meta: db_table = "t_user"
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)