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/')),
|
||||
],
|
||||
),
|
||||
]
|
Reference in New Issue
Block a user