Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
django-rest-framework
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
django-rest-framework
Commits
7b213368
Commit
7b213368
authored
Jul 16, 2015
by
Tom Christie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename model to play nice with Django 1.7.
parent
0b6eb4a8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
tests/test_model_serializer.py
+2
-2
No files found.
tests/test_model_serializer.py
View file @
7b213368
...
...
@@ -85,7 +85,7 @@ class FieldOptionsModel(models.Model):
choices_field
=
models
.
CharField
(
max_length
=
100
,
choices
=
COLOR_CHOICES
)
class
MappingForChoicesWithNonStandardArgs
(
models
.
Model
):
class
ChoicesModel
(
models
.
Model
):
choices_field_with_nonstandard_args
=
models
.
DecimalField
(
max_digits
=
3
,
decimal_places
=
1
,
choices
=
DECIMAL_CHOICES
,
verbose_name
=
'A label'
)
...
...
@@ -317,7 +317,7 @@ class TestRegularFieldMappings(TestCase):
def
test_choices_with_nonstandard_args
(
self
):
class
ExampleSerializer
(
serializers
.
ModelSerializer
):
class
Meta
:
model
=
MappingForChoicesWithNonStandardArgs
model
=
ChoicesModel
ExampleSerializer
()
...
...
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