~widelands-dev/widelands-website/trunk

404.2.1 by franku
first try on Django1.8
1
from django.conf.urls import *
1 by Holger Rapp
Initial commit of new widelands homepage
2
3
# Uncomment the next two lines to enable the admin:
4
from django.contrib import admin
5
admin.autodiscover()
6
404.2.8 by franku
first partially working version with old data
7
from django.views.generic.base import RedirectView
442.1.1 by franku
add a static robots.txt
8
from django.views.generic import TemplateView
404.2.8 by franku
first partially working version with old data
9
from django.contrib.syndication.views import Feed
520.2.2 by kaputtnik
updated django-registration
10
from django_registration.backends.activation.views import RegistrationView
404.2.28 by franku
actualized registration, Added norecaptcha2, but registrations do not work correct yet, small nits
11
from mainpage.forms import RegistrationWithCaptchaForm
429.3.2 by franku
each app has his own sitemap.py
12
489.1.26 by franku
autocompletion uses now a callback function to prevend having all users in the users browsers
13
404.2.29 by franku
urlpatterns are lists; patterns are deprecated
14
urlpatterns = [
429.3.2 by franku
each app has his own sitemap.py
15
    # Creating a sitemap.xml
530.1.1 by kaputtnik
mv main files into mainpage directory; apply needed changes
16
    url(r'^sitemap\.xml/', include('mainpage.sitemap_urls')),
442.1.1 by franku
add a static robots.txt
17
    # Static view of robots.txt
442.1.9 by franku
added whitespace; cleanup robots.txt
18
    url(r'^robots\.txt/', TemplateView.as_view(template_name='robots.txt', content_type="text/plain")),
429.3.2 by franku
each app has his own sitemap.py
19
1 by Holger Rapp
Initial commit of new widelands homepage
20
    # Uncomment the next line to enable the admin:
404.2.6 by franku
updated settings.py pip_requirements; first try on polls,news and loginbox; still not woriking at all; so many differences :-D
21
    url(r'^admin/', admin.site.urls),
438.1.6 by franku
run the script
22
11 by Holger Rapp
Imported wikiapp into our repository, because we did some local changes (users must be logged in to edit wiki pages)
23
    # Django builtin / Registration
325.1.17 by Shevonar
design for notifications and registration, added missing images, fixes and cleanups.
24
    # overwrite registration with own implementation
438.1.6 by franku
run the script
25
    url(r'^accounts/register/$', RegistrationView.as_view(
520.2.2 by kaputtnik
updated django-registration
26
        form_class=RegistrationWithCaptchaForm), name='django_registration_register'),
27
    url(r'^accounts/', include('django_registration.backends.activation.urls')),
527 by franku
fixed url to make the login_required decorator work; this uses the Django default setting of LOGIN_URL, so we don't have to worry about this setting
28
    url(r'^accounts/', include('django.contrib.auth.urls')),
438.1.6 by franku
run the script
29
502.1.1 by franku
include django_star_ratings
30
    url(r'^ratings/', include('star_ratings.urls', namespace='ratings', app_name='ratings')),
404.2.24 by franku
added the old threadedcomments app as wildelands app
31
    # Formerly 3rd party
438.1.6 by franku
run the script
32
    url(r'^notification/', include('notification.urls')),
462.3.1 by franku
first functioning search with haystack and whoosh; working: wlmaps, pybb.topic, pybb.post
33
    
489.1.26 by franku
autocompletion uses now a callback function to prevend having all users in the users browsers
34
    url(r'^messages/', include('django_messages_wl.urls')),
35
438.1.6 by franku
run the script
36
    url(r'^threadedcomments/', include('threadedcomments.urls')),
413.1.1 by franku
reworked http500 error page; redirect /docs to docs/wl
37
479.2.32 by franku
add a redirect to fix old links
38
    # Redirect old urls to new documentation
39
    url(r'^docs/wl/(?P<path>.*)', RedirectView.as_view(url='/documentation/%(path)s', permanent=True), name='docs_wl'),
479.2.8 by franku
cleanups
40
    url(r'^docs/$', RedirectView.as_view(url='/documentation/index.html', permanent=True), name='docs'),
438.1.6 by franku
run the script
41
17 by Holger Rapp
Main Page contains now the same informations as before
42
    # 3rd party, modified for widelands
438.1.6 by franku
run the script
43
    url(r'^wiki/', include('wiki.urls')),
44
    url(r'^news/', include('news.urls')),
45
    url(r'^forum/', include('pybb.urls')),
173.2.3 by Holger Rapp
Made the site compatible to django 1.1 and all the various packages
46
5 by Holger Rapp
added registration, hacked on login
47
    # WL specific:
530.1.1 by kaputtnik
mv main files into mainpage directory; apply needed changes
48
    url(r'^', include('mainpage.mainpage_urls')),
438.1.6 by franku
run the script
49
    url(r'^help/(?P<path>.*)', RedirectView.as_view(url='/encyclopedia/%(path)s',
489.1.14 by franku
include mainpage.urls and move urls for mainpage related views
50
                                                   permanent=True)),  # to not break old links
438.1.6 by franku
run the script
51
    url(r'^encyclopedia/', include('wlhelp.urls')),
52
    url(r'^webchat/', include('wlwebchat.urls')),
53
    url(r'^images/', include('wlimages.urls')),
54
    url(r'^profile/', include('wlprofile.urls')),
55
    url(r'^search/', include('wlsearch.urls')),
56
    url(r'^poll/', include('wlpoll.urls')),
57
    url(r'^maps/', include('wlmaps.urls')),
58
    url(r'^screenshots/', include('wlscreens.urls')),
59
    url(r'^ggz/', include('wlggz.urls')),
476.1.6 by franku
refactoring of variables; moved spam_check into the model
60
    url(r'^moderated/', include('check_input.urls')),
478.1.1 by gschmitlin at gmail
added scheduling module in a clean way
61
    url(r'^scheduling/', include('wlscheduling.urls')),
500.1.6 by franku
fixed url; thanks Gun
62
    url(r'^privacy/', include('privacy_policy.urls')),
404.2.29 by franku
urlpatterns are lists; patterns are deprecated
63
]
2 by Holger Rapp
Slowly getting something to work
64
65
try:
532.1.4 by franku
fixed import of local_urls, fixed wl_markdown, replaced diff_match_patch.py with a python3 compatible version
66
    from .local_urls import *
2 by Holger Rapp
Slowly getting something to work
67
    urlpatterns += local_urlpatterns
68
except ImportError:
69
    pass
70
413.1.1 by franku
reworked http500 error page; redirect /docs to docs/wl
71
handler500 = 'mainpage.views.custom_http_500'