GithubHelp home page GithubHelp logo

makaleks / drec_stud_site Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 3.0 9.21 MB

A web-site on Django (Python3), with VK auth., Yandex payment

Home Page: https://frtk.mipt.ru

Python 11.18% HTML 17.80% CSS 18.72% Shell 0.31% JavaScript 51.90% PHP 0.08%
django python3 website

drec_stud_site's People

Contributors

gaynullindima avatar makaleks avatar pda11111 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

drec_stud_site's Issues

Fix: conduct some research on SELinux settings

Today we don't cover in documentation how to setup SELinux, because we don't know that. But when hosting uses SELinux, we suffer from unloadable static files. SELinux proper setup is currently the only thing that is required to start up fully and independently when hosting reboots our server.

Feature: more i18n!

Our Russian-wide win at RedBull Basement University 2018 showed us, that it is possible to chill abroad. To support our chances of worldwide networking we may need to go further in project internationalizations and proxy all currently Russian strings through Django gettext practices.

Feature: group user registration GUI

Currently, users new courses are registered vie CLI, which is not good. The suggested solution is to refactor Service class to create subclass, providing tools for admins (is_staff).
In addition, the CLI registration toolchain from Excel should be refactored. The same code can be used by the GUI.

Feature: generate documents online

One of the possible services is to generate documents online, based on some template, defined by admin. Such document will autofill first_name&last_name, so the only thing required before submit is a sign.

Feature: protocols for locks

Currently, locks interact with site using simple GET calls. There is no validation, that the server is correct. The protocol of one-way authentication can be taken from X500 standard. In addition, the secure random generator can be implemented. Don`t forget to update the software of lock hosts!

Protocol example:

screenshot from 2018-07-21 10-28-22

Todo: password change

Currently, offline passwords (if Vk is disabled) can be set by ssh only. This must be changed to web-view, that is turned on from settings.py. The User Story:

  1. Situation: MIPT is offline.
    2.1. Site reliable admin (superuser) sets some variable (Password Variable, or PVar) to True.
    2.2. The True on PVar makes possible for all superusers to search other users (enables a special page, or SPage).
  2. Superuser comes at some place with his notebook.
    LOOP_START:
  3. Other users come, provide student document.
  4. Superuser searches the student in database, opens SPage, gives a piece of paper to a student.
  5. The student clicks 'generate password'.
  6. A strong password is generated, its hash is saved in database and only then shown to the student.
  7. The student writes down his new passport.
    GOTO LOOP_START

Feature: refactor frontent

During active development, it was possible to test frontend in browser without starting a web-server. As I remember, the system used AWK to paste some data, merge Django templates and remove Django tags. In addition, CSS is too large now, it should be replaced with more general language (for example, LESS, Sass) or rewritten using CSS '@import'.
Requirements:

  • synchronize CSS files from inline styles in HTML
  • frontend preview system
  • complete CSS refactoring
  • maybe a tool to manage class names in both CSS and HTML files
  • ...

Feature: web-camera online

The washing room has cameras and the requested feature is to make online-translation in the washing room. I have no idea how to work with that, but this is one of the most requested features from student council.

Feat: make unit tests for the base order query function

OrderItemAbstract.get_queryset() contains lots of checks and we need to ensure all of them are done properly. This requires to use predefined database at predefined time. Python package freezegun is suggested to manipulate time.

Feature: file cloud

Add cloud to make admins manage files on site and share them. This may be ready-made solution (recommended to find).
Sub-features:

  • file management from Django admin
  • share files by constant link (ability to replace file without other changes)
  • text editor
  • ...

Feature: setup fullstack language

Some logic can be duplicated at server- and client-side. The current examples are: validation (server-side is required for security & client-side disables idle requests) and bbcode rendering (client - WYSIWYG text editor, server - text rendering).

Unavailable forced login?

For now, social-auth sets up user only if the current one is not authenticated. If user was already authenticated (for example, via Django Admin), the User will now be changed. To login() a User, you need a Django "request" object. But socia-auth was made to be implementation-independent, so it does not have current Django "request" (couldn`t login() using via undocumented strategy.request). So, in Pipeline I lack "request" and outside pipeline I lack new User.
The idea is to force newly-authenticated User to login() from social-auth data, although he may be already authenticated. I can`t connect 2 arguments

Write a class for Orders list

For now, to create list of available time cells to order service, we have a lot of complicated logic inside Item methods. The suggestion is to create inside 'utils' module a class that will be able to work as list of intervals. It must be able to keep sorted lists of intervals like [[09:00, 17:00], [17:00, 01:00:00], [01:00:00, 09:00]]: add next interval without crossing and check possible interval in accurence.

If we do that, we will be able to set WorkingTime anyhow we want like "from 8 a.m. to 1 a.m." without worries and buggy logic.

For now, all WorkingTime should be between [0 a.m., 0 a.m.]

Feature: add some CI to pull latest version in repositories automatically

Now site runs on some servers and their updates require manual git pull. Some kind of continuous integration (ci) should solve this.

But this should fit current scenarios

  1. We might use non-master branch, for example now v1.0 is so slowly-developed that we use it instead of master.
  2. We might have a period of intensive 'testing on production', when:
    • something is broken so deeply, that such updates are rush and save-because-nothing-works-already
    • sometimes such 'deep breaks' occur on a single server

So I see now some kind of 'rush-branch' with a server setting 'use rush' vs 'use default branch' where 'default branch' is master or some other

Feature: set surveys for concrete course or group

Currently, every survey is shown for everybody. But there are moments, when survey should be shown for concrete course, group or person. These can be implemented via tags, that refer to some value, that can be calculated from User (as example, course from group; next survey for everybody who passed the previous one; ...). Surveys must have a setting 'show_tags'.

Feature: web-apps on PWA

Progressive Web Apps (PWA) is a standard for single-page applications (SPA), that can be run in user browser without Internet connection. These apps can save data locally and can be added on 'Home' screen in smartphones and some desktops, such as Gnome (Linux) The recommended tools are: Vue, Typescript.
Possible ideas for such offline web-apps:

  • document generator
  • editors (hex, image...)
  • text editors (sub-feature: detect encoding and suggest Shell command to convert this to UTF8)
  • calculator with blackjack : )
  • other services, that can be found online...

Feat: refund orders, occured the service item is closed

Currently, refunding in case of a suddenly closed service item (for washing room the item is a washing machine) is done manually. The suggestion is to do refunding automatically, so no one is forgotten and no refundings are delayed. The idea is to refund when the order time on a closed service item occurs. This prevents orders canceling after N+1 day on service item, that will be opened on day N.
Warning: beware concurrent deleting from database, this issue requires solving #38 first.

Feature: integrate documentation generator

Python code has several tools to generate documentation from source code. Some of them should be chosen and the project should be filled with comments, so the generated documentation:

  • contains the first page with summary like README.md (yes, this can be placed in a separate file)
  • this README-analogue should be splitted into feature grouped (modules)
  • the module pages can be splitted into feature entities

Feature: improve text editor

The currenty-used CKEditor was choosen, because it supports BBCode (we don`t use raw HTML/CSS in user texts), but it is too hard to customize it to use other (custom) BBCodes, or integrate file uploading in Django. In this case, it should be either: replaces, improved, rewritten from stretch.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.