Matrics Reloaded! FOSS that allows new students and the school's Administration to manage their enrollment process via web and mobile.
I understand why Laravel is such a popular framework, but Django > Laravel. Must be because Python doesn't suck balls.
Please see the matrics-app repo for the mobile version.
- Social login (Google and Outlook)
- Automatic tuition price per the Catalan Generalitat's legal guidelines
- Automatic requirements listings for each user, per the Catalan Generalitat's legal guidelines
- File uploads for the necessary requirements
- Visual, live feedback in the user's dashboard about the validation state of said requirements
- Custom admin dashboard, based off Django's default
- RESTful API
- Python 3
- Pip
Clone and cd
into the repo. Then set up the virtual environment.
You will need to set up a Python virtual environment. I like setting up a .virtualenvs
folder and sourcing from there:
python3 -m venv ~/.virtualenvs/matrics
source ~/.virtualenvs/matrics/bin/activate
pip install -r requirements.txt
If you are interested on differences between venv
and virtualenv
, see here.
This one is a Django's default, but it will come in handy:
./manage.py createsuperuser
There are multiple commands available for populating the database. Please refer to core/management/commands
.
Some of relevance are shown. Remember that they are executed with ./manage.py
:
create_users
import_enrolments <path/to/csv>
populate_DB
./manage.py runserver
Standard Login
endpoint: api/token : POST pass: Email (email) and Password (password) as form-data recieve: { Token: Token key, StatusEnrolment: Gets the status of the enrolment, BoolWizard: true || false (if the user has already completed the wizard checks as true, if not, false), UserId: The id of the user, to be used later for the autologin }
AutoLogin
endpoint: api/verify : GET pass: UserId (UID) and Token (Authorization) as headers recieve: true || false (depends if the token still exists and belongs to the same user)
Update Wizard
endpoint: api/updatewizard : POST pass: Token (Authorization) as header recieve: nothing
Get Wizard
endpoint: api/getwizard : GET pass: Token (Authorization) as header recieve: { image_rights: true || false excursions: true || false extracurricular: true || false }
Get Requirement Status
endpoint: api/getreqstatus : GET pass: Token (Authorization) as header recieve: { Id of requirements: state of those requirements, }
User Info
endpoint: api/user : GET pass: Token (Authorization) as header recieve: { Username: info, First name: info, Lastname: info, DNI: info, Birthplace: info, Birthday: info, Address: info, City: info, Postal Code: info, Phone number: info, Emergency number: info }
Profile and requirements
endpoint: api/profileandrequirements : GET pass: Token (Authorization) as header recieve: { Name: Name of the profile requirements, Description: A brief description of the profile of requirement, Type: Type of profile, Requirements: { Id of the requirements: Name of the requirement, } }
Profiles and requirements
endpoint: api/profilesandrequirements : GET pass: Token (Authorization) as header recieve: { Id of the profile of requirements: { Name: Name of the profile requirements, Description: A brief description of the profile of requirement, Type: Type of profile, Requirements: [ Name of the requirement, ] }, }
Upload Requirements
endpoint: api/uploadreq : POST pass: Token (Authorization) as header recieve: { name: Name of the career code: Code of the career desc: Description of the career hours: How long is the career start: When it starts end: When it ends modules: { ID of MP: { id: ID of the MP, name: Name of the MP, code: Code of the MP, desc: Description of the MP, ufs: { ID of UF { id: ID of the UF, name: Name of the UF, code: Code of the UF, desc: Description of the UF }, } }, } }
Upload Requirements
endpoint: api/uploadreq : POST pass: Token (Authorization) as header and JSON { Id of the requirement: Document at base 64 } recieve: Nothing