pythonindia / pssi.org.in

Official PSSI website
https://pssi.org.in
9 stars 12 forks source link

Fixed #51 := 404: Page not found #53

Closed vaibhavmule closed 9 years ago

vaibhavmule commented 9 years ago

Added 404.html template and fixed the #51

theskumar commented 9 years ago

@vaibhavmule This can be as simple as just dropping a 404.html in templates directory. Any particular reason you want to added custom view functions.

More code, more liability.

vaibhavmule commented 9 years ago

@theskumar The another Efficient way would be editing nginx.conf which I don't have access too. Then It would be internal issue cannot done by contributer like me. I can only add 404.html that is I have added if you needed, I will remove the views and send a pull requests.

Reason : I'm beginner and found that this is way to do it via Django Documentation other than editing nginx.conf

theskumar commented 9 years ago

@vaibhavmule glad to know you are beginner and contributing :blush:

Let's get ride of all the python views, those are not required unless you plan to add your context variables in 404.html or put some custom logic while a 404 is encountered.

Here is the default view function that get called if you don't provide your custom 404 handle view. https://github.com/django/django/blob/master/django/views/defaults.py#L11-L29

Cheers,

sayanchowdhury commented 9 years ago

@theskumar +1

@vaibhavmule you can do the required changes and send out a PR.

vaibhavmule commented 9 years ago

@theskumar Learned a lesson, Thanks. :)

theskumar commented 9 years ago

:+1:

sayanchowdhury commented 9 years ago

Merged in #60