Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Marta Miranda
/
boletin_api
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Enzo Yair
2023-09-06 08:48:23 -0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
d300e00bec77fceeab43ce93dcd27b6797838ff0
d300e00b
1 parent
b6fbc134
se elimino la paginacion personalizada
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
10 deletions
project/apps/edicto/api.py
project/apps/edicto/pagination.py
project/apps/edicto/api.py
View file @
d300e00
...
...
@@ -8,7 +8,6 @@ from datetime import datetime
from
.models
import
Edicto
,
Precio
from
.serializer
import
EdictoSerializer
,
PrecioSerializer
from
.filters
import
EdictoFilter
,
PrecioFilter
from
.pagination
import
CustomPagination
from
.permissions
import
IsAdminOrAuthorized
from
.utils
import
contador
...
...
@@ -27,7 +26,6 @@ class EdictoViewSet(mixins.CreateModelMixin,
queryset
=
Edicto
.
objects
.
all
()
ordering_fields
=
(
'usuario'
,)
ordering
=
'usuario'
pagination_class
=
CustomPagination
def
perform_create
(
self
,
serializer
):
edicto
=
self
.
request
.
data
.
get
(
'cuerpo_edicto'
)
...
...
@@ -56,4 +54,3 @@ class PrecioViewSet(viewsets.ReadOnlyModelViewSet):
ordering_fields
=
(
'usuario'
,
)
ordering
=
'usuario'
queryset
=
Precio
.
objects
.
all
()
pagination_class
=
CustomPagination
...
...
project/apps/edicto/pagination.py
deleted
100644 → 0
View file @
b6fbc13
from
rest_framework.pagination
import
PageNumberPagination
class
CustomPagination
(
PageNumberPagination
):
page_size
=
2
page_size_query_param
=
'page_size'
max_page_size
=
1000
Please
register
or
login
to post a comment