Skip to content

A free, research-based vocab web app for beginners of Chinese with Django backend.

License

Notifications You must be signed in to change notification settings

VincentBai-dotcom/app

 
 

Repository files navigation

Solved Chinese

Solve Chinese characters like riddles.

File Structure

  • jiezi/ django main app
  • accounts/ app manages the User model and its basic information.
  • content/ app manages the data created by our content team, i.e. the Character, Radical, and CharacterSet models. The data can be updated and synchronized from content team's Google Drive by staff when needed.
  • learning app implements our learning algorithm, see the wiki page for detail
  • classroon app manages the Student, Class, and Teacher models and their interactions within a classroom setting.
  • static/ & templates/ for front end use

API generation

We are now using Django REST Framework's self-browsable API served at https://solvedchinese.org/api_root. You can also test it locally in your development server.

Installation

this is supposed to be done on a Ubuntu machine

  1. clone this repo
git clone [email protected]:solved-chinese/app.git
  1. Create a conda environment using the env.yaml file in project root and activate it:
conda env create -f env.yaml
conda activate jiezi
  1. Setup PostgresSQL: install PostgresSQL https://www.postgresql.org/download/linux/ubuntu/ setup the database to match jiezi.settings.DATABASES:
sudo -u postgres psql
postgre# \password postgres (use this to change the password of postgres to 'jiezi')
  1. Create your own secret files:

    1. Generate your own django secret_key, in python:
    from django.core.management.utils import get_random_secret_key  
    get_random_secret_key() # the returned value is your secret key
    1. Create jiezi_secret/secret.py using your secret key:
    """This file is suppose to keep secret variables """
    
    SECRET_KEY = 'YOUR_SECRET_KEY'
    
    # This should store jiezi_secret or local database, and it will update setting
    # DATABASES (you may override default database if necessary)
    DATABASES = {
    }
    1. get jiezi_secret/datafile_service_account.json from us, this is used to access our google drive data
  2. Make the required migrations

python manage.py migrate
  1. For the setup of Celery and Redis, reference wiki page Note that Celery doesn't work with Windows!

  2. Locally run the development server

python manage.py runserver

About

A free, research-based vocab web app for beginners of Chinese with Django backend.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 64.1%
  • HTML 19.5%
  • CSS 11.5%
  • JavaScript 4.9%