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.
Python3 should be already installed.
- You need to place the script in the directory of the site file next to the
manage.py
file. - You need to run Django shell, more.
- You need to import
scripts.py
.
import scripts
- After these steps, you can work with the electronic diary.
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')
The code is written for educational purposes on online-course for web-developers dvmn.org.