├── .gitignore ├── books ├── __init__.py ├── migrations │ ├── __init__.py │ ├── __pycache__ │ │ ├── __init__.cpython-39.pyc │ │ ├── 0003_review.cpython-39.pyc │ │ ├── 0001_initial.cpython-39.pyc │ │ ├── 0009_review_user.cpython-39.pyc │ │ ├── 0010_book_image.cpython-39.pyc │ │ ├── 0005_review_book_id.cpython-39.pyc │ │ ├── 0002_auto_20210421_0739.cpython-39.pyc │ │ ├── 0004_review_created_at.cpython-39.pyc │ │ ├── 0006_auto_20210423_0655.cpython-39.pyc │ │ ├── 0007_auto_20210423_0815.cpython-39.pyc │ │ ├── 0011_auto_20210425_1900.cpython-39.pyc │ │ └── 0008_rename_authors_author.cpython-39.pyc │ ├── 0008_rename_authors_author.py │ ├── 0004_review_created_at.py │ ├── 0005_review_book_id.py │ ├── 0010_book_image.py │ ├── 0001_initial.py │ ├── 0003_review.py │ ├── 0011_auto_20210425_1900.py │ ├── 0009_review_user.py │ ├── 0006_auto_20210423_0655.py │ ├── 0007_auto_20210423_0815.py │ └── 0002_auto_20210421_0739.py ├── tests.py ├── __pycache__ │ ├── apps.cpython-39.pyc │ ├── form.cpython-39.pyc │ ├── urls.cpython-39.pyc │ ├── admin.cpython-39.pyc │ ├── models.cpython-39.pyc │ ├── views.cpython-39.pyc │ └── __init__.cpython-39.pyc ├── apps.py ├── admin.py ├── urls.py ├── form.py ├── templates │ └── books │ │ ├── book_list.html │ │ └── book_detail.html ├── models.py └── views.py ├── bookstore ├── __init__.py ├── __pycache__ │ ├── urls.cpython-39.pyc │ ├── wsgi.cpython-39.pyc │ ├── __init__.cpython-39.pyc │ └── settings.cpython-39.pyc ├── asgi.py ├── wsgi.py ├── urls.py └── settings.py ├── Procfile ├── .DS_Store ├── db.sqlite3 ├── media ├── amitav.jpg ├── big sur.png ├── big sur_eQ1hn0e.png └── images │ ├── ableson.jpeg │ ├── ahmed.jpeg │ ├── ahmed2.jpeg │ ├── ableson2.jpeg │ └── review │ └── big_sur.png ├── requirements.txt ├── templates ├── registration │ ├── password_reset_complete.html │ ├── password_reset_form.html │ ├── password_reset_done.html │ ├── password_reset_confirm.html │ └── login.html └── base.html ├── deploy.md ├── manage.py └── books.json /.gitignore: -------------------------------------------------------------------------------- 1 | venv/* -------------------------------------------------------------------------------- /books/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /bookstore/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /books/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | web: gunicorn bookstore.wsgi --log-file - -------------------------------------------------------------------------------- /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfumes/django-course/HEAD/.DS_Store -------------------------------------------------------------------------------- /db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfumes/django-course/HEAD/db.sqlite3 -------------------------------------------------------------------------------- /books/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /media/amitav.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfumes/django-course/HEAD/media/amitav.jpg -------------------------------------------------------------------------------- /media/big sur.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfumes/django-course/HEAD/media/big sur.png -------------------------------------------------------------------------------- /media/big sur_eQ1hn0e.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfumes/django-course/HEAD/media/big sur_eQ1hn0e.png -------------------------------------------------------------------------------- /media/images/ableson.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfumes/django-course/HEAD/media/images/ableson.jpeg -------------------------------------------------------------------------------- /media/images/ahmed.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfumes/django-course/HEAD/media/images/ahmed.jpeg -------------------------------------------------------------------------------- /media/images/ahmed2.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfumes/django-course/HEAD/media/images/ahmed2.jpeg -------------------------------------------------------------------------------- /media/images/ableson2.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfumes/django-course/HEAD/media/images/ableson2.jpeg -------------------------------------------------------------------------------- /media/images/review/big_sur.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfumes/django-course/HEAD/media/images/review/big_sur.png -------------------------------------------------------------------------------- /books/__pycache__/apps.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfumes/django-course/HEAD/books/__pycache__/apps.cpython-39.pyc -------------------------------------------------------------------------------- /books/__pycache__/form.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfumes/django-course/HEAD/books/__pycache__/form.cpython-39.pyc -------------------------------------------------------------------------------- /books/__pycache__/urls.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfumes/django-course/HEAD/books/__pycache__/urls.cpython-39.pyc -------------------------------------------------------------------------------- /books/__pycache__/admin.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfumes/django-course/HEAD/books/__pycache__/admin.cpython-39.pyc -------------------------------------------------------------------------------- /books/__pycache__/models.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfumes/django-course/HEAD/books/__pycache__/models.cpython-39.pyc -------------------------------------------------------------------------------- /books/__pycache__/views.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfumes/django-course/HEAD/books/__pycache__/views.cpython-39.pyc -------------------------------------------------------------------------------- /books/__pycache__/__init__.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfumes/django-course/HEAD/books/__pycache__/__init__.cpython-39.pyc -------------------------------------------------------------------------------- /bookstore/__pycache__/urls.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfumes/django-course/HEAD/bookstore/__pycache__/urls.cpython-39.pyc -------------------------------------------------------------------------------- /bookstore/__pycache__/wsgi.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfumes/django-course/HEAD/bookstore/__pycache__/wsgi.cpython-39.pyc -------------------------------------------------------------------------------- /bookstore/__pycache__/__init__.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfumes/django-course/HEAD/bookstore/__pycache__/__init__.cpython-39.pyc -------------------------------------------------------------------------------- /bookstore/__pycache__/settings.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfumes/django-course/HEAD/bookstore/__pycache__/settings.cpython-39.pyc -------------------------------------------------------------------------------- /books/migrations/__pycache__/__init__.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfumes/django-course/HEAD/books/migrations/__pycache__/__init__.cpython-39.pyc -------------------------------------------------------------------------------- /books/migrations/__pycache__/0003_review.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfumes/django-course/HEAD/books/migrations/__pycache__/0003_review.cpython-39.pyc -------------------------------------------------------------------------------- /books/migrations/__pycache__/0001_initial.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfumes/django-course/HEAD/books/migrations/__pycache__/0001_initial.cpython-39.pyc -------------------------------------------------------------------------------- /books/migrations/__pycache__/0009_review_user.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfumes/django-course/HEAD/books/migrations/__pycache__/0009_review_user.cpython-39.pyc -------------------------------------------------------------------------------- /books/migrations/__pycache__/0010_book_image.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfumes/django-course/HEAD/books/migrations/__pycache__/0010_book_image.cpython-39.pyc -------------------------------------------------------------------------------- /books/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class BooksConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'books' 7 | -------------------------------------------------------------------------------- /books/migrations/__pycache__/0005_review_book_id.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfumes/django-course/HEAD/books/migrations/__pycache__/0005_review_book_id.cpython-39.pyc -------------------------------------------------------------------------------- /books/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from books.models import Book, Author 3 | # Register your models here. 4 | 5 | admin.site.register(Book) 6 | admin.site.register(Author) 7 | -------------------------------------------------------------------------------- /books/migrations/__pycache__/0002_auto_20210421_0739.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfumes/django-course/HEAD/books/migrations/__pycache__/0002_auto_20210421_0739.cpython-39.pyc -------------------------------------------------------------------------------- /books/migrations/__pycache__/0004_review_created_at.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfumes/django-course/HEAD/books/migrations/__pycache__/0004_review_created_at.cpython-39.pyc -------------------------------------------------------------------------------- /books/migrations/__pycache__/0006_auto_20210423_0655.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfumes/django-course/HEAD/books/migrations/__pycache__/0006_auto_20210423_0655.cpython-39.pyc -------------------------------------------------------------------------------- /books/migrations/__pycache__/0007_auto_20210423_0815.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfumes/django-course/HEAD/books/migrations/__pycache__/0007_auto_20210423_0815.cpython-39.pyc -------------------------------------------------------------------------------- /books/migrations/__pycache__/0011_auto_20210425_1900.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfumes/django-course/HEAD/books/migrations/__pycache__/0011_auto_20210425_1900.cpython-39.pyc -------------------------------------------------------------------------------- /books/migrations/__pycache__/0008_rename_authors_author.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfumes/django-course/HEAD/books/migrations/__pycache__/0008_rename_authors_author.cpython-39.pyc -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | asgiref==3.3.4 2 | autopep8==1.5.7 3 | dj-database-url==0.5.0 4 | Django==3.2 5 | gunicorn==20.1.0 6 | Pillow==8.2.0 7 | psycopg2-binary==2.8.6 8 | pycodestyle==2.7.0 9 | pytz==2021.1 10 | sqlparse==0.4.1 11 | toml==0.10.2 12 | whitenoise==5.2.0 13 | -------------------------------------------------------------------------------- /books/urls.py: -------------------------------------------------------------------------------- 1 | 2 | from django.urls import path 3 | 4 | from . import views 5 | 6 | urlpatterns = [ 7 | path('', views.BookListView.as_view(), name='book.all'), 8 | path('', views.BookDetailView.as_view(), name="book.show"), 9 | path('/review', views.review, name="book.review"), 10 | path('', views.author, name="author.books") 11 | ] 12 | -------------------------------------------------------------------------------- /books/form.py: -------------------------------------------------------------------------------- 1 | from django import forms 2 | from books.models import Review 3 | 4 | 5 | class ReviewForm(forms.ModelForm): 6 | body = forms.CharField(widget=forms.Textarea(attrs={ 7 | 'class': "border rounded p-2 w-full", 'placeholder': "Write your review here"})) 8 | image = forms.ImageField(required=False) 9 | 10 | class Meta: 11 | model = Review 12 | fields = ['body', 'image'] 13 | -------------------------------------------------------------------------------- /books/migrations/0008_rename_authors_author.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2 on 2021-04-23 08:19 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('books', '0007_auto_20210423_0815'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RenameModel( 14 | old_name='Authors', 15 | new_name='Author', 16 | ), 17 | ] 18 | -------------------------------------------------------------------------------- /bookstore/asgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | ASGI config for bookstore project. 3 | 4 | It exposes the ASGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/3.2/howto/deployment/asgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.asgi import get_asgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'bookstore.settings') 15 | 16 | application = get_asgi_application() 17 | -------------------------------------------------------------------------------- /bookstore/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for bookstore project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/3.2/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'bookstore.settings') 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /templates/registration/password_reset_complete.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | 4 | 5 | {% block content %} 6 |
7 |
8 |

Password reset complete

9 |

10 | Your password has been set. You may go ahead and log in now. 11 |

12 | Login Now 13 |
14 |
15 | 16 | {% endblock %} 17 | -------------------------------------------------------------------------------- /books/migrations/0004_review_created_at.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2 on 2021-04-22 09:59 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('books', '0003_review'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='review', 15 | name='created_at', 16 | field=models.DateTimeField(auto_now=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /books/migrations/0005_review_book_id.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2 on 2021-04-22 10:05 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('books', '0004_review_created_at'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='review', 15 | name='book_id', 16 | field=models.BigIntegerField(default=1), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /books/migrations/0010_book_image.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2 on 2021-04-25 07:58 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('books', '0009_review_user'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='book', 15 | name='image', 16 | field=models.ImageField(null=True, upload_to='images'), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /bookstore/urls.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from django.urls import path, include 3 | from django.contrib.auth import views as auth_views 4 | from django.conf import settings 5 | from django.conf.urls.static import static 6 | 7 | urlpatterns = [ 8 | path('book/', include('books.urls')), 9 | path('admin/', admin.site.urls), 10 | path('login/', auth_views.LoginView.as_view(redirect_authenticated_user=True)), 11 | path('', include('django.contrib.auth.urls')), 12 | ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) 13 | -------------------------------------------------------------------------------- /deploy.md: -------------------------------------------------------------------------------- 1 | manage.py check --deploy 2 | 3 | 1. secret key 4 | 2. debug 5 | 3. database 6 | pip install dj-database-url 7 | pip install psycopg2-binary 8 | import dj_database_url 9 | dj_database_url.config(conn_max_age=500) 10 | 4. serving static files 11 | static root 12 | pip install whitenoise 13 | 'whitenoise.middleware.WhiteNoiseMiddleware', 14 | 5. HTTP Server 15 | pip install gunicorn 16 | 6. export requirements 17 | 18 | 7. For Heroku 19 | procfile 20 | web: gunicorn projectName.wsgi --log-file - 21 | 8. Create Heroku app and Add Allowed hosts -------------------------------------------------------------------------------- /books/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2 on 2021-04-21 07:29 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | initial = True 9 | 10 | dependencies = [ 11 | ] 12 | 13 | operations = [ 14 | migrations.CreateModel( 15 | name='Book', 16 | fields=[ 17 | ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 18 | ('title', models.CharField(max_length=256)), 19 | ], 20 | ), 21 | ] 22 | -------------------------------------------------------------------------------- /books/migrations/0003_review.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2 on 2021-04-22 09:44 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('books', '0002_auto_20210421_0739'), 10 | ] 11 | 12 | operations = [ 13 | migrations.CreateModel( 14 | name='Review', 15 | fields=[ 16 | ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 17 | ('body', models.TextField()), 18 | ], 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /templates/registration/password_reset_form.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | 4 | 5 | {% block content %} 6 |
7 | {% csrf_token %} 8 | 9 | 16 | 21 |
22 | {% endblock %} 23 | -------------------------------------------------------------------------------- /books/migrations/0011_auto_20210425_1900.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2 on 2021-04-25 19:00 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('books', '0010_book_image'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RemoveField( 14 | model_name='book', 15 | name='thumbnailUrl', 16 | ), 17 | migrations.AddField( 18 | model_name='review', 19 | name='image', 20 | field=models.ImageField(null=True, upload_to='images/review'), 21 | ), 22 | ] 23 | -------------------------------------------------------------------------------- /templates/registration/password_reset_done.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | 4 | 5 | {% block content %} 6 |
7 |
8 |

Password reset sent

9 |

10 | We’ve emailed you instructions for setting your password, if an account 11 | exists with the email you entered. You should receive them shortly. 12 |

13 |

14 | If you don’t receive an email, please make sure you’ve entered the address 15 | you registered with, and check your spam folder. 16 |

17 |
18 |
19 | {% endblock %} 20 | -------------------------------------------------------------------------------- /books/migrations/0009_review_user.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2 on 2021-04-25 04:42 2 | 3 | from django.conf import settings 4 | from django.db import migrations, models 5 | import django.db.models.deletion 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | migrations.swappable_dependency(settings.AUTH_USER_MODEL), 12 | ('books', '0008_rename_authors_author'), 13 | ] 14 | 15 | operations = [ 16 | migrations.AddField( 17 | model_name='review', 18 | name='user', 19 | field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL), 20 | ), 21 | ] 22 | -------------------------------------------------------------------------------- /books/migrations/0006_auto_20210423_0655.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2 on 2021-04-23 06:55 2 | 3 | from django.db import migrations, models 4 | import django.db.models.deletion 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('books', '0005_review_book_id'), 11 | ] 12 | 13 | operations = [ 14 | migrations.RemoveField( 15 | model_name='review', 16 | name='book_id', 17 | ), 18 | migrations.AddField( 19 | model_name='review', 20 | name='book', 21 | field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='books.book'), 22 | ), 23 | ] 24 | -------------------------------------------------------------------------------- /books/templates/books/book_list.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block title %} Bookstore - Books {% endblock%} 4 | 5 | 6 | {% block nav_title %} 7 | Programming Books 8 | {% endblock nav_title %} 9 | 10 | 11 | {% block content %} 12 |
13 | 14 | 15 |
16 | {% for book in book_list %} 17 | 22 |
23 | 24 |
25 |

{{ book.title }}

26 |
27 | {% endfor %} 28 |
29 |
30 | {% endblock %} 31 | -------------------------------------------------------------------------------- /manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | """Django's command-line utility for administrative tasks.""" 3 | import os 4 | import sys 5 | 6 | 7 | def main(): 8 | """Run administrative tasks.""" 9 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'bookstore.settings') 10 | try: 11 | from django.core.management import execute_from_command_line 12 | except ImportError as exc: 13 | raise ImportError( 14 | "Couldn't import Django. Are you sure it's installed and " 15 | "available on your PYTHONPATH environment variable? Did you " 16 | "forget to activate a virtual environment?" 17 | ) from exc 18 | execute_from_command_line(sys.argv) 19 | 20 | 21 | if __name__ == '__main__': 22 | main() 23 | -------------------------------------------------------------------------------- /books/migrations/0007_auto_20210423_0815.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2 on 2021-04-23 08:15 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('books', '0006_auto_20210423_0655'), 10 | ] 11 | 12 | operations = [ 13 | migrations.CreateModel( 14 | name='Authors', 15 | fields=[ 16 | ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 17 | ('name', models.CharField(max_length=256)), 18 | ('created_at', models.DateTimeField(auto_now=True)), 19 | ], 20 | ), 21 | migrations.AddField( 22 | model_name='book', 23 | name='authors', 24 | field=models.ManyToManyField(to='books.Authors'), 25 | ), 26 | ] 27 | -------------------------------------------------------------------------------- /books/migrations/0002_auto_20210421_0739.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2 on 2021-04-21 07:39 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('books', '0001_initial'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='book', 15 | name='longDescription', 16 | field=models.TextField(null=True), 17 | ), 18 | migrations.AddField( 19 | model_name='book', 20 | name='pageCount', 21 | field=models.IntegerField(default=0), 22 | ), 23 | migrations.AddField( 24 | model_name='book', 25 | name='shortDescription', 26 | field=models.CharField(max_length=256, null=True), 27 | ), 28 | migrations.AddField( 29 | model_name='book', 30 | name='thumbnailUrl', 31 | field=models.CharField(max_length=256, null=True), 32 | ), 33 | ] 34 | -------------------------------------------------------------------------------- /books/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | from django.contrib.auth.models import User 3 | # Create your models here. 4 | 5 | 6 | class Author(models.Model): 7 | name = models.CharField(max_length=256) 8 | created_at = models.DateTimeField(auto_now=True) 9 | 10 | def __str__(self): 11 | return self.name 12 | 13 | 14 | class Book(models.Model): 15 | title = models.CharField(max_length=256) 16 | pageCount = models.IntegerField(default=0) 17 | shortDescription = models.CharField(max_length=256, null=True) 18 | longDescription = models.TextField(null=True) 19 | authors = models.ManyToManyField(Author) 20 | image = models.ImageField(upload_to="images", null=True) 21 | 22 | def __str__(self): 23 | return f"{self.id} {self.title}" 24 | 25 | 26 | class Review(models.Model): 27 | body = models.TextField() 28 | user = models.ForeignKey(User, on_delete=models.CASCADE, null=True) 29 | created_at = models.DateTimeField(auto_now=True) 30 | book = models.ForeignKey(Book, on_delete=models.CASCADE, null=True) 31 | image = models.ImageField(upload_to="images/review", null=True) 32 | -------------------------------------------------------------------------------- /books/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render, get_object_or_404, redirect 2 | from books.models import Book, Review 3 | from django.views.generic import ListView, DetailView 4 | from django.core.files.storage import FileSystemStorage 5 | from books.form import ReviewForm 6 | 7 | 8 | class BookListView(ListView): 9 | def get_queryset(self): 10 | return Book.objects.all() 11 | 12 | 13 | class BookDetailView(DetailView): 14 | model = Book 15 | 16 | def get_context_data(self, **kwargs): 17 | context = super().get_context_data(**kwargs) 18 | context['reviews'] = context['book'].review_set.order_by('-created_at') 19 | context['authors'] = context['book'].authors.all() 20 | context['form'] = ReviewForm() 21 | return context 22 | 23 | 24 | def author(request, author): 25 | books = Book.objects.filter(authors__name=author) 26 | context = {'book_list': books} 27 | return render(request, 'books/book_list.html', context) 28 | 29 | 30 | def review(request, id): 31 | if request.user.is_authenticated: 32 | newReview = Review(book_id=id, user=request.user) 33 | form = ReviewForm(request.POST, request.FILES, instance=newReview) 34 | if form.is_valid(): 35 | form.save() 36 | return redirect(f"/book/{id}") 37 | -------------------------------------------------------------------------------- /templates/registration/password_reset_confirm.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | 4 | 5 | {% block content %} 6 |
7 |
8 | {% if validlink %} 9 |

Enter new password

10 |

11 | Please enter your new password twice so we can verify you typed it in 12 | correctly. 13 |

14 |
15 | {% csrf_token %} 16 |
17 | 18 | {{form.new_password1}} 19 |
20 |
21 | 22 | {{form.new_password2}} 23 |
24 | 25 |
26 | 31 |
32 |
33 | 34 | {% else %} 35 |

Password reset unsuccessful

36 |

37 | The password reset link was invalid, possibly because it has already been 38 | used. Please request a new password reset. 39 |

40 | {% endif %} 41 |
42 |
43 | 44 | {% endblock %} 45 | -------------------------------------------------------------------------------- /templates/base.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 11 | {% block title %} Django Course {% endblock %} 12 | 13 | 14 | 37 |
38 | {% block content %} 39 | 40 | {% endblock %} 41 |
42 | 43 | 44 | -------------------------------------------------------------------------------- /templates/registration/login.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block nav_title %} 4 | Login 5 | {% endblock %} 6 | 7 | {% block content %} 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 |
16 | {% csrf_token %} 17 |
18 |
{{ form.username.label_tag }}
19 |
{{ form.username }}
20 |
21 |
22 |
{{ form.password.label_tag }}
23 |
{{ form.password }}
24 |
25 | 26 | 27 | 28 | 29 |

Lost password?

30 |
31 |
32 | {# Assumes you setup the password_reset view in your URLconf #} 33 | 34 | 35 | {% endblock %} 36 | 37 | 38 | -------------------------------------------------------------------------------- /books/templates/books/book_detail.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block title %} 4 | Bookstore - {{book.title}} 5 | {% endblock %} 6 | 7 | 8 | {% block nav_title %} 9 | {{book.title}} 10 | {% endblock %} 11 | 12 | 13 | {% block content %} 14 |
15 |
16 |
17 |
18 | 19 |
20 |
21 |

About

22 |

{{book.shortDescription}}

23 | 24 |
25 |

Pages

26 |

Total {{book.pageCount}} pages

27 |
28 | 29 |
30 |

Author

31 |
32 | {% for author in authors %} 33 | {{author}}, 34 | {% endfor %} 35 | 36 |
37 | 38 |
39 |

Description

40 |

{{book.longDescription}}

41 |
42 | 43 |
44 | {% if user.is_authenticated %} 45 |
46 | {% csrf_token %} 47 | {{form.as_p}} 48 | 54 |
55 | {% else %} 56 |

57 | Login to write review 58 |

59 | {% endif %} 60 |
61 | 62 |
63 | {% for review in reviews %} 64 |
65 |
66 |

{{review.user}}

67 |

{{review.created_at}}

68 |
69 |

{{review.body}}

70 | {% if review.image %} 71 | 72 | {% endif %} 73 |
74 | {% endfor %} 75 |
76 |
77 |
78 |
79 |
80 | {% endblock %} 81 | -------------------------------------------------------------------------------- /bookstore/settings.py: -------------------------------------------------------------------------------- 1 | """ 2 | Django settings for bookstore project. 3 | 4 | Generated by 'django-admin startproject' using Django 3.2. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/3.2/topics/settings/ 8 | 9 | For the full list of settings and their values, see 10 | https://docs.djangoproject.com/en/3.2/ref/settings/ 11 | """ 12 | 13 | from pathlib import Path 14 | import os 15 | import dj_database_url 16 | 17 | # Build paths inside the project like this: BASE_DIR / 'subdir'. 18 | BASE_DIR = Path(__file__).resolve().parent.parent 19 | 20 | 21 | # Quick-start development settings - unsuitable for production 22 | # See https://docs.djangoproject.com/en/3.2/howto/deployment/checklist/ 23 | 24 | # SECURITY WARNING: keep the secret key used in production secret! 25 | SECRET_KEY = os.environ.get( 26 | 'DJANGO_SECRET_KEY', 'c3f6*71=$=_j*z#8rpfhu$gj^ll80&_o%-u#--a') 27 | 28 | # SECURITY WARNING: don't run with debug turned on in production! 29 | DEBUG = os.environ.get('DJANGO_DEBUG', '') == 'True' 30 | 31 | ALLOWED_HOSTS = ['stormy-plateau-71248.herokuapp.com'] 32 | 33 | 34 | # Application definition 35 | 36 | INSTALLED_APPS = [ 37 | 'django.contrib.admin', 38 | 'django.contrib.auth', 39 | 'django.contrib.contenttypes', 40 | 'django.contrib.sessions', 41 | 'django.contrib.messages', 42 | 'django.contrib.staticfiles', 43 | 'books' 44 | ] 45 | 46 | MIDDLEWARE = [ 47 | 'django.middleware.security.SecurityMiddleware', 48 | 'whitenoise.middleware.WhiteNoiseMiddleware', 49 | 'django.contrib.sessions.middleware.SessionMiddleware', 50 | 'django.middleware.common.CommonMiddleware', 51 | 'django.middleware.csrf.CsrfViewMiddleware', 52 | 'django.contrib.auth.middleware.AuthenticationMiddleware', 53 | 'django.contrib.messages.middleware.MessageMiddleware', 54 | 'django.middleware.clickjacking.XFrameOptionsMiddleware', 55 | ] 56 | 57 | ROOT_URLCONF = 'bookstore.urls' 58 | 59 | TEMPLATES = [ 60 | { 61 | 'BACKEND': 'django.template.backends.django.DjangoTemplates', 62 | 'DIRS': [os.path.join(BASE_DIR), 'templates'], 63 | 'APP_DIRS': True, 64 | 'OPTIONS': { 65 | 'context_processors': [ 66 | 'django.template.context_processors.debug', 67 | 'django.template.context_processors.request', 68 | 'django.contrib.auth.context_processors.auth', 69 | 'django.contrib.messages.context_processors.messages', 70 | ], 71 | }, 72 | }, 73 | ] 74 | 75 | WSGI_APPLICATION = 'bookstore.wsgi.application' 76 | 77 | 78 | # Database 79 | # https://docs.djangoproject.com/en/3.2/ref/settings/#databases 80 | 81 | if os.environ.get('DATABASE_URL'): 82 | DATABASES = { 83 | 'default': dj_database_url.config(conn_max_age=500) 84 | } 85 | else: 86 | DATABASES = { 87 | 'default': { 88 | 'ENGINE': 'django.db.backends.sqlite3', 89 | 'NAME': BASE_DIR / 'db.sqlite3', 90 | } 91 | } 92 | 93 | 94 | # Password validation 95 | # https://docs.djangoproject.com/en/3.2/ref/settings/#auth-password-validators 96 | 97 | AUTH_PASSWORD_VALIDATORS = [ 98 | { 99 | 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', 100 | }, 101 | { 102 | 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', 103 | }, 104 | { 105 | 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', 106 | }, 107 | { 108 | 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', 109 | }, 110 | ] 111 | 112 | 113 | # Internationalization 114 | # https://docs.djangoproject.com/en/3.2/topics/i18n/ 115 | 116 | LANGUAGE_CODE = 'en-us' 117 | 118 | TIME_ZONE = 'UTC' 119 | 120 | USE_I18N = True 121 | 122 | USE_L10N = True 123 | 124 | USE_TZ = True 125 | 126 | 127 | # Static files (CSS, JavaScript, Images) 128 | # https://docs.djangoproject.com/en/3.2/howto/static-files/ 129 | 130 | STATIC_URL = '/static/' 131 | STATIC_ROOT = BASE_DIR / 'staticfiles' 132 | 133 | LOGIN_REDIRECT_URL = '/book' 134 | LOGIN_URL = '/login' 135 | LOGOUT_REDIRECT_URL = '/login' 136 | 137 | EMAIL_HOST = 'smtp.mailtrap.io' 138 | EMAIL_HOST_USER = '766508eaa9e7b8' 139 | EMAIL_HOST_PASSWORD = 'a5f2a676f1d21e' 140 | EMAIL_PORT = '2525' 141 | 142 | MEDIA_ROOT = "media" 143 | MEDIA_URL = "media/" 144 | 145 | # Default primary key field type 146 | # https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field 147 | 148 | DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' 149 | -------------------------------------------------------------------------------- /books.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": 1, 4 | "title": "Unlocking Android", 5 | "isbn": "1933988673", 6 | "pageCount": 416, 7 | "publishedDate": "2009-04-01T00:00:00.000-0700", 8 | "thumbnailUrl": "https://s3.amazonaws.com/AKIAJC5RLADLUMVRPFDQ.book-thumb-images/ableson.jpg", 9 | "shortDescription": "Unlocking Android: A Developer's Guide provides concise, hands-on instruction for the Android operating system and development tools. This book teaches important architectural concepts in a straightforward writing style and builds on this with practical and useful examples throughout.", 10 | "longDescription": "Android is an open source mobile phone platform based on the Linux operating system and developed by the Open Handset Alliance, a consortium of over 30 hardware, software and telecom companies that focus on open standards for mobile devices. Led by search giant, Google, Android is designed to deliver a better and more open and cost effective mobile experience. Unlocking Android: A Developer's Guide provides concise, hands-on instruction for the Android operating system and development tools. This book teaches important architectural concepts in a straightforward writing style and builds on this with practical and useful examples throughout. Based on his mobile development experience and his deep knowledge of the arcane Android technical documentation, the author conveys the know-how you need to develop practical applications that build upon or replace any of Androids features, however small. Unlocking Android: A Developer's Guide prepares the reader to embrace the platform in easy-to-understand language and builds on this foundation with re-usable Java code examples. It is ideal for corporate and hobbyists alike who have an interest, or a mandate, to deliver software functionality for cell phones. WHAT'S INSIDE: * Android's place in the market * Using the Eclipse environment for Android development * The Intents - how and why they are used * Application classes: o Activity o Service o IntentReceiver * User interface design * Using the ContentProvider to manage data * Persisting data with the SQLite database * Networking examples * Telephony applications * Notification methods * OpenGL, animation & multimedia * Sample Applications ", 11 | "status": "PUBLISH", 12 | "authors": ["W. Frank Ableson", "Charlie Collins", "Robi Sen"], 13 | "categories": ["Open Source", "Mobile"] 14 | }, 15 | { 16 | "id": 2, 17 | "title": "Android in Action, Second Edition", 18 | "isbn": "1935182722", 19 | "pageCount": 592, 20 | "publishedDate": "2011-01-14T00:00:00.000-0800", 21 | "thumbnailUrl": "https://s3.amazonaws.com/AKIAJC5RLADLUMVRPFDQ.book-thumb-images/ableson2.jpg", 22 | "shortDescription": "Android in Action, Second Edition is a comprehensive tutorial for Android developers. Taking you far beyond \"Hello Android,\" this fast-paced book puts you in the driver's seat as you learn important architectural concepts and implementation strategies. You'll master the SDK, build WebKit apps using HTML 5, and even learn to extend or replace Android's built-in features by building useful and intriguing examples. ", 23 | "longDescription": "When it comes to mobile apps, Android can do almost anything and with this book, so can you! Android runs on mobile devices ranging from smart phones to tablets to countless special-purpose gadgets. It's the broadest mobile platform available. Android in Action, Second Edition is a comprehensive tutorial for Android developers. Taking you far beyond \"Hello Android,\" this fast-paced book puts you in the driver's seat as you learn important architectural concepts and implementation strategies. You'll master the SDK, build WebKit apps using HTML 5, and even learn to extend or replace Android's built-in features by building useful and intriguing examples. ", 24 | "status": "PUBLISH", 25 | "authors": ["W. Frank Ableson", "Robi Sen"], 26 | "categories": ["Java"] 27 | }, 28 | { 29 | "id": 4, 30 | "title": "Flex 3 in Action", 31 | "isbn": "1933988746", 32 | "pageCount": 576, 33 | "publishedDate": "2009-02-02T00:00:00.000-0800", 34 | "thumbnailUrl": "https://s3.amazonaws.com/AKIAJC5RLADLUMVRPFDQ.book-thumb-images/ahmed.jpg", 35 | "longDescription": "New web applications require engaging user-friendly interfaces and the cooler, the better. With Flex 3, web developers at any skill level can create high-quality, effective, and interactive Rich Internet Applications (RIAs) quickly and easily. Flex removes the complexity barrier from RIA development by offering sophisticated tools and a straightforward programming language so you can focus on what you want to do instead of how to do it. And now that the major components of Flex are free and open-source, the cost barrier is gone, as well! Flex 3 in Action is an easy-to-follow, hands-on Flex tutorial. Chock-full of examples, this book goes beyond feature coverage and helps you put Flex to work in real day-to-day tasks. You'll quickly master the Flex API and learn to apply the techniques that make your Flex applications stand out from the crowd. Interesting themes, styles, and skins It's in there. Working with databases You got it. Interactive forms and validation You bet. Charting techniques to help you visualize data Bam! The expert authors of Flex 3 in Action have one goal to help you get down to business with Flex 3. Fast. Many Flex books are overwhelming to new users focusing on the complexities of the language and the super-specialized subjects in the Flex eco-system; Flex 3 in Action filters out the noise and dives into the core topics you need every day. Using numerous easy-to-understand examples, Flex 3 in Action gives you a strong foundation that you can build on as the complexity of your projects increases.", 36 | "status": "PUBLISH", 37 | "authors": ["Tariq Ahmed with Jon Hirschi", "Faisal Abid"], 38 | "categories": ["Internet"] 39 | }, 40 | { 41 | "id": 5, 42 | "title": "Flex 4 in Action", 43 | "isbn": "1935182420", 44 | "pageCount": 600, 45 | "publishedDate": "2010-11-15T00:00:00.000-0800", 46 | "thumbnailUrl": "https://s3.amazonaws.com/AKIAJC5RLADLUMVRPFDQ.book-thumb-images/ahmed2.jpg", 47 | "longDescription": "Using Flex, you can create high-quality, effective, and interactive Rich Internet Applications (RIAs) quickly and easily. Flex removes the complexity barrier from RIA development by offering sophisticated tools and a straightforward programming language so you can focus on what you want to do instead of how to do it. And the new features added in Flex 4 give you an even wider range of options! Flex 4 in Action is an easy-to-follow, hands-on Flex tutorial that goes beyond feature coverage and helps you put Flex to work in real day-to-day tasks. You'll quickly master the Flex API and learn to apply the techniques that make your Flex applications stand out from the crowd. The expert authors of Flex 4 in Action have one goal-to help you get down to business with Flex. Fast. Flex 4 in Action filters out the noise and dives into the core topics you need every day. Using numerous easy-to-understand examples, Flex 4 in Action gives you a strong foundation that you can build on as the complexity of your projects increases. Interesting themes, styles, and skins It's in there. Working with databases You got it. Interactive forms and validation You bet. Charting techniques to help you visualize data Bam! And you'll get full coverage of these great Flex 4 upgrades: Next generation Spark components-New buttons, form inputs, navigation controls and other visual components replace the Flex 3 \"Halo\" versions. Spark components are easier to customize, which makes skinning and theme design much faster A new \"network monitor\" allows you to see the data communications between a Flex application and a backend server, which helps when trying to debug applications that are communicating to another system/service Numerous productivity boosting features that speed up the process of creating applications A faster compiler to take your human-written source code and convert it into a machine-readable format Built-in support for unit testing allows you to improve the quality of your software, and reduce the time spent in testing", 48 | "status": "PUBLISH", 49 | "authors": ["Tariq Ahmed", "Dan Orlando", "John C. Bland II", "Joel Hooks"], 50 | "categories": ["Internet"] 51 | }, 52 | { 53 | "id": 6, 54 | "title": "Collective Intelligence in Action", 55 | "isbn": "1933988312", 56 | "pageCount": 425, 57 | "publishedDate": "2008-10-01T00:00:00.000-0700", 58 | "thumbnailUrl": "https://s3.amazonaws.com/AKIAJC5RLADLUMVRPFDQ.book-thumb-images/alag.jpg", 59 | "longDescription": "There's a great deal of wisdom in a crowd, but how do you listen to a thousand people talking at once Identifying the wants, needs, and knowledge of internet users can be like listening to a mob. In the Web 2.0 era, leveraging the collective power of user contributions, interactions, and feedback is the key to market dominance. A new category of powerful programming techniques lets you discover the patterns, inter-relationships, and individual profiles the collective intelligence locked in the data people leave behind as they surf websites, post blogs, and interact with other users. Collective Intelligence in Action is a hands-on guidebook for implementing collective-intelligence concepts using Java. It is the first Java-based book to emphasize the underlying algorithms and technical implementation of vital data gathering and mining techniques like analyzing trends, discovering relationships, and making predictions. It provides a pragmatic approach to personalization by combining content-based analysis with collaborative approaches. This book is for Java developers implementing collective intelligence in real, high-use applications. Following a running example in which you harvest and use information from blogs, you learn to develop software that you can embed in your own applications. The code examples are immediately reusable and give the Java developer a working collective intelligence toolkit. Along the way, you work with, a number of APIs and open-source toolkits including text analysis and search using Lucene, web-crawling using Nutch, and applying machine learning algorithms using WEKA and the Java Data Mining (JDM) standard.", 60 | "status": "PUBLISH", 61 | "authors": ["Satnam Alag"], 62 | "categories": ["Internet"] 63 | }, 64 | { 65 | "id": 7, 66 | "title": "Zend Framework in Action", 67 | "isbn": "1933988320", 68 | "pageCount": 432, 69 | "publishedDate": "2008-12-01T00:00:00.000-0800", 70 | "thumbnailUrl": "https://s3.amazonaws.com/AKIAJC5RLADLUMVRPFDQ.book-thumb-images/allen.jpg", 71 | "shortDescription": "Zend Framework in Action is a comprehensive tutorial that shows how to use the Zend Framework to create web-based applications and web services. This book takes you on an over-the-shoulder tour of the components of the Zend Framework as you build a high quality, real-world web application.", 72 | "longDescription": "From rather humble beginnings as the Personal Home Page scripting language, PHP has found its way into almost every server, corporation, and dev shop in the world. On an average day, somewhere between 500,000 and 2 million coders do something in PHP. Even when you use a well-understood language like PHP, building a modern web application requires tools that decrease development time and cost while improving code quality. Frameworks such as Ruby-on-Rails and Django have been getting a lot of attention as a result. For PHP coders, the Zend Framework offers that same promise without the need to move away from PHP. This powerful collection of components can be used in part or as a whole to speed up the development process. Zend Framework has the backing of Zend Technologies; the driving force behind the PHP programming language in which it is written. The first production release of the Zend Framework became available in July of 2007. Zend Framework in Action is a comprehensive tutorial that shows how to use the Zend Framework to create web-based applications and web services. This book takes you on an over-the-shoulder tour of the components of the Zend Framework as you build a high quality, real-world web application. This book is organized around the techniques you'll use every day as a web developer \"data handling, forms, authentication, and so forth. As you follow the running example, you'll learn to build interactive Ajax-driven features into your application without sacrificing nuts-and-bolts considerations like security and performance. This book is aimed at the competent PHP developer who wants to master framework-driven web development. Zend Framework in Action goes beyond the docs but still provides quick access to the most common topics encountered in the development of web applications. ", 73 | "status": "PUBLISH", 74 | "authors": ["Rob Allen", "Nick Lo", "Steven Brown"], 75 | "categories": ["Web Development"] 76 | }, 77 | { 78 | "id": 8, 79 | "title": "Flex on Java", 80 | "isbn": "1933988797", 81 | "pageCount": 265, 82 | "publishedDate": "2010-10-15T00:00:00.000-0700", 83 | "thumbnailUrl": "https://s3.amazonaws.com/AKIAJC5RLADLUMVRPFDQ.book-thumb-images/allmon.jpg", 84 | "shortDescription": " A beautifully written book that is a must have for every Java Developer. Ashish Kulkarni, Technical Director, E-Business Software Solutions Ltd.", 85 | "longDescription": "In the demo, a hip designer, a sharply-dressed marketer, and a smiling, relaxed developer sip lattes and calmly discuss how Flex is going to make customers happy and shorten the workday all while boosting the bottom line. The software systems they're using have been carefully selected and built from the ground up to work together seamlessly. There are no legacy systems, data, or competing business concerns to manage. Cut to reality. You're a Java developer. The marketing guy tells you that \"corporate\" wants a Flex-based site and you have to deliver it on top of what you already have. Your budget Don't even ask. \"Make it look like the Discovery channel or something.\" Flex on Java assumes you live in the real world not the demo. This unique book shows you how to refactor an existing web application using the server-side you already know. You'll learn to use Flex 3 in concert with Spring, EJB 3, POJOs, JMS, and other standard technologies. Wherever possible, the examples use free or open source software. The authors start with a typical Java web app and show you how to add a rich Flex interface. You also learn how to integrate Flex into your server-side Java via the BlazeDS framework, Adobe's open-source remoting and web messaging technology for Flex. The book shows you how to deploy to not only the web but also to the desktop using the Adobe Integrated Runtime (AIR). You will learn how to integrate Flex into your existing applications in order to build a next generation application that will delight users. Flex on Java is approachable for anyone beginning Java and Flex development. ", 86 | "status": "PUBLISH", 87 | "authors": ["Bernerd Allmon", "Jeremy Anderson"], 88 | "categories": ["Internet"] 89 | }, 90 | { 91 | "id": 9, 92 | "title": "Griffon in Action", 93 | "isbn": "1935182234", 94 | "pageCount": 375, 95 | "publishedDate": "2012-06-04T00:00:00.000-0700", 96 | "thumbnailUrl": "https://s3.amazonaws.com/AKIAJC5RLADLUMVRPFDQ.book-thumb-images/almiray.jpg", 97 | "shortDescription": "Griffon in Action is a comprehensive tutorial written for Java developers who want a more productive approach to UI development. In this book, you'll immediately dive into Griffon. After a Griffon orientation and a quick Groovy tutorial, you'll start building examples that explore Griffon's high productivity approach to Swing development. One of the troublesome parts of Swing development is the amount of Java code that is required to get a simple application off the ground.", 98 | "longDescription": "Although several options exist for interface development in Java, even popular UI toolkits like Swing have been notoriously complex and difficult to use. Griffon, an agile framework that uses Groovy to simplify Swing, makes UI development dramatically faster and easier. In many respects, Griffon is for desktop development what Grails is for web development. While it's based on Swing, its declarative style and approachable level of abstraction is instantly familiar to developers familiar with other technologies such as Flex or JavaFX. Griffon in Action is a comprehensive tutorial written for Java developers who want a more productive approach to UI development. In this book, you'll immediately dive into Griffon. After a Griffon orientation and a quick Groovy tutorial, you'll start building examples that explore Griffon's high productivity approach to Swing development. One of the troublesome parts of Swing development is the amount of Java code that is required to get a simple application off the ground. You'll learn how SwingBuilder (and its cousin builders) present a very palatable alternative in the form of a DSL geared towards building graphical user interfaces. Pair it up with the convention over configuration paradigm, a well tested and tried application source structure (based on Grails) and you have a recipe for quick and effective Swing application development. Griffon in Action covers declarative view development, like the one provided by JavaFX Script, as well as the structure, architecture and life cycle of Java application development", 99 | "status": "PUBLISH", 100 | "authors": ["Andres Almiray", "Danno Ferrin", "", "James Shingler"], 101 | "categories": ["Java"] 102 | }, 103 | { 104 | "id": 10, 105 | "title": "OSGi in Depth", 106 | "isbn": "193518217X", 107 | "pageCount": 325, 108 | "publishedDate": "2011-12-12T00:00:00.000-0800", 109 | "thumbnailUrl": "https://s3.amazonaws.com/AKIAJC5RLADLUMVRPFDQ.book-thumb-images/alves.jpg", 110 | "shortDescription": "Enterprise OSGi shows a Java developer how to develop to the OSGi Service Platform Enterprise specification, an emerging Java-based technology for developing modular enterprise applications. Enterprise OSGi addresses several shortcomings of existing enterprise platforms, such as allowing the creation of better maintainable and extensible applications, and provide a simpler, easier-to-use, light-weight solution to enterprise software development.", 111 | "longDescription": "A good application framework greatly simplifies a developer's task by providing reusable code modules that solve common, tedious, or complex tasks. Writing a great framework requires an extraordinary set of skills-ranging from deep knowledge of a programming language and target platform to a crystal-clear view of the problem space where the applications to be developed using the framework will be used. OSGi Application Frameworks shows a Java developer how to build frameworks based on the OSGi service platform. OSGi, an emerging Java-based technology for developing modular applications, is a great tool for framework building. A framework itself, OSGi allows the developer to create a more intuitive, modular framework by isolating many of the key challenges the framework developer faces. This book begins by describing the process, principles, and tools you must master to build a custom application framework. It introduces the fundamental concepts of OSGi, and then shows you how to put OSGi to work building various types of frameworks that solve specific development problems. OSGi is particularly useful for building frameworks that can be easily extended by developers to create domain-specific applications. This book teaches the developer to break down a problem domain into its abstractions and then use OSGi to create a modular framework solution. Along the way, the developer learns software engineering practices intrinsic to framework building that result in systems with better software qualities, such as flexibility, extensibility, and maintainability. Author Alexandre Alves guides you through major concepts, such as the definition of programming models and modularization techniques, and complements them with samples that have real applicability using industry-proved technologies, such as Spring-DM and Equinox.", 112 | "status": "PUBLISH", 113 | "authors": ["Alexandre de Castro Alves"], 114 | "categories": ["Java"] 115 | } 116 | ] 117 | --------------------------------------------------------------------------------