Comments (1)
OMGosh, I FINALLY FIXED IT!!!
So, turns out the tutorial on djangocentral shows it written as, TEMPLATE_DIRS instead of TEMPLATES_DIR,which is what it's actually supposed to be(!!) but once I fixed that it unfortunately still didn't work, BUT..., once I made these other simple changes to my settings.py file it finally worked!!
It's a really good thing the source code was available, I totally forgot that was accessible to me since I had started the tutorial completely from scratch - with NO Cheating LOL!! So, once I took a look it was very clear.
It may be worth mentioning here, that whatever files django creates during the startapp command, it includes all the text I had to replace below. For that reason I felt that you might still want to update djangocentral's website with the most current information, which is why I decided, as simple a fix as this ended up being (which was only possible because the source code was correct and available afterall!!) to continue and post the fix here, instead of just deleting it all...so maybe I can be of some help afterall! ;) WOOT WOOT!
So anyways - Here's the fix!!
Remove:
from pathlib import Path,
Replace it with:
import os
Remove:
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
Replace it with:
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
Remove (from DATABASES Section):
'NAME': BASE_DIR / 'db.sqlite3',
Replace it with:
"NAME": os.path.join(BASE_DIR, "db.sqlite3"),
and of course correct the two places that TEMPLATES_DIR shows up.
from django_blog.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django_blog.