0

So I downloaded this project (https://github.com/alectrocute/flasksaas) on my machine. Interesting is, that on my other computer everything works great, but not on this one. I am stuck at the point, where I want to initialize the database with following command:

$python manage.py initdb

I reinstalled python, the modules etc., but it doesn't help. I checked my system environment variables in the settings (OS: Windows), everything seems fine.

Error which occurs:

Traceback (most recent call last):
  File "manage.py", line 4, in <module>
__init__.py, line 6, in <module>
    app.config.from_object('app.config')
NameError: name 'config_dev' is not defined

Expected result: "SQL database has been created."

3
  • There's a symbolic link between config.py and config_dev.py. Did you run make install && make dev ? – Julian Camilleri Apr 5 '19 at 12:31
  • make install && make dev does not work, because this command is for MacOS. – spacew4lker Apr 5 '19 at 12:54
  • You need to use an equivalent. – Julian Camilleri Apr 5 '19 at 12:56
0

After looking at the repo's Makefile, you'll find what each make target means:

  • install : run $ pip install -r requirements.txt
  • dev : copy (or link) the config_dev.py to config.py
  • prod : copy (or link) the config_prod.py to config.py
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.