backup: 2026-04-15 17:59

This commit is contained in:
Dmitry
2026-04-15 17:59:10 +03:00
parent 0aba06e1d2
commit f33ff57a03
11 changed files with 3501 additions and 0 deletions
@@ -1,3 +1,20 @@
from django.contrib import admin
class ChoiceInline(admin.TabularInline):
model = Choice
extra = 2
admin.site.register(Choice)
# Register your models here.
class QuestionAdmin(admin.ModelAdmin):
list_display = ('question_text', 'pub_date')
list_display_links = ('question_text', 'pub_date')
search_fields = ('question_text',)
admin.site.register(Question, QuestionAdmin)
class ChoiceAdmin(admin.ModelAdmin):
list_display = ('choice_text', 'question', 'votes')
list_display_links = ('choice_text', 'question')
search_fields = ('choice_text',)
admin.site.register(Choice, ChoiceAdmin)
@@ -9,3 +9,4 @@ class Choice(models.Model):
question = models.ForeignKey(Question, on_delete=models.CASCADE)
choice_text = models.CharField(verbose_name='Ответ', max_length=200)
votes = models.IntegerField(verbose_name='Количество голосов', default=0)
@@ -0,0 +1,8 @@
from djano.urls import path
urlpatterns = [
# path('', views.index, name='index'),
# path('<int:question_id>/', views.detail, name='detail'),
# path('<int:question_id>/results/', views.results, name='results'),
# path('<int:question_id>/vote/', views.vote, name='vote'),
]
@@ -0,0 +1 @@
3.13
File diff suppressed because one or more lines are too long
+8
View File
@@ -0,0 +1,8 @@
# %%
# %%
# %%
# %%
Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

+10
View File
@@ -0,0 +1,10 @@
[project]
name = "lab3"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.13"
dependencies = [
"jupyterlab>=4.5.6",
"matplotlib>=3.10.8",
]
+1742
View File
File diff suppressed because it is too large Load Diff