THIS VIDEO IS SPONSORED BY ————– The Tech Academy http://ow.ly/RAMO30fE7Oc HipsterCode (my website) https://www.hipstercode.com/ JOIN MY SLACK CHANNEL https://www.patreon.com…
Original source
Django 1.9 Tutorial – 3. How To Setup Your Database With Django 1.9
Tags
admin, auth, authentication, bootstrap, Data, database, DJango, django 1.9, mysql tutorial, Postgres, postgresql, sql
Share :
- tweet
-
About the : d4mer
sistema biblioteca php Mysql(CODIGO FUENTE GRATIS)
April 12th, 2019Apache, PHP & MySql on Docker
April 11th, 2019Python Flask and Vue Tutorial – Video 1
April 11th, 2019Importing MySQL Database
April 11th, 2019sistema escolar php y mysql Codigo Fuente Gratis
April 10th, 2019Connecting to MySQL database on Wampserver from any host (Computer)
April 10th, 201923 Comments
Leave A Comment
You must be logged in to post a comment.
Nick
I got up to 12:30 in the video when talked about doing a migration for the sites and auth. Is that still the case with python 3.6? I wouldnt take my python manage.py migrate sites
If anyone can clear that up for me it would be greatly appreciated. Thanks
chris mahn
Hi chris. im having a hard time getting Django-MySQL package in Pycharm to work. i am still very new to Python and Django and its getting overwhelming any tips.
Lucas C
i hate visual studio, same here waiting forever for the setup 🙂
Amirreza Zarepour
thank u for such this good videos
Ndirangu Muchiri
so helpful,thanks a bunch.
Don Pislik
Yo Chris, I must say you're one of the few dudes who have provided a well explained tutorial. But I'm kinda having issues with the admin even after following your tutorial to create a demo project. Check out my issues below:
TemplateDoesNotExist at /admin/login/
admin/login.html
Request Method: GET
Request URL: http://127.0.0.1:8000/admin/login/?next=/admin/
Django Version: 1.10.6
Exception Type: TemplateDoesNotExist
Exception Value:
admin/login.html
Exception Location: c:Usersbanjodocumentsvisual studio 2015Projectsdemodemoenvlibsite-packagesdjangotemplateloader.py in get_template, line 25
Python Executable: c:Usersbanjodocumentsvisual studio 2015ProjectsdemodemoenvScriptspython.exe
Python Version: 3.5.3
Python Path:
['c:\Users\banjo\documents\visual studio 2015\Projects\demo\demo',
'c:\Users\banjo\documents\visual studio '
'2015\Projects\demo\demo\env\Scripts\python35.zip',
'C:\Users\banjo\AppData\Local\Programs\Python\Python35-32\DLLs',
'C:\Users\banjo\AppData\Local\Programs\Python\Python35-32\lib',
'C:\Users\banjo\AppData\Local\Programs\Python\Python35-32',
'c:\Users\banjo\documents\visual studio 2015\Projects\demo\demo\env',
'c:\Users\banjo\documents\visual studio '
'2015\Projects\demo\demo\env\lib\site-packages']
Server time: Sun, 5 Mar 2017 10:28:30 -0500
Template-loader postmortem
Django tried loading these templates, in this order:
Using engine :
This engine did not provide a list of tried templates.
yamen xena
Hey Chris, I'm at 13:14 of the video, psycopg2-2.6.2 was successfully installed but with a message "you are using version 7.1.2 however version 9.01.0 is available consider upgrading via … blabla" . then I followed by typing python manage.py createsuperuser, then migrate sites- but __" at the end of the message it says from django.conf.urls import patterns , include , url import error: cannot import name 'patterns" "!! can you explain to me what's happening ? thanks
Dean Vollebregt
Hey I'm following along from home without Visual Studio. I downloaded Django 1.9 in a virtual environment and the code looks heaps different to the code generated by Visual Studio. I can get the site running but cant get to the admin page, I read online that virtualenv needs to be enabled in Django. Does anyone know how to do this?
Lee Chess
I have a question I'm not entirely sure, but what if you run python manage.py migrate first instead of running python manage.py migrate auth and then with sites. I wonder if it would've been the same result. I'm new to django and python so, sorry if i asked something stupid or typed something wrong since english is not my first language.
hteig
What's this movies2 folder? did i miss u create it?
Shivashriganesh Mahato
So you have to put the password there in plain text? And it has to be there the entire time?
Priom Chowdhury
Just decided not to use python3 anymore..!!.waste of countless hours fixing stupid bugs!!!
BTW great tut and this is exactly I was looking for, any chance u going to show how to use mongo in Django. Thanks. Keep it up!
Yermek Sakiyev
Hi, I followed the tutorial and getting error when trying to run the server from visual studio. It points me to execute_from_command_line(sys.argv) line in manage.py. Any ideas?
Dhawal Panchal
+Chrise Hawkes
i'm not able to create superuser.
m getting a django.db.utils.OperationalError: fe_sendauth: no password supplied
Can anyone help me out?
Thanks
Joe Diragi
on linux at around 9:30 you need to install python3-dev to fix the psycopg2 errors. on ubuntu that's 'sudo apt install python3-dev' or 'python-dev' if for some reason you're still on python 2
meet patibandha
its really helpful Chris. But I stuck here I have python 27 virtualenv, I install exactly as u have shown in the video but still I get the error "No module named psycopg2" help me if you can……
Chris Kavanagh
Chris, I wanted to thank you for another great django tutorial. I really needed this one, as I've been wanting to try out Postgres for a while. . .
I noticed in the (django) docs there were some differences between Postgres and other databases as far as code. I can't remember exactly what the differences were, but have you noticed any differences in writing Models or doing queries with Postgres?
Chris Kavanagh
Im using Python 2.7 and Django 1.9.4, and I got that error at 12:56 or so, also Chris. I thought it was related too a 3rd party app I'm using (django-authtools) which replaces the AUTH-USER-MODEL, so I did a Migration and that corrected it.
I had no idea it was a new(er) django problem. I used 1.9.3 last Project and didn't have that problem, so it's weird. Anyways, thanks again!
Chris Kavanagh
Are you working with 1.9 Chris? The reason I ask is I noticed my settings don't have what your have as far as the Database part. It just has a place for Engine and Name, and a link to the docs for database settings.
In the docs it says that what you're using (django.db.backends.postgresql_psycopg2) is old and deprecated. The new way is ('django.db.backends.postgresql').
It also says "Changed in 1.9 The django.db.backends.postgresql backend is named
django.db.backends.postgresql_psycopg2 in older releases. For backwards
compatibility, the old name still works in newer versions."
So, I'm a little confused about what you're using, and what I should be using in settings for Postgres. I'm assuming you don't need psycopg2 anymore (for >1.9)
Naveen Kumar
I'm gettng an error fatal database "<c:UsersProjectsmovies2movie>does not exist
when i ran command createsuperuser or migrate sites or migrate could you please help me out
Karan Thakkar
I m using django and postgres as database
can i configure in a way so that my project works with already built database ??
Like integrating already built tables in django ??
If yes How??
MrBelzeboss666
good job man!, anyway you can type for example psyco and click tab and it will autofill 🙂
Chris CK
Maybe use python-bundled-sqlite for tutorial purposes?