Add profile model, update requirements, readme and gitignore
This commit is contained in:
parent
6056a1e85b
commit
234669242f
2
.gitignore
vendored
2
.gitignore
vendored
@ -12,7 +12,7 @@ __pycache__/
|
||||
local_settings.py
|
||||
db.sqlite3
|
||||
db.sqlite3-journal
|
||||
media
|
||||
media/
|
||||
|
||||
# If your build process includes running collectstatic, then you probably don't need or want to include staticfiles/
|
||||
# in your Git repository. Update and uncomment the following line accordingly.
|
||||
|
@ -42,3 +42,4 @@ pip install -r requirements.txt
|
||||
|
||||
## Read more
|
||||
- Zenpy: [http://docs.facetoe.com.au](http://docs.facetoe.com.au)
|
||||
- Zendesk API: [https://developer.zendesk.com/rest_api/docs/](https://developer.zendesk.com/rest_api/docs/)
|
||||
|
@ -124,3 +124,5 @@ STATIC_URL = '/static/'
|
||||
STATICFILES_DIRS = [
|
||||
'static'
|
||||
]
|
||||
|
||||
MEDIA_ROOT = BASE_DIR / 'media'
|
||||
|
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'))
|
||||
|
0
media/.gitkeep
Normal file
0
media/.gitkeep
Normal file
@ -1 +1,2 @@
|
||||
Django==3.1.6
|
||||
Pillow==8.1.0
|
||||
|
Loading…
x
Reference in New Issue
Block a user