trying to figure out how to serve user-uploaded files
This commit is contained in:
21
website/upload/migrations/0001_initial.py
Normal file
21
website/upload/migrations/0001_initial.py
Normal file
@ -0,0 +1,21 @@
|
||||
# Generated by Django 3.1.6 on 2021-02-09 15:56
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Image',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('image', models.ImageField(blank=True, upload_to='static/%Y/%m/%d/')),
|
||||
],
|
||||
),
|
||||
]
|
18
website/upload/migrations/0002_auto_20210209_1803.py
Normal file
18
website/upload/migrations/0002_auto_20210209_1803.py
Normal file
@ -0,0 +1,18 @@
|
||||
# Generated by Django 3.1.6 on 2021-02-09 16:03
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('upload', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='image',
|
||||
name='image',
|
||||
field=models.FileField(upload_to='../static/%Y/%m/%d/'),
|
||||
),
|
||||
]
|
18
website/upload/migrations/0003_auto_20210209_1806.py
Normal file
18
website/upload/migrations/0003_auto_20210209_1806.py
Normal file
@ -0,0 +1,18 @@
|
||||
# Generated by Django 3.1.6 on 2021-02-09 16:06
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('upload', '0002_auto_20210209_1803'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='image',
|
||||
name='image',
|
||||
field=models.FileField(upload_to='static/'),
|
||||
),
|
||||
]
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user