update django
python -m pip install -U Django
how to update image in django
from __future__ import unicode_literals
from django.db import models
from django.core.urlresolvers import reverse
class Server(models.Model):
name = models.CharField(max_length=200)
ip = models.GenericIPAddressField()
order = models.IntegerField()
image = models.FileField(upload_to='pics/',default='download.jpg')
def __unicode__(self):
return self.name
def get_absolute_url(self):
return reverse('server_edit', kwargs={'pk': self.pk})
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us