Skip to content

Commit

Permalink
Update django2.md
Browse files Browse the repository at this point in the history
  • Loading branch information
DonatasNoreika authored Jan 22, 2024
1 parent 09f3d4b commit 4f0027d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Django/MDs2/django2.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Django turi nuosavą ORM sistemą, kuri skiriasi nuo SQLAlchemy. Savo aplikacijo
from django.db import models

class Genre(models.Model):
name = models.CharField('Pavadinimas', max_length=200, help_text='Įveskite knygos žanrą (pvz. detektyvas)')
name = models.CharField(verbose_name="Pavadinimas", max_length=200, help_text='Įveskite knygos žanrą (pvz. detektyvas)')

def __str__(self):
return self.name
Expand All @@ -39,11 +39,11 @@ from django.urls import reverse #Papildome imports

class Book(models.Model):
"""Modelis reprezentuoja knygą (bet ne specifinę knygos kopiją)"""
title = models.CharField('Pavadinimas', max_length=200)
author = models.ForeignKey('Author', on_delete=models.SET_NULL, null=True)
summary = models.TextField('Aprašymas', max_length=1000, help_text='Trumpas knygos aprašymas')
isbn = models.CharField('ISBN', max_length=13, help_text='13 Simbolių <a href="https://www.isbn-international.org/content/what-isbn">ISBN kodas</a>')
genre = models.ManyToManyField(Genre, help_text='Išrinkite žanrą(us) šiai knygai')
title = models.CharField(verbose_name='Pavadinimas', max_length=200)
author = models.ForeignKey(to='Author', verbose_name="Autorius", on_delete=models.SET_NULL, null=True)
summary = models.TextField(verbose_name='Aprašymas', max_length=1000, help_text='Trumpas knygos aprašymas')
isbn = models.CharField(verbose_name='ISBN', max_length=13, help_text='13 Simbolių <a href="https://www.isbn-international.org/content/what-isbn">ISBN kodas</a>')
genre = models.ManyToManyField(to="Genre", help_text='Išrinkite žanrą(us) šiai knygai')

def __str__(self):
return self.title
Expand Down

0 comments on commit 4f0027d

Please sign in to comment.