mirror of
https://github.com/nsupdate-info/nsupdate.info.git
synced 2026-04-25 16:45:55 +03:00
[GH-ISSUE #433] Attempted relative import in non-package on local_settings setup #311
Labels
No labels
bug
bug
duplicate
easy
easy
enhancement
enhancement
invalid
needs help
pull-request
scalability
security
task
urgent
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nsupdate.info-nsupdate-info#311
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @webmst on GitHub (Jun 3, 2019).
Original GitHub issue: https://github.com/nsupdate-info/nsupdate.info/issues/433
Hi everybody,
after having 'git cloned' nsupdate.info in /usr/local/nsupdate (FreeBSD 12/python2.7), attempting setup of a local_settings.py file (as per instructions) with:
trying to execute the 'dev' environment for the first time, I get:
Does anybody see what's wrong?
@ThomasWaldmann commented on GitHub (Jun 3, 2019):
can you try:
when starting, guess you need to be in the same dir as local_settings.py.
@ThomasWaldmann commented on GitHub (Jun 3, 2019):
also, try to use python3.x if possible.
@webmst commented on GitHub (Jun 3, 2019):
ThomasWaldmann, thanks for the kind reply.
the solution you suggested didn't work, same error.
After many retries, I discovered that to solve, I had to use:
export DJANGO_SETTINGS_MODULE=nsupdate.settings.local_settingswithout setting PYTHONPATH
@ThomasWaldmann commented on GitHub (Jun 3, 2019):
Quoting from the docs:
That looks different than the import in your local_settings.py file:
@webmst commented on GitHub (Jun 3, 2019):
I agree with you, this is what made me not to undestand!
Infact, as per instructions, I had already created a local_settings.py file not to modify the original dev/prod .py files, but I was unable to make it processed setting the DJANGO_SETTINGS_MODULE variable.
I think that the issue is due to the 'home' python directory already set to '/usr/local/nsupdate/src' in my python FreeBSD system.