Add profile model, update requirements, readme and gitignore
This commit is contained in:
22
main/migrations/0001_initial.py
Normal file
22
main/migrations/0001_initial.py
Normal file
@@ -0,0 +1,22 @@
|
||||
# Generated by Django 3.1.6 on 2021-02-04 17:36
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='UserProfile',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('role', models.IntegerField()),
|
||||
('image', models.ImageField(upload_to='media/user_avatars')),
|
||||
],
|
||||
),
|
||||
]
|
||||
@@ -1,3 +1,8 @@
|
||||
import os
|
||||
|
||||
from django.db import models
|
||||
|
||||
# Create your models here.
|
||||
|
||||
class UserProfile(models.Model):
|
||||
role = models.IntegerField()
|
||||
image = models.ImageField(upload_to=os.path.join('media', 'user_avatars'))
|
||||
|
||||
Reference in New Issue
Block a user