Python Django Crash Course

Traversy Media · 749K views · 2017 · 1:08:11

Open on YouTube

Web developmentPython, Ruby & scripting languagestutorialdated

Why Stack Overflow recommends it

Stack Overflow users who are new to Django follow it as a step-by-step tutorial, then ask questions when their setup (MySQL, phpMyAdmin, XAMPP, models and views) diverges from the video.

Recommended by 2 people across 2 different months, 2018 to 2019.

What it is

A one-hour crash course from Traversy Media that builds a Django app from scratch using MySQL. It covers the framework's advantages, the MTV pattern, virtual environments, the core Django files, and a simple posts site.

What people said

Recommends Techmo · 2018-07 · Stack Overflow · on “How to install a mysql server and phpmyadmin on localhost mac”

I'm trying to follow this [this video] tutorial on how to get started with Python Django but I'm 25 minutes in and all of a sudden the guy pulls up localhost/phpmyadmin and I have no idea how I get that or anything about it on my Mac and I'm just completely lost someone please help thanks.

Recommends Storm Llamas · 2019-06 · Stack Overflow · on “Local host page not found”

Okay so I am a new learner and am following a tutorial [this video] My problem is that the last part of that video shows a posting site's posts when you click the linking to the post: Page not found (404) Request Method: GET Request URL: [LINK] Using the URLconf defined in djangoproject1.urls, Django tried these URL patterns, in this order: [name='index'] details/<int:id>/ [name='details'] admin/ posts/ [name='index'] posts/ details/<int:id>/ [name='details'] The current path, posts/details/1>/, didn't match any of these. Here's the .py and .html files that I was editing that may be the best place to search for errors posts/urls.py from django.urls import path from . import views urlpatterns = [

Cites S.Park · 2018-11 · Stack Overflow · on “Django + XAMPP on Mac (2002, "Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)")”

I am following this [this video] tutorial to build a Django app with MySQL. I am using XAMPP-VM for Mac. I set up my Database settings for Django as so: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'djangoproject', 'USER': 'root', 'PASSWORD': '', 'HOST': 'localhost', 'PORT': '8080', } } And I have started MySQL on XAMPP but when I run python manage.py migrate I get: django.db.utils.OperationalError: (2002, "Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)") Thank you for your help!

Cites Alex Merced · 2019-08 · Stack Overflow · on “Publishing Data on Screen”

I'm learning Django and did the exercise in this video and I get up about the 45 minute point and everything works fine: [this video] after that I can't ge the two blog posts to show up as it does in the video. I had named the new model "posts" unlike in the video which called the model "Posts" so I adjusted my code so instead of creating a variable "posts" I made it blogpost in view.py. Below I show the code for the model, view and index. THe problem is I can see the layout but it doesn't populate the blog posts in the jinja code. If I add static text, the static text shows fine. Model.py /*from django.db import models from datetime import datetime # Create your models here. class posts(models.M