Hozirgi kunda axborot va kompyuter texnologiyalari iboralari kundalik turmushda eng ko’p qo’llaniladigan tushunchalar desak mubolag’a bo’lmaydi
FOYDALANILGAN ADABIYOTLAR RO’YXATI
Download 0.85 Mb.
|
Diplom ishi Umarjon oxirgi print tayyor
FOYDALANILGAN ADABIYOTLAR RO’YXATI[1] O’zbеkiston Rеspublikasi Prеzidеntining «Kompyutеrlashtirishni yanada rivojlantirish va axborot kommunikatsiya tеxnologiyalarini joriy etish» to’g’risidagi Farmoni [2] Qosimov S.S. “Axborot texnologiyalari” Texnika oliy o’quv yurti talabalari uchun. Toshkent 2006. [3] IBM РС kompyuterlariga C tili: O’quv qo’llanma А.А. Оbidov, Т.М.Маgrupov; ТDTU.-Т. [4] Bronnikova, T.S. Loyiha biznes-rejasini ishlab chiqish: Darslik / T.S. Bronnikov. - M .: Alfa-M, INFRA-M, 2012. [5] Джамеа Крис “Эффективный самоучитель по креативному Web-дизайну. HTML, XHTML, CSS, JavaScript, PHP, ASP, ActiveX. Текст, графика, звук и анимация.” Пер с англ./Крис Джамса, Конрад Кинг, Энди Андерсон - М.: ООО “ДиаСофтЮП” [6] Tomas Zahreddin Drupal 6 = Das Drupal 6 Praxisbuch. — М.: «Eksmo», 2008. — 432 bet. — ISBN 978-5-699-36219-6 Шувалов М.Г. Основы пожарного дела, М:Стройиздат 1983 [7] https://www.wikipedia.org [8] https://abt.uz/blog/cashback-tizimi [9] https://bank.uz/uz/card/karta-cash-back [10] https://www.developer.android.com [11] https://www.gazeta.uz/oz/2022/01/07/cashback ILOVA from aiogram import executor from loader import dp, db import middlewares, filters, handlers from utils.notify_admins import on_startup_notify from utils.set_bot_commands import set_default_commands from utils.shoppings import new, retro async def on_startup(dispatcher): await db.create() shopping = await db.select_shopping() if not shopping: for shop in retro: await db.add_shopping(shop[0], shop[1], shop[2]) for shop in new: await db.add_shopping(shop[0], shop[1], shop[2]) # Birlamchi komandalar (/star va /help) await set_default_commands(dispatcher) # Bot ishga tushgani haqida adminga xabar berish await on_startup_notify(dispatcher) if __name__ == '__main__': executor.start_polling(dp, on_startup=on_startup) from aiogram import Bot, Dispatcher, types from aiogram.contrib.fsm_storage.memory import MemoryStorage from data import config from utils.db_api.postgresql import Database bot = Bot(token=config.BOT_TOKEN, parse_mode=types.ParseMode.HTML) storage = MemoryStorage() dp = Dispatcher(bot, storage=storage) db = Database() from environs import Env # environs kutubxonasidan foydalanish
# .env fayl ichidan quyidagilarni o'qiymiz BOT_TOKEN = env.str("BOT_TOKEN") # Bot toekn ADMINS = env.list("ADMINS") # adminlar ro'yxati IP = env.str("ip") # Xosting ip manzili DB_USER = env.str("DB_USER") DB_PASS = env.str("DB_PASS") DB_NAME = env.str("DB_NAME") DB_HOST = env.str("DB_HOST") #!/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', 'config.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() from django.contrib import admin # Register your models here.
admin.site.register(User) admin.site.register(Shopping) admin.site.register(Cashback) admin.site.register(Transfer) from django.apps import AppConfig class AppConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'app' from django.db import models # Create your models here.
def __str__(self): return f"{self.id} - {self.telegram_id} - {self.full_name}" class Shopping(models.Model): id = models.AutoField(primary_key=True) check_id = models.BigIntegerField(verbose_name="Chek ID") price = models.IntegerField(verbose_name="Xarid summasi") date = models.CharField(verbose_name="Xarid sanasi", max_length=11) used = models.BooleanField(verbose_name="Cashback olindi", null=True) def __str__(self): return f"{self.id} - {self.check_id} - {self.price}" class Cashback(models.Model): id = models.AutoField(primary_key=True) telegram_id = models.BigIntegerField(verbose_name="Telegram ID") check_id = models.BigIntegerField(verbose_name="Chek ID") price = models.IntegerField(verbose_name="Cashback summasi") date = models.CharField(verbose_name="Cashback sanasi", max_length=11) def __str__(self): return f"{self.id} - {self.telegram_id} - {self.check_id} - {self.price}" class Transfer(models.Model): id = models.AutoField(primary_key=True) telegram_id = models.BigIntegerField(verbose_name="Telegram ID") price = models.IntegerField(verbose_name="O'tkazma summasi") date = models.CharField(verbose_name="O'tkazma sanasi", max_length=11) def __str__(self): return f"{self.id} - {self.telegram_id} - {self.price}" from django.test import TestCase # Create your tests here.
Generated by 'django-admin startproject' using Django 3.2.13. For more information on this file, see
For the full list of settings and their values, see https://docs.djangoproject.com/en/3.2/ref/settings/ """ from pathlib import Path # Build paths inside the project like this: BASE_DIR / 'subdir'.
# Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/3.2/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = 'django-insecure-z4niqok*v78e&7g!umu=+dovytwor9%%5)*$mk%=n=gjjt7))7' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [
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 = 'config.urls' TEMPLATES = [
WSGI_APPLICATION = 'config.wsgi.application' # Database # https://docs.djangoproject.com/en/3.2/ref/settings/#databases DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'cashback_bot', 'USER': 'postgres', 'PASSWORD': '937790876', 'HOST': 'localhost', 'PORT': '5432', } } # https://docs.djangoproject.com/en/3.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/3.2/topics/i18n/ LANGUAGE_CODE = 'en-us' TIME_ZONE = 'UTC' USE_I18N = True USE_L10N = True USE_TZ = True # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/3.2/howto/static-files/ STATIC_URL = '/static/' # Default primary key field type # https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' Download 0.85 Mb. Do'stlaringiz bilan baham: |
ma'muriyatiga murojaat qiling