Merge branch 'main' of https://github.com/dm1sh/porridger_tmp
This commit is contained in:
commit
dfe1f90748
@ -1,6 +1,6 @@
|
||||
from .models import Poems
|
||||
from .db import database
|
||||
|
||||
to_delete = database.query(Poems).filter(Poems.id > 102)
|
||||
to_delete = database.query(Poems).filter(Poems.id > 110)
|
||||
database.delete(to_delete)
|
||||
database.commit()
|
||||
|
@ -9,7 +9,7 @@ import datetime
|
||||
# Загружаем стихи
|
||||
def add_poems_to_db(db: Session):
|
||||
f1 = open('text121.txt', encoding='utf-8', mode='r')#открыть фаил для чтения на русском
|
||||
for a in range(1, 102):
|
||||
for a in range(1, 110):
|
||||
f1.seek(0)#перейти к началу
|
||||
i=0
|
||||
str1 = ""
|
||||
|
Loading…
x
Reference in New Issue
Block a user