This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: '3.8' | |
| services: | |
| # MongoDB Service | |
| mongodb: | |
| image: mongo:latest | |
| container_name: mongodb | |
| restart: unless-stopped | |
| ports: | |
| - "27017:27017" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from rest_framework.generics import ListCreateAPIView, RetrieveUpdateDestroyAPIView | |
| from rest_framework.permissions import AllowAny | |
| from todo.models import TodoModel | |
| from todo.serializers import TodoSerializer | |
| class TodoView(ListCreateAPIView, RetrieveUpdateDestroyAPIView): | |
| queryset = TodoModel.objects.all() | |
| serializer_class = TodoSerializer | |
| permission_classes = [AllowAny] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from rest_framework.generics import ListCreateAPIView, RetrieveUpdateDestroyAPIView | |
| from rest_framework.permissions import AllowAny | |
| from todo.models import TodoModel | |
| from todo.serializers import TodoSerializer | |
| class TodoView(ListCreateAPIView, RetrieveUpdateDestroyAPIView): | |
| queryset = TodoModel.objects.all() | |
| serializer_class = TodoSerializer | |
| permission_classes = [AllowAny] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from django.urls import path | |
| from todo.views import TodoView | |
| urlpatterns = [ | |
| path("",TodoView.as_view()), | |
| path("<int:pk>/",TodoView.as_view()), | |
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from rest_framework.generics import RetrieveUpdateDestroyAPIView | |
| from rest_framework.permissions import AllowAny | |
| from todo.models import TodoModel | |
| from todo.serializers import TodoSerializer | |
| class SingleTodoView(RetrieveUpdateDestroyAPIView): | |
| queryset = TodoModel.objects.all() | |
| serializer_class = TodoSerializer | |
| permission_classes = [AllowAny] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from rest_framework.generics import ListCreateAPIView | |
| from rest_framework.permissions import AllowAny | |
| from todo.models import TodoModel | |
| from todo.serializers import TodoSerializer | |
| class TodoView(ListCreateAPIView): | |
| queryset = TodoModel.objects.all() | |
| serializer_class = TodoSerializer | |
| permission_classes = [AllowAny] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file | |
| // for details. All rights reserved. Use of this source code is governed by a | |
| // BSD-style license that can be found in the LICENSE file. | |
| import 'package:flutter/material.dart'; | |
| void main() => runApp(MyApp()); | |
| class MyApp extends StatelessWidget { | |
| @override |