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
773a92ea
Commit
773a92ea
authored
May 10, 2013
by
Tom Christie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move models into test modules, out of models module
parent
fd84cf7f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
9 deletions
+8
-9
rest_framework/tests/models.py
+0
-7
rest_framework/tests/pagination.py
+8
-2
No files found.
rest_framework/tests/models.py
View file @
773a92ea
...
@@ -58,13 +58,6 @@ class ReadOnlyManyToManyModel(RESTFrameworkModel):
...
@@ -58,13 +58,6 @@ class ReadOnlyManyToManyModel(RESTFrameworkModel):
rel
=
models
.
ManyToManyField
(
Anchor
)
rel
=
models
.
ManyToManyField
(
Anchor
)
# Model to test filtering.
class
FilterableItem
(
RESTFrameworkModel
):
text
=
models
.
CharField
(
max_length
=
100
)
decimal
=
models
.
DecimalField
(
max_digits
=
4
,
decimal_places
=
2
)
date
=
models
.
DateField
()
# Model for regression test for #285
# Model for regression test for #285
class
Comment
(
RESTFrameworkModel
):
class
Comment
(
RESTFrameworkModel
):
...
...
rest_framework/tests/pagination.py
View file @
773a92ea
from
__future__
import
unicode_literals
from
__future__
import
unicode_literals
import
datetime
import
datetime
from
decimal
import
Decimal
from
decimal
import
Decimal
import
django
from
django.db
import
models
from
django.core.paginator
import
Paginator
from
django.core.paginator
import
Paginator
from
django.test
import
TestCase
from
django.test
import
TestCase
from
django.test.client
import
RequestFactory
from
django.test.client
import
RequestFactory
from
django.utils
import
unittest
from
django.utils
import
unittest
from
rest_framework
import
generics
,
status
,
pagination
,
filters
,
serializers
from
rest_framework
import
generics
,
status
,
pagination
,
filters
,
serializers
from
rest_framework.compat
import
django_filters
from
rest_framework.compat
import
django_filters
from
rest_framework.tests.models
import
BasicModel
,
FilterableItem
from
rest_framework.tests.models
import
BasicModel
factory
=
RequestFactory
()
factory
=
RequestFactory
()
class
FilterableItem
(
models
.
Model
):
text
=
models
.
CharField
(
max_length
=
100
)
decimal
=
models
.
DecimalField
(
max_digits
=
4
,
decimal_places
=
2
)
date
=
models
.
DateField
()
class
RootView
(
generics
.
ListCreateAPIView
):
class
RootView
(
generics
.
ListCreateAPIView
):
"""
"""
Example description for OPTIONS.
Example description for OPTIONS.
...
...
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