wger
wger copied to clipboard
Documentation could use updating
Seems like there are some deadlinks and things that could be cleaned up in the documentation provided. All good though.
Specifically this part - https://github.com/wger-project/wger/blob/master/docs/development.rst#install-site
Couldn't get the server running locally since I can't find the 'wger/settings.py' file. The settings.tpl file exists but when I run the command with that as a parameter I get
result = call.task(*args, **call.kwargs)
File "/Users/bytenel/Documents/workplace/wger/venv-wger/lib/python3.4/site-packages/invoke/tasks.py", line 111, in __call__
result = self.body(*args, **kwargs)
File "/Users/bytenel/Documents/workplace/wger/tasks.py", line 171, in create_settings
media_folder_path=media_folder_path)
KeyError: "\n 'default'"
What documentation can't be improved... :p
BTW, the dead links are probably because you opened the rst-files directly, they are supposed to be compiled first with sphinx or you can browse them online here https://wger.readthedocs.io
But with respect to the settings.py, could you generate it like on the first step (invoke create_settings...
)? In the end, it doesn't matter where you put that file, it just needs to be importable by python, but it's best to just put it in the same folder as your manage.py
. You would just change the absolute path to where you have your checkout and then pass it also to the bootstrap command (you don't reference the tpl file directly, the create_settings should find it by itself and fill in some stuff).
FYI: (you'll probably need to do this in the future) If you have a half broken installation and want/need to start fresh, you would need to delete the settings.py
, the database and it's best to also delete node_modules and wger/core/static/bower_components
Is there a build command that can just 'start fresh'? If not it'd be nice to add that to a script somewhere.
I got the same error when running the invoke create_settings command though...
Using python version 3.4.5
also - I don't have wger/core/static/bower_components
, is there another step where I install bower components that I didn't see? I also didn't see a bower config file either.
EDIT: ah, i see there's a separate manage command for that. no worries.
der! might have been just fiddling with that template file broke my local copy. was able to get it created that time.
Traceback (most recent call last):
File "/Users/bytenel/Documents/workplace/wger/venv-wger/bin/invoke", line 11, in <module>
load_entry_point('invoke==0.13.0', 'console_scripts', 'invoke')()
File "/Users/bytenel/Documents/workplace/wger/venv-wger/lib/python3.4/site-packages/invoke/program.py", line 270, in run
self.execute()
File "/Users/bytenel/Documents/workplace/wger/venv-wger/lib/python3.4/site-packages/invoke/program.py", line 381, in execute
executor.execute(*self.tasks)
File "/Users/bytenel/Documents/workplace/wger/venv-wger/lib/python3.4/site-packages/invoke/executor.py", line 113, in execute
result = call.task(*args, **call.kwargs)
File "/Users/bytenel/Documents/workplace/wger/venv-wger/lib/python3.4/site-packages/invoke/tasks.py", line 111, in __call__
result = self.body(*args, **kwargs)
File "/Users/bytenel/Documents/workplace/wger/tasks.py", line 110, in bootstrap_wger
start_wger(address=address, port=port, browser=browser, settings_path=settings_path)
File "/Users/bytenel/Documents/workplace/wger/venv-wger/lib/python3.4/site-packages/invoke/tasks.py", line 107, in __call__
if not isinstance(args[0], Context):
IndexError: tuple index out of range
New error when starting the bootstrap_wger process occurs without the last command line option.
After that though, I was able to get everything up and running locally! Yay.
I'll continue poking around.
So you got it working? :raised_hands:
And adding some kind of cleanup command could be indeed a good idea
Ah, and there isn't a bower file, but we do use bower for the dependencies. It's just that we use a django app that wraps itself around it (look at the BOWER_* options in wger/settings_global.py if you have interest).
This was added before any of the new gulp stuff was added, it might be a good idea to consolidate these steps
Or just consolidate the whole front end build system into webpack...
I did end up getting it working though, I'll continue fiddling with it more throughout the week and post thoughts.
Yes, or switch :)