KaniWani
Since we're using Django, a fair bit of setup is required to get a development environment up and running. Here are all the tools you need.
- Python 3. You can get it from activestate
- If you want to use the distributed messaging queue for tasks, Install a redis server This is only necessary if you want to use the periodic features(for example having the SRS run every 15 minutes).
- Install Pycharm (or use whatever editor you like).
- Clone the repository wherever you like.
- Move the secrets.py file into the same directory as the settings.py file.
- Fire up pycharm and open the parent KW directory.
- After a bit, there should be a prompt to install a list of requirements, hit yes and let the installation go. It'll give you a popup when it is done. 7b. If this doesn't happen, and you know your way around the terminal, try pip install -r requirements.txt
- Delete the db.sqlite3 file
- hit Ctrl + alt + r . This will open up a manage.py command window.
- execute the command makemigrations
- It may prompt you to create a superuser, do so.
- Ctrl + alt + r again.
- This time execute migrate. The database is now built, but not yet populated.
- Ctrl + alt + r again.
- Exeute the command shell. This brings you to application shell.
- Execute this:
from kw_webapp.tasks import repopulate
repopulate()
Chances are your system will spit a bunch of errors at you. Ignore them and wait. Eventually they will stop.
- Ctrl + alt + r one last time. Type in the command runserver --noreload
If all went well, it will start a server at 127.0.0.1:8000
Here are all the tools you'll need.
- Node.js [Get it here] (https://nodejs.org).
- NPM (installed with Node, huzzah) (does this step even count?).
- Open a terminal, navigate to the frontend folder, and run
npm install
. - Make some tea while you wait.
- When dependencies are installed, run
gulp
to see styleguide & watch changes.
This will start a server at localhost:3000 & open your browser to the styleguide.
However, to compile & copy assets to be accessed within the webapp ensure you run gulp --prod
More detailed information in /_front-end/README.MD