PyJaipur / PyJudge

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

fix #114 Error 404 Handled #116

Closed Surya1231 closed 5 years ago

Surya1231 commented 5 years ago

Thank You for your contribution to the PyJudge

I have handled 404 request with a template.

Surya1231 commented 5 years ago

All the requested changes are fulfilled now

Surya1231 commented 5 years ago

I am unable to retrive anything from object,i have tried to print it in the console also to check the parameters to retrieve but found nothing just got (404,"not found") as output.

theSage21 commented 5 years ago

That's ok. Besides printing, I find the dir function to be very informative when debugging. That should give you a good look at what all is there inside the error object. Explore those things that get exposed after seeing print(dir(error))

Surya1231 commented 5 years ago

Done all the changes as required now please merge it

rishabhKalakoti commented 5 years ago

@Surya1231 , I think you have complicated things a lot here.

  1. Create a basic error template (with maybe type and arguments)
    • use only basic bootstrap, no styling required
  2. Add a handler for 404 which supplies the type FileNotFound

you don't really need so much CSS as we don't need a different CSS for just a specific template, that's why we used bootstrap to clean up individual CSS

Surya1231 commented 5 years ago

sorry i was not aware about it i will remove the css and make a basic template using css

Surya1231 commented 5 years ago

Now I have created a Basic Template for handling Requets

Surya1231 commented 5 years ago

I have done all the changes as suggested now please merge it

Surya1231 commented 5 years ago

We have returned a html template to the function. So don't think so return abort is needed now.