backup: 2026-04-15 17:59
This commit is contained in:
@@ -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
@@ -0,0 +1,8 @@
|
||||
# %%
|
||||
|
||||
# %%
|
||||
|
||||
|
||||
# %%
|
||||
|
||||
# %%
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 54 KiB |
@@ -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",
|
||||
]
|
||||
Generated
+1742
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Reference in New Issue
Block a user