Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
insights
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
insights
Commits
3e1a9e66
Commit
3e1a9e66
authored
Apr 18, 2013
by
Piotr Mitros
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More tests
parent
95e8dada
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
9 deletions
+17
-9
src/djanalytics/core/auth.py
+2
-2
src/djanalytics/core/tests.py
+8
-0
src/djanalytics/core/urls.py
+6
-5
src/djanalytics/core/views.py
+1
-1
src/djanalytics/urls.py
+0
-1
No files found.
src/djanalytics/core/auth.py
View file @
3e1a9e66
...
...
@@ -22,9 +22,9 @@ from django.conf import settings
import
re
def
auth
(
f
):
if
'DJA_AUTH'
in
settings
.
__dir__
()
:
try
:
dja
=
settings
.
DJA_AUTH
e
lse
:
e
xcept
AttributeError
:
dja
=
{}
for
key
in
dja
:
...
...
src/djanalytics/core/tests.py
View file @
3e1a9e66
...
...
@@ -79,3 +79,11 @@ class SimpleTest(TestCase):
self
.
assertEqual
(
g2
(
7
),
48
)
auth
.
settings
=
temp
def
test_urls
(
self
):
from
django.test.client
import
Client
c
=
Client
()
urls
=
[
"/event_properties"
,
"/schema"
]
for
url
in
urls
:
response
=
c
.
get
(
url
)
self
.
assertEqual
(
response
.
status_code
,
200
)
src/djanalytics/core/urls.py
View file @
3e1a9e66
...
...
@@ -5,9 +5,10 @@ urlpatterns = patterns('',
url
(
r'^view/([A-Za-z_+]+)$'
,
'djanalytics.core.views.handle_view'
),
url
(
r'^query/([A-Za-z_+]+)$'
,
'djanalytics.core.views.handle_query'
),
url
(
r'^schema$'
,
'djanalytics.core.views.schema'
),
url
(
r'^probe$'
,
'djanalytics.core.views.handle_probe'
),
url
(
r'^probe/([A-Za-z_+]+)$'
,
'djanalytics.core.views.handle_probe'
),
url
(
r'^probe/([A-Za-z_+]+)/([A-Za-z_+]+)$'
,
'djanalytics.core.views.handle_probe'
),
url
(
r'^probe/([A-Za-z_+]+)/([A-Za-z_+]+)/([A-Za-z_+]+)$'
,
'djanalytics.core.views.handle_probe'
),
url
(
r'^probe/([A-Za-z_+]+)/([A-Za-z_+]+)/([A-Za-z_+]+)/([A-Za-z_+]+)$'
,
'djanalytics.core.views.handle_probe'
),
url
(
r'^event_properties$'
,
'djanalytics.core.views.event_properties'
),
# url(r'^probe$', 'djanalytics.core.views.handle_probe'),
# url(r'^probe/([A-Za-z_+]+)$', 'djanalytics.core.views.handle_probe'),
# url(r'^probe/([A-Za-z_+]+)/([A-Za-z_+]+)$', 'djanalytics.core.views.handle_probe'),
# url(r'^probe/([A-Za-z_+]+)/([A-Za-z_+]+)/([A-Za-z_+]+)$', 'djanalytics.core.views.handle_probe'),
# url(r'^probe/([A-Za-z_+]+)/([A-Za-z_+]+)/([A-Za-z_+]+)/([A-Za-z_+]+)$', 'djanalytics.core.views.handle_probe'),
)
src/djanalytics/core/views.py
View file @
3e1a9e66
...
...
@@ -30,7 +30,7 @@ def index(request):
@auth.auth
def
event_properties
(
request
):
''' Adds a view to advertise defined event properties '''
from
decorators
import
event_property_registry
from
registry
import
event_property_registry
items
=
[]
for
key
in
event_property_registry
.
keys
():
items
.
append
(
"<di>{name}</di><dd>{doc}</dd>"
.
format
(
**
event_property_registry
[
key
]))
...
...
src/djanalytics/urls.py
View file @
3e1a9e66
...
...
@@ -9,7 +9,6 @@ from django.contrib.auth.decorators import login_required
urlpatterns
=
patterns
(
''
,
# Examples:
url
(
r'^$'
,
'djanalytics.core.views.index'
),
url
(
r'^event_properties$'
,
'djanalytics.core.views.event_properties'
),
url
(
'^'
,
include
(
'core.urls'
)),
url
(
r'^httpevent$'
,
'djeventstream.httphandler.views.http_view'
),
# url(r'^view/([A-Za-z_+]+)/([A-Za-z_+]+)$', 'core.views.handle_view'),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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