Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Hands-On Django 2
Rating: 4.4 out of 5(47 ratings)
6,151 students

Hands-On Django 2

Create Secure Modern Websites with Django 2, Python 3, and Anaconda
Created byAlan Simpson
Last updated 10/2019
English
English [Auto],

What you'll learn

  • Learn to use Django 2 with Anaconda, VS Code, and Python 3.7.
  • Build a Django 2 Starter kit that you can use to streamline all future Django development.

Course content

2 sections • 46 lectures • 4h 57m total length
  • Get Stituated7:35

    Set up Anaconda as a work environment for Python development on Windows and Mac.

  • Create your Virtual Environment6:25

    Create and activate a dedicated Python virtual environment for Django 2 using Conda or other tools, install Django packages, and verify Python version across platforms.

  • Create your DJango Project4:59

    Navigate to the target parent folder and run django-admin start project with the project name. Create a project folder containing manage.py and settings.py to start your Django site.

  • Create your All-Powerful Admin Account6:36

    Create and migrate a Django database, create a super user, run the development server, and access the admin interface at /admin to manage users.

  • Create your First Django App7:48

    Learn to create a Django app inside a project with Python manage.py startapp, then add it to installed_apps in settings.py, and run the server to view the admin page.

  • Create your Static Folders3:29

    Create a static folder inside the all pages app to host site-wide images and JavaScript, using nested all pages folders for clear Python namespaces.

  • Create your Site-Wide Style Sheet2:06

    Create a site-wide style sheet in the csx subfolder under all pages static, named style sheet.csx, to provide styling for most pages, with bootstrap as an optional alternative.

  • Choose your Google Fonts5:07

    Apply google fonts to a Django site by selecting Montserrat, Source Sans Pro, and Source Code Pro, importing them, and styling body, headings, and code for a cohesive look.

  • Define your Site-Wide Pictures and Colors5:09

    Define your site-wide visuals by saving a django pony logo and background into the images folder, and selecting a consistent color scheme with hex codes for the style sheet.

  • Create your Site-Wide HTML Layout1:42

    Create a site-wide html layout by implementing a base template in templates/all_pages to apply the stylesheet across pages. Build the header, footer, and nav bar into this shared template.

  • Design your Site-Wide Header, Navigation, and Footer1:39

    Create a base across pages with a header, nav, main, and footer using paired tags and placeholders, then preview in the browser and note Bootstrap comes next.

  • Add Bootstrap and Font Awesome to your Site2:13

    Add bootstrap and font awesome to your Django site using CDN links inserted in the base HTML head, making them available across all pages; you’ll learn Django template language next.

  • Master the Django Template Language4:54

    Master the Django template language to render server-side content with blocks, variables, and comments, extend common layouts, and link static stylesheets for consistent pages.

  • Create your Site's Home Page6:35

    Create the home page by adding index.html in all pages subfolder under templates, extending the base template, and filling the content block, then add about and privacy pages for testing.

  • Add a Logo and Social Media Icons4:21

    Add a header logo and Font Awesome social icons by loading static resources and using Django template syntax to reference logo.png, then wire a view and URL.

  • Create Your First View6:24

    Learn how Django routes an http request to a view in views.py, uses render to pass content to templates, and serves home, about, and privacy pages.

  • Directing Traffic7:37

    Learn how to configure Django urls.py to route traffic to home, about, and privacy views using function-based views. Import the proper views, ensure trailing slashes, and test locally.

  • Make it Look Good3:47
  • Design your Page Background7:10

    Design your page background teaches switching a home page from a yellow background to solid colors, gradients, or images using CSS techniques like background-size: cover and background-position: center.

  • Create your Site-Wide Navigation Bar5:49

    Build a site-wide navigation bar in Django using the template language to reference named URLs from urls.py, ensuring modular, robust links that adapt to changes.

  • Understanding HTTP Status Codes4:47

    Learn how http status codes signal server responses in web requests, including 200 ok and 404 not found; see get vs post, fave icon handling, and how authentication uses post.

  • Create a Favicon4:04

    Create a Django favicon by crafting a 16 by 16 pixel icon, saving it as favicon.ico in the static images folder, and linking it in base.html.

  • Pass Titles to Pages with DJango Template Language6:14

    Pass dynamic page titles in Django templates using Django template language, with an if title construct and a fallback to welcome, wiring titles from views to the HTML title tags.

  • Create your Git Files the Easy Way5:19

    learn how to back up a Django project with git, export environment files with conda to requirements.txt and environment.yml, and manage ignores and VS Code settings for reproducible development.

  • Upload your Site to Github7:43

    Learn to save and back up your Django project with git and GitHub by creating a repository, staging changes, committing, and pushing to a remote.

  • Retrieve your Code from Github3:20

    Clone or download the Django starter from GitHub, extract and rename the folder, then open it in your editor to start the project and set up environment; next, explore databases.

Requirements

  • Students should be at least somewhat familiar with HTML, CSS, Python, Databases, and writing code in general.

Description

Django is a wildly popular framework for building modern, secure websites and web applications with the Python programming language. In this course you'll learn to use Django as an absolute beginner, using Anaconda as your work environment, and VS Code as your code editor. The site you create includes a database. You'll learn to create pages to allow users to add, view, edit, and delete database data using just a few lines of code. You will end up with a generic Django application that you can use for all future Django development, where much of the work is already done for you.

Who this course is for:

  • Web developers who are looking for modern secure web development tools and frameworks.