diff options
| author | Bobby <[email protected]> | 2023-05-02 21:55:42 -0400 |
|---|---|---|
| committer | Bobby <[email protected]> | 2023-05-02 21:55:42 -0400 |
| commit | 4d2a4089529205bf326562ac81c4b3a7ee856a9b (patch) | |
| tree | e041fb78a14e872d85fe24769848705678a6e9b6 | |
| parent | 5db4fef9c6e187d774d2974dfdec1e9f65151c18 (diff) | |
| download | thatcomputerscientist-4d2a4089529205bf326562ac81c4b3a7ee856a9b.tar.xz thatcomputerscientist-4d2a4089529205bf326562ac81c4b3a7ee856a9b.zip | |
Update Image Directory
| -rw-r--r-- | blog/models.py | 2 | ||||
| -rw-r--r-- | ignis/models.py | 3 | ||||
| -rw-r--r-- | users/migrations/0012_alter_tokenstore_expires.py | 17 |
3 files changed, 20 insertions, 2 deletions
diff --git a/blog/models.py b/blog/models.py index c9f03399..3aab6c0f 100644 --- a/blog/models.py +++ b/blog/models.py @@ -1,7 +1,7 @@ from django.db import models from django.conf import settings from django.utils.text import slugify -UPLOAD_ROOT = 'images/' +UPLOAD_ROOT = 'images/' if settings.DEBUG else f'{settings.BASE_DIR}/../database/images/' # Create your models here. class Category(models.Model): diff --git a/ignis/models.py b/ignis/models.py index e89cc83d..aba58c1d 100644 --- a/ignis/models.py +++ b/ignis/models.py @@ -1,7 +1,8 @@ from django.db import models from blog.models import Post +from django.conf import settings -UPLOAD_ROOT = 'images/' +UPLOAD_ROOT = 'images/' if settings.DEBUG else f'{settings.BASE_DIR}/../database/images/' # Only For Storing Images diff --git a/users/migrations/0012_alter_tokenstore_expires.py b/users/migrations/0012_alter_tokenstore_expires.py new file mode 100644 index 00000000..4b3481fd --- /dev/null +++ b/users/migrations/0012_alter_tokenstore_expires.py @@ -0,0 +1,17 @@ +# Generated by Django 4.1.4 on 2023-05-03 01:54 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("users", "0011_tokenstore"), + ] + + operations = [ + migrations.AlterField( + model_name="tokenstore", + name="expires", + field=models.DateTimeField(), + ), + ] |
