Giter VIP home page Giter VIP logo

print-server's Introduction

Print-Server

For complete deployment guide, please refer to deploy-notes.md

Create Virtual Environment

virtualenv venv

Install Dependencies

source venv/bin/activate
pip install -r requirements.txt

Install Dependencies (Manual)

pip install Django==4.0.5 fpdf==1.7.2

Generate requirements.txt

pip freeze > requirements.txt

Project Map

Application Models views
users MyUser, TeamUser, PrinterUser, Lab 'home', 'status'
prints Prints, PrintConfiguration 'pdf', 'submit'
solo Singleton

Model Description

Model Fields Description
MyUser is_team,is_printer, ... This models is almost same as django.contrib.auth.models.User , This model is used for user authentication
TeamUser user, lab, location
PrinterUser user,
Lab name
Prints print_id, owner, source_code, submission_time, printing_time, status, total_page Every print request from team user is modeled by this model
PrintConfiguration paper_type, orientation, line_height, unit, font_size This model is used by fpdf library while generating pdf from code

View Description

View Possible Redirection Description
home 'login', 'status', 'admin-panel' !authenticated -> logout , is_team -> status , other -> admin-panel
status 'submit' , 'logout' Team can see status of their print requests
submit 'logout', 'home' Team can submit code as print request
pdf Team_user -> null , other user -> pdf
admin ... handled by django admin implementation
admin-prints model ... Auto refresging enabled if page is scrolled to the top. Scroll down a little bit to stop auto refresh.
Control+Click on view pdf link to open pdf in new tab.

Production checklist

  • Check if DEBUG=False in settings.py
  • Run staticserver ( preferrably in another pc )
  • add static url in settings.py
  • makemigration and migrate
  • add user info
  • runserver
  • check from team pc & printer pc

print-server's People

Contributors

mahdihasnat avatar rebornplusplus avatar tamimehsan avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

rebornplusplus

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.