-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6e74399
commit 901cfd2
Showing
103 changed files
with
5,311 additions
and
1,983 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,20 @@ | ||
# Generated by Django 2.2.10 on 2021-08-27 18:55 | ||
|
||
import datetime | ||
from django.db import migrations, models | ||
from django.utils.timezone import utc | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('book', '0027_auto_20210825_2026'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='borrowrecord', | ||
name='end_day', | ||
field=models.DateTimeField(default=datetime.datetime(2021, 9, 3, 18, 55, 30, 923271, 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,20 @@ | ||
# Generated by Django 2.2.10 on 2021-08-27 19:44 | ||
|
||
import datetime | ||
from django.db import migrations, models | ||
from django.utils.timezone import utc | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('book', '0028_auto_20210827_2055'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='borrowrecord', | ||
name='end_day', | ||
field=models.DateTimeField(default=datetime.datetime(2021, 9, 3, 19, 44, 35, 459382, 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,14 @@ | ||
from notifications.signals import notify | ||
from django.contrib.auth.models import User,Group | ||
|
||
|
||
|
||
|
||
def send_notification(sender,target,verb): | ||
if not sender.is_superuser: | ||
notify.send( | ||
sender, | ||
recipient=User.objects.filter(is_superuser=1), | ||
verb=verb, | ||
target=target, | ||
) |
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 @@ | ||
|
||
|
||
|
||
def mydeco(f): | ||
# This function is what we "replace" hello with | ||
def wrapper(*args, **kw): | ||
print(args[0]) | ||
print(args[1]) | ||
return f(*args, **kw) # Call hello | ||
|
||
return wrapper | ||
|
||
|
||
|
||
@mydeco | ||
def person(name,age,address,code): | ||
print(name,age,address,code) | ||
|
||
person("test",12,333,444) |
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
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,55 @@ | ||
# Generated by Django 2.2.10 on 2021-08-27 18:55 | ||
|
||
from django.conf import settings | ||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
import mptt.fields | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
('comment', '0002_auto_20210825_2026'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterModelOptions( | ||
name='comment', | ||
options={}, | ||
), | ||
migrations.AddField( | ||
model_name='comment', | ||
name='level', | ||
field=models.PositiveIntegerField(default=0, editable=False), | ||
preserve_default=False, | ||
), | ||
migrations.AddField( | ||
model_name='comment', | ||
name='lft', | ||
field=models.PositiveIntegerField(default=0, editable=False), | ||
preserve_default=False, | ||
), | ||
migrations.AddField( | ||
model_name='comment', | ||
name='parent', | ||
field=mptt.fields.TreeForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='children', to='comment.Comment'), | ||
), | ||
migrations.AddField( | ||
model_name='comment', | ||
name='reply_to', | ||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='replyers', to=settings.AUTH_USER_MODEL), | ||
), | ||
migrations.AddField( | ||
model_name='comment', | ||
name='rght', | ||
field=models.PositiveIntegerField(default=0, editable=False), | ||
preserve_default=False, | ||
), | ||
migrations.AddField( | ||
model_name='comment', | ||
name='tree_id', | ||
field=models.PositiveIntegerField(db_index=True, default=0, editable=False), | ||
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,41 @@ | ||
# Generated by Django 2.2.10 on 2021-08-27 19:44 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('comment', '0003_auto_20210827_2055'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterModelOptions( | ||
name='comment', | ||
options={'ordering': ('created_at',)}, | ||
), | ||
migrations.RemoveField( | ||
model_name='comment', | ||
name='level', | ||
), | ||
migrations.RemoveField( | ||
model_name='comment', | ||
name='lft', | ||
), | ||
migrations.RemoveField( | ||
model_name='comment', | ||
name='parent', | ||
), | ||
migrations.RemoveField( | ||
model_name='comment', | ||
name='reply_to', | ||
), | ||
migrations.RemoveField( | ||
model_name='comment', | ||
name='rght', | ||
), | ||
migrations.RemoveField( | ||
model_name='comment', | ||
name='tree_id', | ||
), | ||
] |
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 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
Binary file not shown.
Oops, something went wrong.