Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-notes-api
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
edx-notes-api
Commits
a7b3f092
Commit
a7b3f092
authored
Jan 05, 2015
by
Tim Babych
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pep8
parent
8d8df6de
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
8 deletions
+6
-8
notesapi/v1/search_indexes.py
+1
-0
notesapi/v1/tests/test_models.py
+1
-2
notesapi/v1/tests/test_views.py
+1
-3
notesapi/v1/views.py
+1
-1
notesserver/settings/logger.py
+2
-2
No files found.
notesapi/v1/search_indexes.py
View file @
a7b3f092
from
haystack
import
indexes
from
.models
import
Note
class
NoteIndex
(
indexes
.
SearchIndex
,
indexes
.
Indexable
):
user
=
indexes
.
CharField
(
model_attr
=
'user_id'
,
indexed
=
False
)
course_id
=
indexes
.
CharField
(
model_attr
=
'course_id'
,
indexed
=
False
)
...
...
notesapi/v1/tests/test_models.py
View file @
a7b3f092
...
...
@@ -46,4 +46,4 @@ class NoteTest(TestCase):
with
self
.
assertRaises
(
ValidationError
):
note
=
Note
.
create
(
payload
)
note
.
full_clean
()
\ No newline at end of file
note
.
full_clean
()
notesapi/v1/tests/test_views.py
View file @
a7b3f092
...
...
@@ -433,9 +433,7 @@ class AnnotationViewTests(BaseAnnotationViewTests):
Tests list all annotations.
"""
for
i
in
xrange
(
5
):
kwargs
=
{
'text'
:
'Foo_{}'
.
format
(
i
),
}
kwargs
=
{
'text'
:
'Foo_{}'
.
format
(
i
)}
self
.
_create_annotation
(
**
kwargs
)
url
=
reverse
(
'api:v1:annotations'
)
...
...
notesapi/v1/views.py
View file @
a7b3f092
...
...
@@ -25,7 +25,7 @@ class AnnotationSearchView(APIView):
"""
params
=
self
.
request
.
QUERY_PARAMS
.
dict
()
query
=
SearchQuerySet
()
.
models
(
Note
)
.
filter
(
**
{
f
:
v
for
(
f
,
v
)
in
params
.
items
()
if
f
in
(
'user'
,
'course_id'
,
'usage_id'
,
'text'
)}
**
{
f
:
v
for
(
f
,
v
)
in
params
.
items
()
if
f
in
(
'user'
,
'course_id'
,
'usage_id'
,
'text'
)}
)
.
order_by
(
'-updated'
)
if
params
.
get
(
'highlight'
):
...
...
notesserver/settings/logger.py
View file @
a7b3f092
...
...
@@ -34,8 +34,8 @@ def get_logger_config(log_dir='/var/tmp',
"[
%(name)
s][env:{logging_env}]
%(levelname)
s "
"[{hostname}
%(process)
d] [
%(filename)
s:
%(lineno)
d] "
"-
%(message)
s"
)
.
format
(
service_variant
=
service_variant
,
logging_env
=
logging_env
,
hostname
=
hostname
)
service_variant
=
service_variant
,
logging_env
=
logging_env
,
hostname
=
hostname
)
if
debug
:
handlers
=
[
'console'
]
...
...
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