commit 2e44175ce9e9e5ea18e98e4aedbad6326c548163 Author: Baitur <tawbaev777@gmail.com> Date: Mon Sep 11 16:49:08 2023 +0600 first diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/Transparency.iml b/.idea/Transparency.iml new file mode 100644 index 0000000..f453316 --- /dev/null +++ b/.idea/Transparency.iml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<module type="PYTHON_MODULE" version="4"> + <component name="NewModuleRootManager"> + <content url="file://$MODULE_DIR$"> + <sourceFolder url="file://$MODULE_DIR$/main" isTestSource="false" /> + <excludeFolder url="file://$MODULE_DIR$/venv" /> + </content> + <orderEntry type="inheritedJdk" /> + <orderEntry type="sourceFolder" forTests="false" /> + </component> +</module> \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000..105ce2d --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ +<component name="InspectionProjectProfileManager"> + <settings> + <option name="USE_PROJECT_PROFILE" value="false" /> + <version value="1.0" /> + </settings> +</component> \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..d038a12 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="ProjectRootManager" version="2" project-jdk-name="Python 3.11 (Transparency)" project-jdk-type="Python SDK" /> +</project> \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..61e2707 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="ProjectModuleManager"> + <modules> + <module fileurl="file://$PROJECT_DIR$/.idea/Transparency.iml" filepath="$PROJECT_DIR$/.idea/Transparency.iml" /> + </modules> + </component> +</project> \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="VcsDirectoryMappings"> + <mapping directory="$PROJECT_DIR$" vcs="Git" /> + </component> +</project> \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/kgroad b/kgroad new file mode 100644 index 0000000..d59454e --- /dev/null +++ b/kgroad @@ -0,0 +1,28 @@ +-----BEGIN OPENSSH PRIVATE KEY----- +b3BlbnNzaC1rZXktdjEAAAAACmFlczI1Ni1jdHIAAAAGYmNyeXB0AAAAGAAAABAWGM7tCg +qA5iHD9ENKuGrpAAAAEAAAAAEAAAEXAAAAB3NzaC1yc2EAAAADAQABAAABAQDJOhQJzuPo +/AzR9zqM80GLzaoR4SDonhGTHlASdIwky75T1n8l7o0HTQ47b8Nl7FX7kLJKxhPeRSpUcu +GiJwl9F+/ZCqTzr19IA9keb71n6kDZImeF5KARrMUnqAaMIvHvI5QLT8UmOZ2nrsLDBPiO +haGKWkLUBjdm9W6F+arQKDrC5pGPJUbtfq0zjxHhaslvdg6hXaaH0zWhH3fla7iTYGiUge +M4Zp4ykqOZwbxRsuLasXR0j6/1frpiF9sHWyV5+2T3qnO7V3n1pRHb+atDPmkb8IZuCDQ3 +w7zMOtcac9FAu+A4Q+CZ0alFUm+2odFEfA3n8ABG/uaQZY6S70pTAAAD4IrCQCAIAGVXT7 +bZ150ayR0uqrx2nrlS9Qcaz7xDeX7UOE0/kkl20Gn9pRv3mENvtRcdsDmNyBGG5O+weXXq +2uXL6n/WICUXJWHjRCrJaLvVD/9Kap5C3VSbwvxQpm0EgOvfLzwGWqUvdK9PfkiRBS2dYV +IQDkYp8qOfvC32zsy3cTDgNnrAu9HjbRiATGF+OZVGDMmDuzp2q7S6KTSmHTzjkBU1pdW8 +4IWafWK19f5uNT8zPg8KZjSsnLP8Hgal+CqaenVITtStQUSByDfPVk7aQg7olVfvRVdG7k +KmkgswCy2eTLLHaF9ofdmmT/eq5Dwv6xgAVgfUkXRVpbpHUIbXPxlKsB3IZvJSssYpGkz8 +WYJzthc9pKkKDs6Y8QEgspPgCetGxv/1F9+FNFfxfVUTVeE4Mxr6Vu+ll5+MWRlYI8nO6j +QacHtMDRpOgj/a0HAVgRvsfBx7+CGWCzOmBu/AjwwUYlFTeZoZWPPeM9750lxJWtBE2ZmI +7o5CmMMvtTzGRNKa1xOhoyqoITo4uudgC5ZUeSIIm6DH4/KFyMAicW8xS4jc37zY7JTwXA +V/WWOzGihAGO14qME0+HjrafVR3UfLkFwrQBPQ31oTPORHNLYDsFe2okpo1tsSSCYnnVeM ++d2tO+TQUKCk4v0Z0oq0JLH43InQJEyf9t5YtSL2Z2bOSAYuoYiWaAv1AQwAo6EQJDfNWF +p+zLO3SGWXBYYoRfha4sPlOHMqD/hzTAdKDo24GHfmYnr4NObS1IP73SdP78LRMK9rT0hR +PngpviFWfsY10GeclZbBDlQ+r2ZBHzrAAx5J/1gJqiwbTxwNJNWLSK/d0Dx7OVvvsBZzJw +VEmk5IjaU+jsYEIlkKtoHoXEe/6UoNUaDyVTNUWRezm/AoMnTEd7BkKqn78YoxP6ZwI8HD +O8QxRdNnOp0e1y1TGiVbodmZGgGDwxYElLSR8slLsBG2LbWM1PWm1OMFmqscKWZi0h3gn8 +EBzdlFulFqi+7K+pU171wJj//eneaZaxUWEfRbTjN8NdGlmBBI6iPW4V0Wz9mWXkBE9FP4 +IO04czdI4T+PTHtIfVqq9w02h/e1xWvV0CtdDCnfzd4ERIT6ABBI3R9qY5xgt86jdwG4xH +T1d8Kq3U42QJtDnrqqSOPJCy+m/PYCDq+A6ond/6cBDV1mX4vGY9UKCGHwgVqBTMUBRQxK +L5GPKsepJjxj8pUH0p/+PMfhXaJbZYJCiJLQ8rZ7/ZQG+1NLG//3FpJGTkFaPdyRdCjemb +++GUmkKRqOv1nESEXf27F6qdrsRvUo5WArRxTqPp3tCCnI1X3T +-----END OPENSSH PRIVATE KEY----- diff --git a/kgroad.pub b/kgroad.pub new file mode 100644 index 0000000..e6f8508 --- /dev/null +++ b/kgroad.pub @@ -0,0 +1 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDJOhQJzuPo/AzR9zqM80GLzaoR4SDonhGTHlASdIwky75T1n8l7o0HTQ47b8Nl7FX7kLJKxhPeRSpUcuGiJwl9F+/ZCqTzr19IA9keb71n6kDZImeF5KARrMUnqAaMIvHvI5QLT8UmOZ2nrsLDBPiOhaGKWkLUBjdm9W6F+arQKDrC5pGPJUbtfq0zjxHhaslvdg6hXaaH0zWhH3fla7iTYGiUgeM4Zp4ykqOZwbxRsuLasXR0j6/1frpiF9sHWyV5+2T3qnO7V3n1pRHb+atDPmkb8IZuCDQ3w7zMOtcac9FAu+A4Q+CZ0alFUm+2odFEfA3n8ABG/uaQZY6S70pT baiturtashbaev@MacBook-Pro-Baitur.local diff --git a/main/db.sqlite3 b/main/db.sqlite3 new file mode 100644 index 0000000..e8dd6fb Binary files /dev/null and b/main/db.sqlite3 differ diff --git a/main/main/__init__.py b/main/main/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/main/main/__pycache__/__init__.cpython-311.pyc b/main/main/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000..99125cd Binary files /dev/null and b/main/main/__pycache__/__init__.cpython-311.pyc differ diff --git a/main/main/__pycache__/settings.cpython-311.pyc b/main/main/__pycache__/settings.cpython-311.pyc new file mode 100644 index 0000000..5f024f5 Binary files /dev/null and b/main/main/__pycache__/settings.cpython-311.pyc differ diff --git a/main/main/__pycache__/urls.cpython-311.pyc b/main/main/__pycache__/urls.cpython-311.pyc new file mode 100644 index 0000000..121e767 Binary files /dev/null and b/main/main/__pycache__/urls.cpython-311.pyc differ diff --git a/main/main/__pycache__/wsgi.cpython-311.pyc b/main/main/__pycache__/wsgi.cpython-311.pyc new file mode 100644 index 0000000..fcde046 Binary files /dev/null and b/main/main/__pycache__/wsgi.cpython-311.pyc differ diff --git a/main/main/asgi.py b/main/main/asgi.py new file mode 100644 index 0000000..4d4ab0c --- /dev/null +++ b/main/main/asgi.py @@ -0,0 +1,16 @@ +""" +ASGI config for main project. + +It exposes the ASGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/4.2/howto/deployment/asgi/ +""" + +import os + +from django.core.asgi import get_asgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'main.settings') + +application = get_asgi_application() diff --git a/main/main/settings.py b/main/main/settings.py new file mode 100644 index 0000000..8c62b5c --- /dev/null +++ b/main/main/settings.py @@ -0,0 +1,125 @@ +""" +Django settings for main project. + +Generated by 'django-admin startproject' using Django 4.2.1. + +For more information on this file, see +https://docs.djangoproject.com/en/4.2/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/4.2/ref/settings/ +""" + +from pathlib import Path + +# Build paths inside the project like this: BASE_DIR / 'subdir'. +BASE_DIR = Path(__file__).resolve().parent.parent + + +# Quick-start development settings - unsuitable for production +# See https://docs.djangoproject.com/en/4.2/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = 'django-insecure-w^pg5f=r=ex8d)-ez0&n6b2b8)uawa7myx+kkdxc+13@(jp8*0' + +# SECURITY WARNING: don't run with debug turned on in production! +DEBUG = True + +ALLOWED_HOSTS = [] + + +# Application definition + +INSTALLED_APPS = [ + 'django.contrib.admin', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.messages', + 'django.contrib.staticfiles', + 'parser', + 'rest_framework' +] + +MIDDLEWARE = [ + 'django.middleware.security.SecurityMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware', +] + +ROOT_URLCONF = 'main.urls' + +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [], + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + 'django.template.context_processors.debug', + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + ], + }, + }, +] + +WSGI_APPLICATION = 'main.wsgi.application' + + +# Database +# https://docs.djangoproject.com/en/4.2/ref/settings/#databases + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': BASE_DIR / 'db.sqlite3', + } +} + + +# Password validation +# https://docs.djangoproject.com/en/4.2/ref/settings/#auth-password-validators + +AUTH_PASSWORD_VALIDATORS = [ + { + 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', + }, +] + + +# Internationalization +# https://docs.djangoproject.com/en/4.2/topics/i18n/ + +LANGUAGE_CODE = 'ru' + +TIME_ZONE = 'Asia/Bishkek' + +USE_I18N = True + +USE_TZ = True + + +# Static files (CSS, JavaScript, Images) +# https://docs.djangoproject.com/en/4.2/howto/static-files/ + +STATIC_URL = 'static/' + +# Default primary key field type +# https://docs.djangoproject.com/en/4.2/ref/settings/#default-auto-field + +DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' diff --git a/main/main/urls.py b/main/main/urls.py new file mode 100644 index 0000000..a5cd77f --- /dev/null +++ b/main/main/urls.py @@ -0,0 +1,24 @@ +""" +URL configuration for main project. + +The `urlpatterns` list routes URLs to views. For more information please see: + https://docs.djangoproject.com/en/4.2/topics/http/urls/ +Examples: +Function views + 1. Add an import: from my_app import views + 2. Add a URL to urlpatterns: path('', views.home, name='home') +Class-based views + 1. Add an import: from other_app.views import Home + 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') +Including another URLconf + 1. Import the include() function: from django.urls import include, path + 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) +""" +from django.contrib import admin +from django.urls import path, include + + +urlpatterns = [ + path('admin/', admin.site.urls), + path('', include("parser.urls")), +] diff --git a/main/main/wsgi.py b/main/main/wsgi.py new file mode 100644 index 0000000..87086a6 --- /dev/null +++ b/main/main/wsgi.py @@ -0,0 +1,16 @@ +""" +WSGI config for main project. + +It exposes the WSGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/4.2/howto/deployment/wsgi/ +""" + +import os + +from django.core.wsgi import get_wsgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'main.settings') + +application = get_wsgi_application() diff --git a/main/manage.py b/main/manage.py new file mode 100755 index 0000000..fbda2b3 --- /dev/null +++ b/main/manage.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python +"""Django's command-line utility for administrative tasks.""" +import os +import sys + + +def main(): + """Run administrative tasks.""" + os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'main.settings') + try: + from django.core.management import execute_from_command_line + except ImportError as exc: + raise ImportError( + "Couldn't import Django. Are you sure it's installed and " + "available on your PYTHONPATH environment variable? Did you " + "forget to activate a virtual environment?" + ) from exc + execute_from_command_line(sys.argv) + + +if __name__ == '__main__': + main() diff --git a/main/me1.jpg b/main/me1.jpg new file mode 100644 index 0000000..8a3d277 Binary files /dev/null and b/main/me1.jpg differ diff --git a/main/parser/__init__.py b/main/parser/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/main/parser/__pycache__/__init__.cpython-311.pyc b/main/parser/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000..bc26a9d Binary files /dev/null and b/main/parser/__pycache__/__init__.cpython-311.pyc differ diff --git a/main/parser/__pycache__/admin.cpython-311.pyc b/main/parser/__pycache__/admin.cpython-311.pyc new file mode 100644 index 0000000..176467e Binary files /dev/null and b/main/parser/__pycache__/admin.cpython-311.pyc differ diff --git a/main/parser/__pycache__/apps.cpython-311.pyc b/main/parser/__pycache__/apps.cpython-311.pyc new file mode 100644 index 0000000..8443a8c Binary files /dev/null and b/main/parser/__pycache__/apps.cpython-311.pyc differ diff --git a/main/parser/__pycache__/models.cpython-311.pyc b/main/parser/__pycache__/models.cpython-311.pyc new file mode 100644 index 0000000..abb423e Binary files /dev/null and b/main/parser/__pycache__/models.cpython-311.pyc differ diff --git a/main/parser/__pycache__/serializers.cpython-311.pyc b/main/parser/__pycache__/serializers.cpython-311.pyc new file mode 100644 index 0000000..9052759 Binary files /dev/null and b/main/parser/__pycache__/serializers.cpython-311.pyc differ diff --git a/main/parser/__pycache__/urls.cpython-311.pyc b/main/parser/__pycache__/urls.cpython-311.pyc new file mode 100644 index 0000000..047183d Binary files /dev/null and b/main/parser/__pycache__/urls.cpython-311.pyc differ diff --git a/main/parser/__pycache__/views.cpython-311.pyc b/main/parser/__pycache__/views.cpython-311.pyc new file mode 100644 index 0000000..2153d3c Binary files /dev/null and b/main/parser/__pycache__/views.cpython-311.pyc differ diff --git a/main/parser/admin.py b/main/parser/admin.py new file mode 100644 index 0000000..929f6ae --- /dev/null +++ b/main/parser/admin.py @@ -0,0 +1,5 @@ +from django.contrib import admin + +from .models import Road + +admin.site.register(Road) diff --git a/main/parser/apps.py b/main/parser/apps.py new file mode 100644 index 0000000..f5a8eaa --- /dev/null +++ b/main/parser/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class ParserConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'parser' diff --git a/main/parser/migrations/0001_initial.py b/main/parser/migrations/0001_initial.py new file mode 100644 index 0000000..d4f42db --- /dev/null +++ b/main/parser/migrations/0001_initial.py @@ -0,0 +1,24 @@ +# Generated by Django 4.2.5 on 2023-09-08 08:47 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='Road', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('title', models.CharField(max_length=100)), + ('image', models.ImageField(upload_to='')), + ('title_text', models.CharField(max_length=100, null=True)), + ('link', models.CharField(max_length=255, null=True)), + ], + ), + ] diff --git a/main/parser/migrations/__init__.py b/main/parser/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/main/parser/migrations/__pycache__/0001_initial.cpython-311.pyc b/main/parser/migrations/__pycache__/0001_initial.cpython-311.pyc new file mode 100644 index 0000000..c1e2eca Binary files /dev/null and b/main/parser/migrations/__pycache__/0001_initial.cpython-311.pyc differ diff --git a/main/parser/migrations/__pycache__/__init__.cpython-311.pyc b/main/parser/migrations/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000..40b64e4 Binary files /dev/null and b/main/parser/migrations/__pycache__/__init__.cpython-311.pyc differ diff --git a/main/parser/models.py b/main/parser/models.py new file mode 100644 index 0000000..3d6d3ec --- /dev/null +++ b/main/parser/models.py @@ -0,0 +1,11 @@ +from django.db import models + + +class Road(models.Model): + title = models.CharField(max_length=100) + image = models.ImageField(upload_to='') + title_text = models.CharField(max_length=100, null=True) + link = models.CharField(max_length=255, null=True) + + def __str__(self): + return self.title diff --git a/main/parser/parser.py b/main/parser/parser.py new file mode 100644 index 0000000..f5ead60 --- /dev/null +++ b/main/parser/parser.py @@ -0,0 +1,49 @@ +import requests +from bs4 import BeautifulSoup as BS +from django.views.decorators.csrf import csrf_exempt + +URL = 'https://www.krsu.edu.kg/' + +HEADERS = { + 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8', + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:107.0) Gecko/20100101 Firefox/107.0' +} + + +@csrf_exempt +def get_html(url, params=''): + req = requests.get(url, headers=HEADERS) + return req + + +@csrf_exempt +def get_data(html): + soup = BS(html, 'html.parser') + items = soup.find_all('div', class_='news-column-block') + movies = [] + + for item in items: + movies.append( + { + 'link': URL + item.find('a').get('href'), + 'title': URL + item.find('a').get('href'), + 'title_text': item.find('div', class_='views-field views-field-field-data-publikacii').find( + 'div').get_text(), + 'image': URL + item.find('div', class_='field-content news-img').find('img').get('src') + } + ) + return movies + + +@csrf_exempt +def parser(): + html = get_html(URL) + if html.status_code == 200: + movies1 = [] + + for page in range(0, 1): + html = get_html(f'https://www.krsu.edu.kg/', params=page) + movies1.extend(get_data(html.text)) + return movies1 + else: + raise Exception('Error in parser func........') \ No newline at end of file diff --git a/main/parser/serializers.py b/main/parser/serializers.py new file mode 100644 index 0000000..c1befab --- /dev/null +++ b/main/parser/serializers.py @@ -0,0 +1,9 @@ +from rest_framework import serializers + +from .models import Road + + +class RoadSerializer(serializers.ModelSerializer): + class Meta: + model = Road + fields = '__all__' diff --git a/main/parser/tests.py b/main/parser/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/main/parser/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/main/parser/urls.py b/main/parser/urls.py new file mode 100644 index 0000000..b6f7a06 --- /dev/null +++ b/main/parser/urls.py @@ -0,0 +1,9 @@ +from django.urls import path + +from .views import ParserItemListView, ParserView + + +urlpatterns = [ + path('list_parser/', ParserItemListView.as_view(), name='parser-list'), + path('create_parser/', ParserView.as_view(), name='parser-list_create'), +] diff --git a/main/parser/views.py b/main/parser/views.py new file mode 100644 index 0000000..8ca64bd --- /dev/null +++ b/main/parser/views.py @@ -0,0 +1,17 @@ +from rest_framework import generics, status +from rest_framework.response import Response +from bs4 import BeautifulSoup as BS + +from .models import Road +from .serializers import RoadSerializer + + +class ParserItemListView(generics.ListCreateAPIView): + queryset = Road.objects.all() + serializer_class = RoadSerializer + + +class ParserView(generics.CreateAPIView): + queryset = Road.objects.all() + serializer_class = RoadSerializer +