Comments (8)
So are we good? Should I close this ticket?
from django-twoscoops-project.
The first project_name
shouldn't have an __init__.py
and be on your PYTHON_PATH
. That way icecream.urls
and icecream.settings.local
are both valid.
from django-twoscoops-project.
Hi, sorry if I am a bit confused.
According to the base.py
config file. DJANGO_ROOT
points to the Configuration Root
(name according to the book).
DJANGO_ROOT = dirname(dirname(abspath(__file__)))
__file__
is base.py
and after 2 dirname
calls it moves to the folder that contains urls.py
and settings
folder and not the one that contains static and template forlders.
I think there is a confusion between what the book calls DJANGO ROOT PROJECT
and DJANGO_ROOT
.
Am i wrong?
from django-twoscoops-project.
We'll be clarifying this in a future update or possibly the next full edition.
from django-twoscoops-project.
Just purchased the 1.6 book and looking at the template here, the structure still seems off (or I could be off given my experience is with .NET and Rails).
Anyhow, in base.py I see this:
DJANGO_ROOT = dirname(dirname(abspath(file)))
SITE_ROOT = dirname(DJANGO_ROOT)
Given the definitions provided in the book, these constant should be switched around, no?
Also, I'd recommend changing the name of the lowest "project_name" to something more meaningful like "config." Not only would that simplify what folks are are referring too with they talk about the "project_name" directory, but I think it accurately tells us what is in that folder.
Lastly, the 1.6 book recommends using "unipath" which is not being used here ... the question being, is that still the recommendation or do we go with what is on github?
Thanks - wg
from django-twoscoops-project.
So, after reading the book (1.6 edition), I also came around this issue.
Creating a project called "two" this is what I get for DJANGO_ROOT:
/home/arruda/projects/two/two/two
and SITE_ROOT:
/home/arruda/projects/two/two/
As you see, I think the problem is in DJANGO_ROOT, that's because the following line is wrong:
DJANGO_ROOT = dirname(dirname(abspath(__file__)))
This would work ok if using a settings.py since would get the django root ( and not the project's app).
Then to fix I believe this should work:
DJANGO_ROOT = dirname(dirname(dirname(abspath(__file__))))
from django-twoscoops-project.
Oh, I see now, @manubellido is right, the problem is the name used... it's very confusing...
from django-twoscoops-project.
Lastly, the 1.6 book recommends using "unipath" which is not being used here ... the question being, is that still the recommendation or do we go with what is on github?
I'm wondering the same thing as @wgpubs, has this been answered elsewhere?
Never mind, see #98 (comment).
from django-twoscoops-project.
Related Issues (20)
- Urls.py question HOT 3
- Correct way to develop a new Project template HOT 1
- select_related() example in Ch. 12.3.3
- Form instance attributes in Ch. 10
- flake8 warnings in settings
- could not import setting
- Section 11.3 CSRF Django doc broken link
- explain where to find https://github.com/twoscoops/two-scoops-of-django-1.8 HOT 2
- provide an epub version HOT 7
- Pull request #25 was merged to the wrong branch? HOT 2
- Problems with the Windows section HOT 8
- discover runner part of 1.6 now? HOT 6
- mkvirtualenv directions slightly wrong ? HOT 1
- STATIC_ROOT set to wrong variable HOT 1
- Makefile and make.bat not setting correct {{ project_name }}
- SASS support
- Why are the settings in test.txt a repeat of those in local.txt HOT 1
- Setting DEBUG from the environment HOT 2
- Requirements Confusion HOT 1
- Readme instructions tell users to use master branch though it is several commits behind develop HOT 1
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-twoscoops-project.