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
d3d481ae
Commit
d3d481ae
authored
May 12, 2013
by
Piotr Mitros
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Untested code paths still exists in multiembed, but basic tests pass
parent
420a2e62
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
src/djanalytics/core/djobject.py
+7
-3
src/djanalytics/settings.py
+2
-0
No files found.
src/djanalytics/core/djobject.py
View file @
d3d481ae
...
@@ -74,7 +74,7 @@ class multi_embed():
...
@@ -74,7 +74,7 @@ class multi_embed():
def
__getattr__
(
self
,
attr
):
def
__getattr__
(
self
,
attr
):
for
x
in
self
.
_embeds
:
for
x
in
self
.
_embeds
:
try
:
try
:
attr
=
x
.
__getattr
(
attr
)
attr
=
x
.
__getattr
__
(
attr
)
except
AttributeError
:
except
AttributeError
:
pass
pass
if
attr
:
if
attr
:
...
@@ -173,7 +173,10 @@ class single_embed(object):
...
@@ -173,7 +173,10 @@ class single_embed(object):
def
__repr__
(
self
):
def
__repr__
(
self
):
''' Pretty representation of the object. '''
''' Pretty representation of the object. '''
return
self
.
_view_or_query
+
" object host: ["
+
self
.
_baseurl
+
"]"
if
self
.
_baseurl
:
return
self
.
_view_or_query
+
" object host: ["
+
self
.
_baseurl
+
"]"
else
:
return
self
.
_view_or_query
+
"/local"
class
transform_embed
(
object
):
class
transform_embed
(
object
):
'''
'''
...
@@ -251,8 +254,9 @@ def get_embed(t):
...
@@ -251,8 +254,9 @@ def get_embed(t):
except
AttributeError
:
except
AttributeError
:
pass
pass
if
embed_config
:
# untested code path
if
embed_config
:
# untested code path
embeds
=
[]
for
embed_spec
in
embed_config
:
for
embed_spec
in
embed_config
:
single_embeds
(
t
,
embed_spec
)
embeds
.
append
(
single_embed
(
t
,
**
embed_spec
)
)
return
multi_embed
(
embeds
)
return
multi_embed
(
embeds
)
return
single_embed
(
t
)
return
single_embed
(
t
)
...
...
src/djanalytics/settings.py
View file @
d3d481ae
...
@@ -4,6 +4,8 @@
...
@@ -4,6 +4,8 @@
import
datetime
import
datetime
DJOBJECT_CONFIG
=
[{},
{
'baseurl'
:
'http://127.0.0.1:9022/'
}]
DJ_REQUIRED_APPS
=
(
'djeventstream.httphandler'
,
DJ_REQUIRED_APPS
=
(
'djeventstream.httphandler'
,
'djcelery'
,
'djcelery'
,
'south'
,
'south'
,
...
...
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