Zwischencommit und Bilder Test
This commit is contained in:
parent
8f117adb0f
commit
51869a10fd
|
|
@ -4,11 +4,11 @@ from users.models import Agency, AgencyGroup
|
|||
# Create your models here.
|
||||
from django.db import models
|
||||
from django.utils import timezone
|
||||
|
||||
from django.conf import settings
|
||||
|
||||
def user_directory_path(instance, filename):
|
||||
# file will be uploaded to MEDIA_ROOT/agency_<id>/files/<subdirs>/<filename>
|
||||
return 'agencydata/agency_{0}/files/{1}'.format(instance.agency.pk, filename)
|
||||
return settings.MEDIA_URL + 'agencydata/agency_{0}/files/{1}'.format(instance.agency.pk, filename)
|
||||
|
||||
|
||||
class Data(models.Model):
|
||||
|
|
|
|||
Loading…
Reference in New Issue