KirillYabl / db_hack_django_orm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

E-diary hacking scripts.

File scripts.py contains several functions which can fix the electronic diary.

Electron diary is a site based on Django, which contains marks of schoolkids.

How to use

Python3 should be already installed.

  1. You need to place the script in the directory of the site file next to the manage.py file.
  2. You need to run Django shell, more.
  3. You need to import scripts.py.
import scripts
  1. After these steps, you can work with the electronic diary.

Examples

This example shows:

  • Find a schoolkid
  • Fix all bad schoolkid grades
  • Delete all schoolkid chastisements
  • Create commendation for the schoolkid
import scripts

schoolkid = scripts.find_schoolkid(schoolkid_name='John Doe')
scripts.fix_marks(schoolkid=schoolkid)
scripts.remove_chastisements(schoolkid=schoolkid)
scripts.create_commendation(schoolkid_name='John Doe', subject_name='Math')

Project Goals

The code is written for educational purposes on online-course for web-developers dvmn.org.

About

License:MIT License


Languages

Language:Python 100.0%