PyJaipur / PyJudge

Simple Programming Contest hosting software
MIT License
17 stars 29 forks source link

Use template inheritance to reuse code between ranking and question html #62

Closed theSage21 closed 5 years ago

theSage21 commented 5 years ago

The question and ranking HTML both define some common things (like HTML, HEAD, BODY). We can move the common things into a base.html file and use that in both question.html and rankings.html. See bottle template functions to understand how to do this.

Final folder structure can look like:

.
├── css
│   └── styles.css
├── files
│   └── questions
│       ├── 1
│       │   ├── inputs.txt
│       │   ├── output.txt
│       │   └── statement.txt
│       └── 2
│           ├── inputs.txt
│           ├── output.txt
│           └── statement.txt
├── README.md
├── server.py
└── templates
    ├── base.html
    ├── question.html
    └── ranking.html
arnabsinha99 commented 5 years ago

What is `base.html' used for ?

theSage21 commented 5 years ago

Generally it is used to do common things like set the font for the whole site. If you use things like bootstrap and jquery then those links are put in the base.

Common navigation bars and footers are put in the base.

On Mon 28 Jan, 2019, 20:36 Arnab Sinha <notifications@github.com wrote:

What is `base.html' used for ?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/PyJaipur/PyJudge/issues/62#issuecomment-458167027, or mute the thread https://github.com/notifications/unsubscribe-auth/AHVj0ZFPi9wsYVodyqgZzybtv_libpClks5vHxH6gaJpZM4aUFM5 .

arnabsinha99 commented 5 years ago

Has it been worked on? I don't seem to find it. @theSage21

theSage21 commented 5 years ago

Oh no no. You will have to create it

On Mon 28 Jan, 2019, 20:54 Arnab Sinha <notifications@github.com wrote:

Has it been worked on? I don't seem to find it. @theSage21 https://github.com/theSage21

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/PyJaipur/PyJudge/issues/62#issuecomment-458174128, or mute the thread https://github.com/notifications/unsubscribe-auth/AHVj0S9Zf-mpaGZloYRonDuEb68unYvfks5vHxYwgaJpZM4aUFM5 .

HeroicHitesh commented 5 years ago

I am taking this issue