Django Tutorial for Beginners - 13 - Connecting to the Database

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

for those who are using Django 2.0 use and getting error when clicking the links to album write this in music/urls.py:
path('<int:album_id>/', views.your_func_name, name = 'whatever_you_like' )

the forward slash was missing on the path for me and I guess for most of you guys

rifatmasud
Автор

I love these little stories that lead up to a valid point lol

rawrbearmedia
Автор

I basically learnt everything i know from you Bucky. Every Tech guy in my university here in Africa has benefited from your work. God bless you man!
You should consider coming to Africa(Nigeria :) } for a tour or something. It'll be fun!!

marookegberosamuel
Автор

I'm almost halfway through. Can say that this is one of the best sources to learn Django.

shobhitnarayanan
Автор

"ew i quit" im laughing my ass off, thanks Bucky

davidyo
Автор

Best tutorial series humanity has ever made...fun and simple

Liev
Автор

as a Chinese, i turn on subtitle, and learn it from 1 to 13, thanks to bucky, it's easy to understand.

stanleychou
Автор

Does this mean your front-end developer is dead since she lives under your house?

VickyM
Автор

In Album.objects.all() objects is highlighted and I am getting "Unresolved attribute reference 'objects' for class 'Album'".
Help me please.

SumitKumar-
Автор

This course gives me, almost everything I wanted to know to start my website with bunch of webapps. Thanks man!

JonesNanaz
Автор

For others that are getting an error try this

from django.http import HttpResponse
from .models import Album


def index(request):
all_album = Album.objects.all()
html = ""
for album in all_album:
url = '/music/' + str(album.id)
html += '<a href=' + url + '>' + album.album_title + '</a></br>'
return HttpResponse(html)

def detail(request, album_id):
return HttpResponse("<h1>Details for Alqwebum id: " + str(album_id) + "</h1>")

Chryzsean
Автор

you're so incredibly at explaining things that seem so hard. Thanks a lot.

progman
Автор

I have an error message when I make the object of the Album.objects.all() - 'Album' has no 'objects' member' what should I do????

vinilkanojiya
Автор

maybe its too late for 1 years... but i had a problem.


its not showing my album's id/pk

mamanangka
Автор

can only concatenate str (not "DeferredAttribute") to str shows to me, what is the problem?? please help

hristijangorgioski
Автор

Man !!
Bucky you're a champ, thanks a lot !

izaccy
Автор

Help! The music works fine but when ever i clicked the link it shows page not found. I’m using django version 2 and alter the urls.py

joshuareyes
Автор

I'm glad you listened to your female friend! I couldn't imagine writing a full site with CSS design using Python strings.

Anonymous-vhkp
Автор

'Album' has no 'objects' member, this is the error I'm getting, what should I do?

parikshitgupta
Автор

i am getting error at Album.obects.all().. can anyone help me fix this issue?

prakaranverma