BB
Size: a a a
BB
BB
T
class Map(models.Model):У меня есть такая структура и ее нельзя менять
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
title = models.TextField()
image = models.ImageField(upload_to='map', null=True, blank=True)
class Tile(models.Model):
map = models.ForeignKey(Map)
x = models.IntegerField()
y = models.IntegerField()
z = models.IntegerField()
image = models.ImageField('Tile Image', upload_to='map', null=True, blank=True)
T
Tile
BB
p
BB
BB
T
BB
p
T
BB
SM
<input type="file">
), а именно выгрузить с сервеа на локальный комп пользователя?i
<input type="file">
), а именно выгрузить с сервеа на локальный комп пользователя?def download(request):
file_name = #get the filename of desired excel file
path_to_file = #get the path of desired excel file
response = HttpResponse(mimetype='application/force-download')
response['Content-Disposition'] = 'attachment; filename=%s' % smart_str(file_name)
response['X-Sendfile'] = smart_str(path_to_file)
return response
i
M
<input type="file">
), а именно выгрузить с сервеа на локальный комп пользователя?SM
SM
i