added some little details on the api
This commit is contained in:
parent
0e40040729
commit
d43a2d4cf2
reValuate
api
db.sqlite3home/__pycache__
media/1
upload
__pycache__
__init__.cpython-38.pycadmin.cpython-38.pycforms.cpython-38.pycmodels.cpython-38.pycvalidators.cpython-38.pycviews.cpython-38.pyc
migrations/__pycache__
0001_initial.cpython-38.pyc0002_balance.cpython-38.pyc0003_delete_balance.cpython-38.pyc0004_auto_20210311_1702.cpython-38.pyc0005_auto_20210311_1833.cpython-38.pyc0006_auto_20210311_1833.cpython-38.pyc0007_auto_20210311_1834.cpython-38.pyc0008_auto_20210311_1838.cpython-38.pyc0009_auto_20210311_1910.cpython-38.pyc0010_auto_20210312_2339.cpython-38.pyc0011_auto_20210312_2341.cpython-38.pyc0012_auto_20210312_2347.cpython-38.pyc0013_auto_20210315_0340.cpython-38.pyc0014_image_time.cpython-38.pyc0015_auto_20210315_1745.cpython-38.pyc0016_videos.cpython-38.pyc0017_auto_20210315_1838.cpython-38.pyc0018_auto_20210315_1839.cpython-38.pyc0019_auto_20210315_1841.cpython-38.pyc0020_auto_20210315_1847.cpython-38.pyc0021_auto_20210315_1848.cpython-38.pyc0022_auto_20210315_1852.cpython-38.pyc0023_auto_20210315_1901.cpython-38.pyc0024_media_managed_by.cpython-38.pyc__init__.cpython-38.pyc
users
__pycache__
migrations/__pycache__
0001_initial.cpython-38.pyc0002_auto_20210220_2131.cpython-38.pyc0003_auto_20210220_2142.cpython-38.pyc0004_auto_20210220_2143.cpython-38.pyc0005_auto_20210307_1544.cpython-38.pyc0006_delete_balance.cpython-38.pyc0007_balance.cpython-38.pyc0008_transaction.cpython-38.pyc0009_auto_20210316_1408.cpython-38.pyc0010_auto_20210316_1415.cpython-38.pyc0011_auto_20210316_1420.cpython-38.pyc0012_auto_20210316_1421.cpython-38.pyc__init__.cpython-38.pyc
website
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -9,6 +9,7 @@ from .serializers import BalanceSerializer, ImageSerializer
|
||||
class BalanceView(viewsets.ModelViewSet):
|
||||
permission_classes = [permissions.IsAuthenticated]
|
||||
serializer_class = BalanceSerializer
|
||||
http_method_names = ['get']
|
||||
|
||||
def get_queryset(self):
|
||||
return Balance.objects.filter(user=self.request.user)
|
||||
@ -17,6 +18,7 @@ class BalanceView(viewsets.ModelViewSet):
|
||||
class ImageView(viewsets.ModelViewSet):
|
||||
permission_classes = [permissions.IsAuthenticated]
|
||||
serializer_class = ImageSerializer
|
||||
http_method_names = ['get','post']
|
||||
|
||||
def get_queryset(self):
|
||||
return Media.objects.filter(user=self.request.user)
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
reValuate/media/1/0RhOu.png
Normal file
BIN
reValuate/media/1/0RhOu.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 29 KiB |
BIN
reValuate/media/1/pexels-mali-maeder-802221_BrOpcta.jpg
Normal file
BIN
reValuate/media/1/pexels-mali-maeder-802221_BrOpcta.jpg
Normal file
Binary file not shown.
After ![]() (image error) Size: 747 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -27,8 +27,8 @@ from users.views import getBalance, addToBalance, adminView, removeBalance
|
||||
|
||||
|
||||
router = routers.DefaultRouter()
|
||||
router.register("balance", BalanceView)
|
||||
router.register("images", ImageView)
|
||||
router.register("balance", BalanceView, basename="balance")
|
||||
router.register("images", ImageView, basename="image")
|
||||
|
||||
urlpatterns = [
|
||||
|
||||
|
Reference in New Issue
Block a user