Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
La Quadrature du Net
Respect My Net
Commits
7032cbd9
Commit
7032cbd9
authored
Apr 29, 2011
by
stef
Browse files
[enh] added index
parent
480f8552
Changes
2
Hide whitespace changes
Inline
Side-by-side
bt/views.py
View file @
7032cbd9
...
...
@@ -27,3 +27,6 @@ def ajax(request, country=None, operator=None):
else
:
print
'co'
,
sorted
(
list
(
set
([
x
.
operator
for
x
in
Violation
.
objects
.
filter
(
country
=
country
).
filter
(
operator
=
operator
)])))
return
HttpResponse
(
'["Basic", "Surfer", "Gamer", "Pro", "Business"]'
)
def
index
(
request
):
return
HttpResponse
(
"ohai, nothing to see here"
)
urls.py
View file @
7032cbd9
...
...
@@ -7,6 +7,7 @@ from bt import views as bt
# admin.autodiscover()
urlpatterns
=
patterns
(
''
,
(
r
'^$'
,
bt
.
index
),
(
r
'^accounts/logout$'
,
'django.contrib.auth.views.logout'
,
{
'next_page'
:
'/'
}),
(
r
'^accounts/'
,
include
(
'registration.urls'
)),
(
r
'^ajax/(?P<country>[^/]*)(/(?P<operator>[^/]*))?$'
,
bt
.
ajax
),
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment