a guest Aug 18th, 2018 78 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- from django.db import models
- class Entries(models.Model):
- entries = models.CharField(max_length=200)
- text = models.TextField()
- def get_absolute_url(self):
- """Returns the url to access af particular instance of the model."""
- return reverse('model-detail-view', args=[str(self.id)])
- # Create your models here.
- def __str__(self):
- return self.entries
RAW Paste Data