Skip to content

darinkishore/searing_ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Searing.ai

Learn shit. Real fast.

Installation

Setup a virtualenv and install requirements (this example uses virtualenvwrapper):

mkvirtualenv searing_ai -p python3.9
pip install -r requirements.txt

Set up database

Create a database named searing_ai.

createdb searing_ai

Create database migrations:

./manage.py makemigrations

Create database tables:

./manage.py migrate

Running server

./manage.py runserver

Building front-end

To build JavaScript and CSS files, first install npm packages:

npm install

Then build (and watch for changes locally):

npm run dev-watch

Running Celery

Celery can be used to run background tasks.

You can run it using:

celery -A searing_ai worker -l INFO

Or with celery beat (for scheduled tasks):

celery -A searing_ai worker -l INFO -B

Updating translations

** Docker **

make translations

Native:

./manage.py makemessages --all --ignore node_modules --ignore venv
./manage.py makemessages -d djangojs --all --ignore node_modules --ignore venv
./manage.py compilemessages

Google Authentication Setup

To setup Google Authentication, follow the instructions here.

Running Tests

To run tests:

./manage.py test

Or to test a specific app/module:

./manage.py test apps.utils.tests.test_slugs

On Linux-based systems you can watch for changes using the following:

find . -name '*.py' | entr python ./manage.py test apps.utils.tests.test_slugs