From 46cb8e877f58c88ceae36d523f1c7c199dc45645 Mon Sep 17 00:00:00 2001 From: mahtab Date: Sat, 1 Sep 2018 22:45:08 +0430 Subject: [PATCH 1/3] task done --- Books/forms.py | 26 +++++- Books/migrations/0001_initial.py | 9 +- Books/migrations/0002_delete_person.py | 16 ---- Books/migrations/0003_book_taken.py | 18 ---- Books/migrations/0004_auto_20180715_1823.py | 18 ---- Books/migrations/0005_book_book_url.py | 18 ---- Books/migrations/0006_auto_20180715_2015.py | 18 ---- Books/migrations/0007_auto_20180716_1046.py | 18 ---- Books/migrations/0008_auto_20180716_1052.py | 18 ---- Books/migrations/0009_auto_20180716_1432.py | 18 ---- Books/migrations/0010_auto_20180716_1438.py | 18 ---- Books/migrations/0011_book_book_logo_url.py | 19 ---- .../0012_remove_book_book_logo_url.py | 17 ---- Books/migrations/0013_auto_20180724_1747.py | 18 ---- Books/migrations/0014_auto_20180724_1748.py | 18 ---- Books/migrations/0015_auto_20180724_1802.py | 18 ---- Books/migrations/0016_book_description.py | 18 ---- Books/migrations/__init__.py | 0 Books/models.py | 9 ++ .../images/ivory-off-white-paper-texture.jpg | Bin .../static/Books/images/paper-background.jpg | Bin Books/static/Books/style.css | 0 Books/templates/Books/base.html | 13 +++ Books/templates/Books/base_visitor.html | 0 Books/templates/Books/book-list.html | 0 Books/templates/Books/book_form.html | 0 Books/templates/Books/create_book.html | 0 Books/templates/Books/detail.html | 0 Books/templates/Books/form-template.html | 6 +- Books/templates/Books/index.html | 0 Books/templates/Books/login_form.html | 3 + Books/templates/Books/registration_form.html | 0 Books/templates/Books/request_book.html | 47 ++++++++++ Books/templates/Books/requested_Books.html | 24 +++++ Books/templates/Books/update_book.html | 0 Books/tests.py | 3 - Books/urls.py | 21 ++++- Books/views.py | 24 ++++- EFiles/forms.py | 2 + EFiles/migrations/0001_initial.py | 0 EFiles/migrations/0002_efile_file_author.py | 0 EFiles/migrations/0003_efile_book_logo.py | 0 .../migrations/0004_remove_efile_book_logo.py | 0 EFiles/migrations/0005_efile_file_logo.py | 0 EFiles/migrations/0006_efile_description.py | 0 EFiles/migrations/__init__.py | 0 EFiles/static/EFiles/images/AdobePDFlogo.jpg | Bin EFiles/static/EFiles/images/AdobePDFlogo.png | Bin .../images/ivory-off-white-paper-texture.jpg | Bin .../static/EFiles/images/paper-background.jpg | Bin EFiles/static/EFiles/style.css | 0 EFiles/templates/EFiles/add_efile.html | 0 EFiles/templates/EFiles/base.html | 0 EFiles/templates/EFiles/base_visitor.html | 0 EFiles/templates/EFiles/detail.html | 0 EFiles/templates/EFiles/efile-list.html | 0 EFiles/templates/EFiles/efile_form.html | 0 EFiles/templates/EFiles/form-template.html | 0 EFiles/templates/EFiles/index.html | 0 EFiles/templates/EFiles/login_form.html | 0 .../templates/EFiles/registration_form.html | 0 EFiles/templates/EFiles/update_efile.html | 0 EFiles/tests.py | 3 - LibraryManager/settings.py | 17 +++- LibraryManager/urls.py | 10 +++ backup.txt | Bin 0 -> 4096 bytes db.sqlite | 0 db.sqlite3 | Bin 151552 -> 147456 bytes manage.py | 0 media/101794_stars-live-wallpaper.jpg | Bin media/101794_stars-live-wallpaper_vBeuXj3.jpg | Bin media/2081.jpg | Bin ...and_Fire_book_collection_box_set_cover.jpg | Bin ..._book_collection_box_set_cover_OQNoTaH.jpg | Bin media/220px-EastOfEden.jpg | Bin media/33.jpg | Bin media/41WIbflfG2L._SX323_BO1204203200_.jpg | Bin ...WIbflfG2L._SX323_BO1204203200__XHgJPTI.jpg | Bin media/41rrZplMctL._SX321_BO1204203200_.jpg | Bin media/516c6gUQLaL._SX329_BO1204203200_.jpg | Bin media/517FwF49vL._SX322_BO1204203200_.jpg | Bin ...17FwF49vL._SX322_BO1204203200__RrAo1z8.jpg | Bin ...17FwF49vL._SX322_BO1204203200__daxW0vU.jpg | Bin media/517O7QWZw7L._SX330_BO1204203200_.jpg | Bin media/519qyNi1HsL._SX331_BO1204203200_.jpg | Bin ...9qyNi1HsL._SX331_BO1204203200__spjJcfW.jpg | Bin media/51ItBwnbJ6L._SX322_BO1204203200_.jpg | Bin media/51KJdpN-J7L._SX333_BO1204203200_.jpg | Bin media/51fD78uSTuL._SX348_BO1204203200_.jpg | Bin media/51mV1XUUQL._AC_UL200_SR200200_.jpg | Bin media/51toTzgHGXL._SX324_BO1204203200_.jpg | Bin media/51vP21eyW3L._AC_UL320_SR254320_.jpg | Bin media/91xsHPbe7pL._AC_UL200_SR200200_.jpg | Bin ...1xsHPbe7pL._AC_UL200_SR200200__i3GqyIP.jpg | Bin media/AStormOfSwords.jpg | Bin media/AStormOfSwords_vHQ4c9y.jpg | Bin ...-Wallpaper-HD-2018-Latest-APK-Download.png | Bin ...er-HD-2018-Latest-APK-Download_TXD11MA.png | Bin media/The_Amber_Spyglass_Book_Cover.jpg | Bin media/Untitled.jpg | Bin media/django.jpg | Bin media/django2.png | Bin media/kKssPOdB.jpg | Bin media/kKssPOdB_aGNsbp0.jpg | Bin media/particleAtlas.jpg | Bin media/spark_1.png | Bin media/spark_17.png | Bin media/waterDUDV.jpg | Bin media/whateverybodyissaying.jpg | Bin templates/base.html | 84 ++++++++++++++++++ .../registration/password_reset_complete.html | 7 ++ .../registration/password_reset_confirm.html | 17 ++++ .../registration/password_reset_done.html | 11 +++ .../registration/password_reset_email.html | 12 +++ .../registration/password_reset_form.html | 14 +++ .../registration/password_reset_subject.txt | 1 + 116 files changed, 344 insertions(+), 287 deletions(-) delete mode 100644 Books/migrations/0002_delete_person.py delete mode 100644 Books/migrations/0003_book_taken.py delete mode 100644 Books/migrations/0004_auto_20180715_1823.py delete mode 100644 Books/migrations/0005_book_book_url.py delete mode 100644 Books/migrations/0006_auto_20180715_2015.py delete mode 100644 Books/migrations/0007_auto_20180716_1046.py delete mode 100644 Books/migrations/0008_auto_20180716_1052.py delete mode 100644 Books/migrations/0009_auto_20180716_1432.py delete mode 100644 Books/migrations/0010_auto_20180716_1438.py delete mode 100644 Books/migrations/0011_book_book_logo_url.py delete mode 100644 Books/migrations/0012_remove_book_book_logo_url.py delete mode 100644 Books/migrations/0013_auto_20180724_1747.py delete mode 100644 Books/migrations/0014_auto_20180724_1748.py delete mode 100644 Books/migrations/0015_auto_20180724_1802.py delete mode 100644 Books/migrations/0016_book_description.py mode change 100644 => 100755 Books/migrations/__init__.py mode change 100644 => 100755 Books/static/Books/images/ivory-off-white-paper-texture.jpg mode change 100644 => 100755 Books/static/Books/images/paper-background.jpg mode change 100644 => 100755 Books/static/Books/style.css mode change 100644 => 100755 Books/templates/Books/base.html mode change 100644 => 100755 Books/templates/Books/base_visitor.html mode change 100644 => 100755 Books/templates/Books/book-list.html mode change 100644 => 100755 Books/templates/Books/book_form.html mode change 100644 => 100755 Books/templates/Books/create_book.html mode change 100644 => 100755 Books/templates/Books/detail.html mode change 100644 => 100755 Books/templates/Books/form-template.html mode change 100644 => 100755 Books/templates/Books/index.html mode change 100644 => 100755 Books/templates/Books/login_form.html mode change 100644 => 100755 Books/templates/Books/registration_form.html create mode 100644 Books/templates/Books/request_book.html create mode 100644 Books/templates/Books/requested_Books.html mode change 100644 => 100755 Books/templates/Books/update_book.html delete mode 100644 Books/tests.py mode change 100644 => 100755 EFiles/migrations/0001_initial.py mode change 100644 => 100755 EFiles/migrations/0002_efile_file_author.py mode change 100644 => 100755 EFiles/migrations/0003_efile_book_logo.py mode change 100644 => 100755 EFiles/migrations/0004_remove_efile_book_logo.py mode change 100644 => 100755 EFiles/migrations/0005_efile_file_logo.py mode change 100644 => 100755 EFiles/migrations/0006_efile_description.py mode change 100644 => 100755 EFiles/migrations/__init__.py mode change 100644 => 100755 EFiles/static/EFiles/images/AdobePDFlogo.jpg mode change 100644 => 100755 EFiles/static/EFiles/images/AdobePDFlogo.png mode change 100644 => 100755 EFiles/static/EFiles/images/ivory-off-white-paper-texture.jpg mode change 100644 => 100755 EFiles/static/EFiles/images/paper-background.jpg mode change 100644 => 100755 EFiles/static/EFiles/style.css mode change 100644 => 100755 EFiles/templates/EFiles/add_efile.html mode change 100644 => 100755 EFiles/templates/EFiles/base.html mode change 100644 => 100755 EFiles/templates/EFiles/base_visitor.html mode change 100644 => 100755 EFiles/templates/EFiles/detail.html mode change 100644 => 100755 EFiles/templates/EFiles/efile-list.html mode change 100644 => 100755 EFiles/templates/EFiles/efile_form.html mode change 100644 => 100755 EFiles/templates/EFiles/form-template.html mode change 100644 => 100755 EFiles/templates/EFiles/index.html mode change 100644 => 100755 EFiles/templates/EFiles/login_form.html mode change 100644 => 100755 EFiles/templates/EFiles/registration_form.html mode change 100644 => 100755 EFiles/templates/EFiles/update_efile.html delete mode 100644 EFiles/tests.py create mode 100644 backup.txt create mode 100644 db.sqlite mode change 100644 => 100755 manage.py mode change 100644 => 100755 media/101794_stars-live-wallpaper.jpg mode change 100644 => 100755 media/101794_stars-live-wallpaper_vBeuXj3.jpg mode change 100644 => 100755 media/2081.jpg mode change 100644 => 100755 media/220px-A_Song_of_Ice_and_Fire_book_collection_box_set_cover.jpg mode change 100644 => 100755 media/220px-A_Song_of_Ice_and_Fire_book_collection_box_set_cover_OQNoTaH.jpg mode change 100644 => 100755 media/220px-EastOfEden.jpg mode change 100644 => 100755 media/33.jpg mode change 100644 => 100755 media/41WIbflfG2L._SX323_BO1204203200_.jpg mode change 100644 => 100755 media/41WIbflfG2L._SX323_BO1204203200__XHgJPTI.jpg mode change 100644 => 100755 media/41rrZplMctL._SX321_BO1204203200_.jpg mode change 100644 => 100755 media/516c6gUQLaL._SX329_BO1204203200_.jpg mode change 100644 => 100755 media/517FwF49vL._SX322_BO1204203200_.jpg mode change 100644 => 100755 media/517FwF49vL._SX322_BO1204203200__RrAo1z8.jpg mode change 100644 => 100755 media/517FwF49vL._SX322_BO1204203200__daxW0vU.jpg mode change 100644 => 100755 media/517O7QWZw7L._SX330_BO1204203200_.jpg mode change 100644 => 100755 media/519qyNi1HsL._SX331_BO1204203200_.jpg mode change 100644 => 100755 media/519qyNi1HsL._SX331_BO1204203200__spjJcfW.jpg mode change 100644 => 100755 media/51ItBwnbJ6L._SX322_BO1204203200_.jpg mode change 100644 => 100755 media/51KJdpN-J7L._SX333_BO1204203200_.jpg mode change 100644 => 100755 media/51fD78uSTuL._SX348_BO1204203200_.jpg mode change 100644 => 100755 media/51mV1XUUQL._AC_UL200_SR200200_.jpg mode change 100644 => 100755 media/51toTzgHGXL._SX324_BO1204203200_.jpg mode change 100644 => 100755 media/51vP21eyW3L._AC_UL320_SR254320_.jpg mode change 100644 => 100755 media/91xsHPbe7pL._AC_UL200_SR200200_.jpg mode change 100644 => 100755 media/91xsHPbe7pL._AC_UL200_SR200200__i3GqyIP.jpg mode change 100644 => 100755 media/AStormOfSwords.jpg mode change 100644 => 100755 media/AStormOfSwords_vHQ4c9y.jpg mode change 100644 => 100755 media/Black-Wallpaper-HD-2018-Latest-APK-Download.png mode change 100644 => 100755 media/Black-Wallpaper-HD-2018-Latest-APK-Download_TXD11MA.png mode change 100644 => 100755 media/The_Amber_Spyglass_Book_Cover.jpg mode change 100644 => 100755 media/Untitled.jpg mode change 100644 => 100755 media/django.jpg mode change 100644 => 100755 media/django2.png mode change 100644 => 100755 media/kKssPOdB.jpg mode change 100644 => 100755 media/kKssPOdB_aGNsbp0.jpg mode change 100644 => 100755 media/particleAtlas.jpg mode change 100644 => 100755 media/spark_1.png mode change 100644 => 100755 media/spark_17.png mode change 100644 => 100755 media/waterDUDV.jpg mode change 100644 => 100755 media/whateverybodyissaying.jpg create mode 100755 templates/base.html create mode 100644 templates/registration/password_reset_complete.html create mode 100644 templates/registration/password_reset_confirm.html create mode 100644 templates/registration/password_reset_done.html create mode 100644 templates/registration/password_reset_email.html create mode 100644 templates/registration/password_reset_form.html create mode 100644 templates/registration/password_reset_subject.txt diff --git a/Books/forms.py b/Books/forms.py index d74a768..eed5779 100644 --- a/Books/forms.py +++ b/Books/forms.py @@ -1,7 +1,8 @@ from django.contrib.auth.models import User from django import forms +from django.contrib.auth.forms import UserCreationForm -from Books.models import Book +from Books.models import Book , RequestedBooks class BookForm(forms.ModelForm): @@ -13,16 +14,39 @@ class Meta: fields = ['title', 'author', 'book_logo', 'description'] class UserForm(forms.ModelForm): + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + self.fields['email'].required = True + User._meta.get_field("email")._unique = True + password = forms.CharField(widget=forms.PasswordInput) + email = forms.EmailField(required=True) + + class Meta: model = User fields = ['username', 'email', 'password'] + + class LoginForm(forms.ModelForm): password = forms.CharField(widget=forms.PasswordInput) class Meta: model = User fields = ['username', 'password'] + + +class RequestedBooksForm(forms.ModelForm): + title=forms.CharField(required=True) + author=forms.CharField(required=False) + RequestedBooks._meta.get_field("title")._unique = True + #publisher=forms.CharField(required=False) + class Meta: + model=RequestedBooks + fields=['title' , 'author' ] + + + diff --git a/Books/migrations/0001_initial.py b/Books/migrations/0001_initial.py index 55dcd67..16d753f 100644 --- a/Books/migrations/0001_initial.py +++ b/Books/migrations/0001_initial.py @@ -1,4 +1,4 @@ -# Generated by Django 2.0.7 on 2018-07-14 13:24 +# Generated by Django 2.0 on 2018-09-01 11:45 from django.db import migrations, models @@ -17,12 +17,17 @@ class Migration(migrations.Migration): ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('title', models.CharField(max_length=100)), ('author', models.CharField(max_length=100)), + ('book_logo', models.FileField(default='', max_length=500, upload_to='')), + ('taken_by', models.CharField(max_length=300)), + ('description', models.TextField(blank=True)), ], ), migrations.CreateModel( - name='Person', + name='RequestedBooks', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('title', models.CharField(max_length=100)), + ('author', models.CharField(blank=True, max_length=100)), ], ), ] diff --git a/Books/migrations/0002_delete_person.py b/Books/migrations/0002_delete_person.py deleted file mode 100644 index f1a2577..0000000 --- a/Books/migrations/0002_delete_person.py +++ /dev/null @@ -1,16 +0,0 @@ -# Generated by Django 2.0.7 on 2018-07-14 13:26 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('Books', '0001_initial'), - ] - - operations = [ - migrations.DeleteModel( - name='Person', - ), - ] diff --git a/Books/migrations/0003_book_taken.py b/Books/migrations/0003_book_taken.py deleted file mode 100644 index e31aa02..0000000 --- a/Books/migrations/0003_book_taken.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.0.7 on 2018-07-14 13:36 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('Books', '0002_delete_person'), - ] - - operations = [ - migrations.AddField( - model_name='book', - name='taken', - field=models.BooleanField(default=False), - ), - ] diff --git a/Books/migrations/0004_auto_20180715_1823.py b/Books/migrations/0004_auto_20180715_1823.py deleted file mode 100644 index 1f60030..0000000 --- a/Books/migrations/0004_auto_20180715_1823.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.0.7 on 2018-07-15 13:53 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('Books', '0003_book_taken'), - ] - - operations = [ - migrations.RenameField( - model_name='book', - old_name='taken', - new_name='is_taken', - ), - ] diff --git a/Books/migrations/0005_book_book_url.py b/Books/migrations/0005_book_book_url.py deleted file mode 100644 index 3316608..0000000 --- a/Books/migrations/0005_book_book_url.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.0.7 on 2018-07-15 15:42 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('Books', '0004_auto_20180715_1823'), - ] - - operations = [ - migrations.AddField( - model_name='book', - name='book_url', - field=models.CharField(default='', max_length=500), - ), - ] diff --git a/Books/migrations/0006_auto_20180715_2015.py b/Books/migrations/0006_auto_20180715_2015.py deleted file mode 100644 index 1e4a765..0000000 --- a/Books/migrations/0006_auto_20180715_2015.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.0.7 on 2018-07-15 15:45 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('Books', '0005_book_book_url'), - ] - - operations = [ - migrations.RenameField( - model_name='book', - old_name='book_url', - new_name='image_url', - ), - ] diff --git a/Books/migrations/0007_auto_20180716_1046.py b/Books/migrations/0007_auto_20180716_1046.py deleted file mode 100644 index 75b6c24..0000000 --- a/Books/migrations/0007_auto_20180716_1046.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.0.7 on 2018-07-16 06:16 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('Books', '0006_auto_20180715_2015'), - ] - - operations = [ - migrations.AlterField( - model_name='book', - name='image_url', - field=models.FileField(default='', max_length=500, upload_to=''), - ), - ] diff --git a/Books/migrations/0008_auto_20180716_1052.py b/Books/migrations/0008_auto_20180716_1052.py deleted file mode 100644 index 6acdfd4..0000000 --- a/Books/migrations/0008_auto_20180716_1052.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.0.7 on 2018-07-16 06:22 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('Books', '0007_auto_20180716_1046'), - ] - - operations = [ - migrations.RenameField( - model_name='book', - old_name='image_url', - new_name='book_logo', - ), - ] diff --git a/Books/migrations/0009_auto_20180716_1432.py b/Books/migrations/0009_auto_20180716_1432.py deleted file mode 100644 index 5cca548..0000000 --- a/Books/migrations/0009_auto_20180716_1432.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.0.7 on 2018-07-16 10:02 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('Books', '0008_auto_20180716_1052'), - ] - - operations = [ - migrations.AlterField( - model_name='book', - name='is_taken', - field=models.CharField(max_length=300), - ), - ] diff --git a/Books/migrations/0010_auto_20180716_1438.py b/Books/migrations/0010_auto_20180716_1438.py deleted file mode 100644 index d840884..0000000 --- a/Books/migrations/0010_auto_20180716_1438.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.0.7 on 2018-07-16 10:08 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('Books', '0009_auto_20180716_1432'), - ] - - operations = [ - migrations.RenameField( - model_name='book', - old_name='is_taken', - new_name='taken_by', - ), - ] diff --git a/Books/migrations/0011_book_book_logo_url.py b/Books/migrations/0011_book_book_logo_url.py deleted file mode 100644 index 4768d82..0000000 --- a/Books/migrations/0011_book_book_logo_url.py +++ /dev/null @@ -1,19 +0,0 @@ -# Generated by Django 2.0.7 on 2018-07-16 10:15 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('Books', '0010_auto_20180716_1438'), - ] - - operations = [ - migrations.AddField( - model_name='book', - name='book_logo_url', - field=models.CharField(default='', max_length=500), - preserve_default=False, - ), - ] diff --git a/Books/migrations/0012_remove_book_book_logo_url.py b/Books/migrations/0012_remove_book_book_logo_url.py deleted file mode 100644 index 904b1c8..0000000 --- a/Books/migrations/0012_remove_book_book_logo_url.py +++ /dev/null @@ -1,17 +0,0 @@ -# Generated by Django 2.0.7 on 2018-07-16 10:16 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('Books', '0011_book_book_logo_url'), - ] - - operations = [ - migrations.RemoveField( - model_name='book', - name='book_logo_url', - ), - ] diff --git a/Books/migrations/0013_auto_20180724_1747.py b/Books/migrations/0013_auto_20180724_1747.py deleted file mode 100644 index f5761fd..0000000 --- a/Books/migrations/0013_auto_20180724_1747.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.0 on 2018-07-24 17:47 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('Books', '0012_remove_book_book_logo_url'), - ] - - operations = [ - migrations.AlterField( - model_name='book', - name='book_logo', - field=models.ImageField(default='', max_length=500, upload_to=''), - ), - ] diff --git a/Books/migrations/0014_auto_20180724_1748.py b/Books/migrations/0014_auto_20180724_1748.py deleted file mode 100644 index 8157899..0000000 --- a/Books/migrations/0014_auto_20180724_1748.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.0 on 2018-07-24 17:48 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('Books', '0013_auto_20180724_1747'), - ] - - operations = [ - migrations.AlterField( - model_name='book', - name='book_logo', - field=models.FileField(max_length=500, upload_to=''), - ), - ] diff --git a/Books/migrations/0015_auto_20180724_1802.py b/Books/migrations/0015_auto_20180724_1802.py deleted file mode 100644 index e4d7601..0000000 --- a/Books/migrations/0015_auto_20180724_1802.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.0 on 2018-07-24 18:02 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('Books', '0014_auto_20180724_1748'), - ] - - operations = [ - migrations.AlterField( - model_name='book', - name='book_logo', - field=models.FileField(default='', max_length=500, upload_to=''), - ), - ] diff --git a/Books/migrations/0016_book_description.py b/Books/migrations/0016_book_description.py deleted file mode 100644 index 9ea2d12..0000000 --- a/Books/migrations/0016_book_description.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.0 on 2018-07-24 18:30 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('Books', '0015_auto_20180724_1802'), - ] - - operations = [ - migrations.AddField( - model_name='book', - name='description', - field=models.TextField(default=''), - ), - ] diff --git a/Books/migrations/__init__.py b/Books/migrations/__init__.py old mode 100644 new mode 100755 diff --git a/Books/models.py b/Books/models.py index 6cf9246..6417860 100644 --- a/Books/models.py +++ b/Books/models.py @@ -14,3 +14,12 @@ def get_absolute_url(self): def __str__(self): return self.title + ' - ' + self.author + +class RequestedBooks(models.Model): + title= models.CharField(max_length=100) + author=models.CharField(max_length=100 , blank=True) + #publisher=models.CharField(max_length=100, blank=True) + + def __str__(self): + return self.title+" - "+ self.author + diff --git a/Books/static/Books/images/ivory-off-white-paper-texture.jpg b/Books/static/Books/images/ivory-off-white-paper-texture.jpg old mode 100644 new mode 100755 diff --git a/Books/static/Books/images/paper-background.jpg b/Books/static/Books/images/paper-background.jpg old mode 100644 new mode 100755 diff --git a/Books/static/Books/style.css b/Books/static/Books/style.css old mode 100644 new mode 100755 diff --git a/Books/templates/Books/base.html b/Books/templates/Books/base.html old mode 100644 new mode 100755 index 753638f..27a75bd --- a/Books/templates/Books/base.html +++ b/Books/templates/Books/base.html @@ -59,12 +59,25 @@