
Django: Web Development with Python
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
All prices
More details
Persons
Arun Ravindran is an avid speaker and blogger who has been tinkering with Django since 2007 for projects ranging from intranet applications to social networks. He is a long-time open source enthusiast and Python developer. His articles and screencasts have been invaluable to the rapidly growing Django community. He is currently a developer member of the Django Software Foundation. Arun is also a movie buff and loves graphic novels and comics.Dauzon Samuel :
nanBendoraitis Aidas :
Aidas Bendoraitis has been professionally building websites for the past 18 years. For the last 14 years, he has been working at a design company, studio 38 pure communication, in Berlin. Together with a small dedicated team, he has mostly used Django in the backend and jQuery in the frontend to create cultural and touristic web platforms.Among different side projects, he is bootstrapping a SaaS business with strategic prioritizer 1st things 1st. Aidas Bendoraitis is active on Twitter and other social media under the username DjangoTricks.
Content
- Cover
- Copyright
- Credits
- Preface
- Table of Content
- Module 1
- Chapter 1: Django's Position on the Web
- From Web 1.0 to Web 2.0
- What is Django?
- The MVC framework
- Why use Django?
- Summary
- Chapter 2: Creating a Django Project
- Installing Python 3
- Installing setuptools
- Installing PIP
- Installing Django
- Starting your project with Django
- Creating an application
- Configuring the application
- Summary
- Chapter 3: Hello World! with Django
- Routing in Django
- Regular expressions
- Creating our first URL
- Creating our first view
- Testing our application
- Summary
- Chapter 4: Working with Templates
- Displaying Hello world! in a template
- Injecting the data from the view to the template
- Creating dynamic templates
- Integrating variables in templates
- Using filters
- Creating DRY URLs
- Extending the templates
- Using static files in templates
- Summary
- Chapter 5: Working with Models
- Databases and Django
- Migrations with South
- Creating simple models
- The relationship between the models
- Extending models
- The admin module
- Advanced usage of models
- Summary
- Chapter 6: Getting a Model's Data with Querysets
- The persisting model's data on the database
- Getting data from the database
- Using the get parameter
- Saving the foreign key
- Updating records in the database
- Deleting a record
- Getting linked records
- Advanced usage of the queryset
- Summary
- Chapter 7: Working with Django Forms
- Adding a developer without using Django forms
- Adding a developer with Django forms
- The form based on a model
- Advanced usage of Django forms
- Summary
- Chapter 8: Raising Your Productivity with CBV
- The CreateView CBV
- Working with ListView
- The DetailView CBV
- The UpdateView CBV
- The DeleteView CBV
- Going further by extending the CBV
- Summary
- Chapter 9: Using Sessions
- Creating and getting session variables
- About session security
- Summary
- Chapter 10: The Authentication Module
- How to use the authentication module
- Adding a user
- Login and logout pages
- Restricting access to the connected members
- Summary
- Chapter 11: Using AJAX with Django
- Working with jQuery
- jQuery basics
- Working with AJAX in the task manager
- Summary
- Chapter 12: Production with Django
- Completing the development
- Selecting the physical server
- Selecting the server software
- Selecting the server database
- Deploying the Django website
- Installing Django, South, Gunicorn, and psycopg2
- Summary
- Cheatsheet
- The field types in models
- The form fields
- The template language
- Module 2
- Chapter 1: Getting Started with Django 1.8
- Working with a virtual environment
- Creating a project file structure
- Handling project dependencies with pip
- Making your code compatible with both Python 2.7 and Python 3
- Including external dependencies in your project
- Configuring settings for development, testing, staging, and production
- environments
- Defining relative paths in the settings
- Creating and including local settings
- Setting up STATIC_URL dynamically for Subversion users
- Setting up STATIC_URL dynamically for Git users
- Setting UTF-8 as the default encoding for MySQL configuration
- Setting the Subversion ignore property
- Creating the Git ignore file
- Deleting Python-compiled files
- Respecting the import order in Python files
- Creating app configuration
- Defining overwritable app settings
- Chapter 2: Database Structure
- Using model mixins
- Creating a model mixin with URL-related methods
- Creating a model mixin to handle creation and modification dates
- Creating a model mixin to take care of meta tags
- Creating a model mixin to handle generic relations
- Handling multilingual fields
- Using migrations
- Switching from South migrations to Django migrations
- Changing a foreign key to the many-to-many field
- Chapter 3: Forms and Views
- Passing HttpRequest to the form
- Utilizing the save method of the form
- Uploading images
- Creating a form layout with django-crispy-forms
- Downloading authorized files
- Filtering object lists
- Managing paginated lists
- Composing class-based views
- Generating PDF documents
- Implementing a multilingual search with Haystack
- Chapter 4: Templates and JavaScript
- Arranging the base.html template
- Including JavaScript settings
- Using HTML5 data attributes
- Opening object details in a modal dialog
- Implementing a continuous scroll
- Implementing the Like widget
- Uploading images by Ajax
- Chapter 5: Custom Template Filters and Tags
- Following conventions for your own template filters and tags
- Creating a template filter to show how many days have passed since a post was
- published
- Creating a template filter to extract the first media object
- Creating a template filter to humanize URLs
- Creating a template tag to include a template if it exists
- Creating a template tag to load a QuerySet in a template
- Creating a template tag to parse content as a template
- Creating a template tag to modify request query parameters
- Chapter 6: Model Administration
- Customizing columns on the change list page
- Creating admin actions
- Developing change list filters
- Customizing default admin settings
- Inserting a map into a change form
- Chapter 7: Django CMS
- Creating templates for Django CMS
- Structuring the page menu
- Converting an app to a CMS app
- Attaching your own navigation
- Writing your own CMS plugin
- Adding new fields to the CMS page
- Chapter 8: Hierarchical Structures
- Creating hierarchical categories
- Creating a category administration interface with django-mptt-admin
- Creating a category administration interface with django-mptt-tree-editor
- Rendering categories in a template
- Using a single selection field to choose a category in forms
- Using a checkbox list to choose multiple categories in forms
- Chapter 9: Data Import and Export
- Importing data from a local CSV file
- Importing data from a local Excel file
- Importing data from an external JSON file
- Importing data from an external XML file
- Creating filterable RSS feeds
- Using Tastypie to create API
- Using Django REST framework to create API
- Chapter 10: Bells and Whistles
- Using the Django shell
- Using database query expressions
- Monkey-patching the slugify() function for better internationalization support
- Toggling the Debug Toolbar
- Using ThreadLocalMiddleware
- Caching the method return value
- Using Memcached to cache Django views
- Using signals to notify administrators about new entries
- Checking for missing settings
- Chapter 11: Testing and Deployment
- Testing pages with Selenium
- Testing views with mock
- Testing API created using Django REST framework
- Releasing a reusable Django app
- Getting detailed error reporting via e-mail
- Deploying on Apache with mod_wsgi
- Setting up cron jobs for regular tasks
- Creating and using the Fabric deployment script
- Module 3
- Chapter 1: Django and Patterns
- How does Django work to?
- What is a Pattern?
- Patterns in this book
- Best practices
- Summary
- Chapter 2: Application Design
- How to gather requirements
- Are you a story teller?
- HTML mockups
- Designing the application
- Before starting the project
- SuperBook - your mission, should you choose to accept it
- Summary
- Chapter 3: Models
- M is bigger than V and C
- The model hunt
- Structural patterns
- Retrieval patterns
- Migrations
- Summary
- Chapter 4: Views and URLs
- A view from the top
- Class-based generic views
- View mixins
- Decorators
- View patterns
- Designing URLs
- Summary
- Chapter 5: Templates
- Understanding Django's template language features
- Organizing templates
- Using Bootstrap
- Template patterns
- Summary
- Chapter 6: Admin Interface
- Enhancing models for the admin
- Admin interface customizations
- Protecting the admin
- Summary
- Chapter 7: Forms
- How forms work
- Displaying forms
- Understanding CSRF
- Form processing with Class-based views
- Form patterns
- Summary
- Chapter 8: Dealing with Legacy Code
- Finding the Django version
- Where are the files? This is not PHP
- Starting with urls.py
- Jumping around the code
- Understanding the code base
- Incremental change or a full rewrite?
- Write tests before making any changes
- Legacy databases
- Summary
- Chapter 9: Testing and Debugging
- Why write tests?
- Test-driven development
- Writing a test case
- Mocking
- Pattern - test fixtures and factories
- Learning more about testing
- Debugging
- The print function
- Logging
- The Django Debug Toolbar
- The Python debugger pdb
- Other debuggers
- Debugging Django templates
- Summary
- Chapter 10: Security
- Cross-site scripting (XSS)
- A handy security checklist
- Summary
- Chapter 11: Production-ready
- Production environment
- Hosting
- Deployment tools
- Monitoring
- Performance
- Summary
- Appendix: Python 2 versus Python 3
- But I still use Python 2.7!
- Python 3
- Further information
- Bibliography
System requirements
File format: ePUB
Copy protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (not Kindle).
The file format ePub works well for novels and non-fiction books – i.e., „flowing” text without complex layout. On an e-reader or smartphone, line and page breaks automatically adjust to fit the small displays.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our ebook Help page.
File format: PDF
Copy-Protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (only limited: Kindle).
The file format PDF always displays a book page identically on any hardware. This makes PDF suitable for complex layouts such as those used in textbooks and reference books (images, tables, columns, footnotes). Unfortunately, on the small screens of e-readers or smartphones, PDFs are rather annoying, requiring too much scrolling.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our eBook Help page.