Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
basket refreshes automaticaly every 2 minutes
- Loading branch information
Nour Elgeziry
authored and
Nour Elgeziry
committed
Oct 18, 2020
1 parent
1577a6f
commit 9edcadbd0c8a74e177849e357ef93fc309d63f95
Showing
30 changed files
with
575 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# This will make sure the app is always imported when | ||
# Django starts so that shared_task will use this app. | ||
from .celery import app as celery_app | ||
|
||
__all__ = ('celery_app',) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import os | ||
from celery import Celery | ||
|
||
# set the default Django settings module for the 'celery' program. | ||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'EDMS.settings') | ||
|
||
app = Celery('EDMS') | ||
|
||
# Using a string here means the worker doesn't have to serialize | ||
# the configuration object to child processes. | ||
# - namespace='CELERY' means all celery-related configuration keys | ||
# should have a `CELERY_` prefix. | ||
app.config_from_object('django.conf:settings', namespace='CELERY') | ||
|
||
# Load task modules from all registered Django app configs. | ||
app.autodiscover_tasks() | ||
|
||
|
||
@app.task(bind=True) | ||
def debug_task(self): | ||
print(f'Request: {self.request!r}') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BIN
+12 KB
(110%)
EDMS/db.sqlite3
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Generated by Django 3.1.2 on 2020-10-16 14:24 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('shoppingCart', '0004_auto_20201016_1152'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Test', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('name', models.CharField(max_length=4)), | ||
], | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Generated by Django 3.1.2 on 2020-10-18 12:29 | ||
|
||
import datetime | ||
from django.db import migrations, models | ||
import django.utils.timezone | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('shoppingCart', '0005_test'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='order', | ||
name='date_created', | ||
field=models.DateTimeField(auto_now_add=True, default=django.utils.timezone.now), | ||
preserve_default=False, | ||
), | ||
migrations.AddField( | ||
model_name='order', | ||
name='expiry_date', | ||
field=models.DateTimeField(default=datetime.datetime(2020, 10, 18, 12, 30, 18, 872950)), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Generated by Django 3.1.2 on 2020-10-18 13:16 | ||
|
||
import datetime | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('shoppingCart', '0006_auto_20201018_1229'), | ||
] | ||
|
||
operations = [ | ||
migrations.RemoveField( | ||
model_name='orderitem', | ||
name='expired', | ||
), | ||
migrations.AddField( | ||
model_name='order', | ||
name='expired', | ||
field=models.BooleanField(default=False), | ||
), | ||
migrations.AlterField( | ||
model_name='order', | ||
name='expiry_date', | ||
field=models.DateTimeField(default=datetime.datetime(2020, 10, 18, 13, 17, 6, 8469)), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Generated by Django 3.1.2 on 2020-10-18 13:42 | ||
|
||
import datetime | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('shoppingCart', '0007_auto_20201018_1316'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='orderitem', | ||
name='expired', | ||
field=models.BooleanField(default=False), | ||
), | ||
migrations.AlterField( | ||
model_name='order', | ||
name='date_created', | ||
field=models.DateTimeField(verbose_name=datetime.datetime(2020, 10, 18, 13, 42, 9, 885618)), | ||
), | ||
migrations.AlterField( | ||
model_name='order', | ||
name='expiry_date', | ||
field=models.DateTimeField(default=datetime.datetime(2020, 10, 18, 13, 43, 9, 885636)), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Generated by Django 3.1.2 on 2020-10-18 13:54 | ||
|
||
import datetime | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('shoppingCart', '0008_auto_20201018_1342'), | ||
] | ||
|
||
operations = [ | ||
migrations.RemoveField( | ||
model_name='order', | ||
name='date_created', | ||
), | ||
migrations.AlterField( | ||
model_name='order', | ||
name='expiry_date', | ||
field=models.DateTimeField(default=datetime.datetime(2020, 10, 18, 13, 55, 33, 184566)), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Generated by Django 3.1.2 on 2020-10-18 14:01 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('shoppingCart', '0009_auto_20201018_1354'), | ||
] | ||
|
||
operations = [ | ||
migrations.RemoveField( | ||
model_name='order', | ||
name='complete', | ||
), | ||
migrations.AlterField( | ||
model_name='order', | ||
name='expiry_date', | ||
field=models.DateField(), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 3.1.2 on 2020-10-18 14:04 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('shoppingCart', '0010_auto_20201018_1401'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='order', | ||
name='complete', | ||
field=models.BooleanField(default=False), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Generated by Django 3.1.2 on 2020-10-18 14:30 | ||
|
||
import datetime | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('shoppingCart', '0011_order_complete'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='order', | ||
name='expiry_date', | ||
field=models.DateTimeField(verbose_name=datetime.date(2020, 10, 25)), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Generated by Django 3.1.2 on 2020-10-18 14:39 | ||
|
||
import datetime | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('shoppingCart', '0012_auto_20201018_1430'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='order', | ||
name='expiry_date', | ||
field=models.DateTimeField(null=True, verbose_name=datetime.date(2020, 10, 25)), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Generated by Django 3.1.2 on 2020-10-18 14:43 | ||
|
||
import datetime | ||
from django.db import migrations, models | ||
import django.utils.timezone | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('shoppingCart', '0013_auto_20201018_1439'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='order', | ||
name='expiry_date', | ||
field=models.DateTimeField(default=django.utils.timezone.now, verbose_name=datetime.date(2020, 10, 25)), | ||
preserve_default=False, | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Generated by Django 3.1.2 on 2020-10-18 14:48 | ||
|
||
import datetime | ||
from django.db import migrations, models | ||
import django.utils.timezone | ||
from django.utils.timezone import utc | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('shoppingCart', '0014_auto_20201018_1443'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='order', | ||
name='date_created', | ||
field=models.DateTimeField(default=django.utils.timezone.now, verbose_name=datetime.datetime(2020, 10, 18, 14, 47, 51, 354484, tzinfo=utc)), | ||
preserve_default=False, | ||
), | ||
migrations.AlterField( | ||
model_name='order', | ||
name='expiry_date', | ||
field=models.DateTimeField(verbose_name=datetime.datetime(2020, 10, 25, 14, 47, 51, 354511, tzinfo=utc)), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Generated by Django 3.1.2 on 2020-10-18 14:56 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('shoppingCart', '0015_auto_20201018_1448'), | ||
] | ||
|
||
operations = [ | ||
migrations.RemoveField( | ||
model_name='orderitem', | ||
name='order', | ||
), | ||
migrations.RemoveField( | ||
model_name='orderitem', | ||
name='product', | ||
), | ||
migrations.DeleteModel( | ||
name='Order', | ||
), | ||
migrations.DeleteModel( | ||
name='OrderItem', | ||
), | ||
] |
Oops, something went wrong.