PR-22 Полноценная 404 страница

404 изменена
remotes/origin/HEAD^2
booblegum 9 years ago
parent 2f29393664
commit bfe97e26e4
  1. 3
      archilance/urls.py
  2. 4
      archilance/views.py
  3. BIN
      assets/img/404house.jpg
  4. 43
      templates/404.html
  5. 8
      templates/partials/sass/404.sass

@ -9,12 +9,13 @@ from wagtail.wagtailcore import urls as wagtail_urls
from common.views import CustomRegistrationView from common.views import CustomRegistrationView
from wallets.views import TmpCheckOrderView, TmpPaymentAvisoView from wallets.views import TmpCheckOrderView, TmpPaymentAvisoView
from .views import HomeTemplateView, TestChatTemplateView, TestView from .views import HomeTemplateView, TestChatTemplateView, TestView, test_404
from projects.views import CustomerRealtyTrashView, CustomerRealtyDeleteView, CustomerRealtyRestoreView, SortRealtyBy, \ from projects.views import CustomerRealtyTrashView, CustomerRealtyDeleteView, CustomerRealtyRestoreView, SortRealtyBy, \
RealtyUpdateView RealtyUpdateView
urlpatterns = [ urlpatterns = [
url(r'^$', HomeTemplateView.as_view()), url(r'^$', HomeTemplateView.as_view()),
# url(r'^404$', test_404),
url('', include('social.apps.django_app.urls', namespace='social')), url('', include('social.apps.django_app.urls', namespace='social')),
url(r'^chattest/$', TestChatTemplateView.as_view()), url(r'^chattest/$', TestChatTemplateView.as_view()),
url(r'^work_sell/', include('work_sell.urls')), url(r'^work_sell/', include('work_sell.urls')),

@ -13,6 +13,10 @@ _.map = _.map_;
_.filter = _.filter_ _.filter = _.filter_
def test_404(request):
return render(request, '404.html')
class HomeTemplateView(BaseMixin, View): class HomeTemplateView(BaseMixin, View):
template_name = 'home.html' template_name = 'home.html'

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

@ -1,14 +1,35 @@
{% extends 'partials/base.html' %} {% extends 'partials/_base.html' %}
{% load static %}
{% load sass_tags %}
{% block personal_css %}
<link rel='stylesheet' href='{% sass_src "partials/sass/404.sass" %}'>
{% endblock %}
{% block content %} {% block content %}
<section class="mainContainer"> <div class="container">
{% include 'partials/header.html' %} <div class="row" style="margin-top: 80px; margin-bottom: 80px">
<div class="container-fluid"> <div class="col-lg-6">
<div class="row"> <img class="_404" src="{% static 'img/404house.jpg' %}" alt="404">
<p class="welcomeMain">404 ошибка сайта</p> </div>
</div> <div class="col-lg-6">
</div> <h1 class="_404">404</h1>
</section> <p style="font-size: 30px; font-weight: bold; padding-bottom: 20px; border-bottom: 1px solid #cfcfcf; margin-bottom: 40px;">
Страница не найдена
</p>
<p>
Что-то пошло не по плану <br>и мы не смогли найти эту страницу.
</p>
<p>
Но всегда можно вернуться <br>на <a href="/">главную страницу</a> и начать все с начала ;-)
</p>
</div>
</div>
</div>
{% endblock %} {% endblock %}
{% block footer %}
<div class="footer-wrapper">
<div class="container">
{% include 'partials/footer.html' %}
</div>
</div>
{% endblock %}

@ -0,0 +1,8 @@
img._404
padding: 10px
border: 1px solid darkgray
h1._404
font-size: 90px
font-weight: bold
color: #ff0029
Loading…
Cancel
Save