Advertisement
Guest User

Untitled

a guest
Aug 18th, 2018
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. from django.db import models
  2. class Entries(models.Model):
  3. entries = models.CharField(max_length=200)
  4. text = models.TextField()
  5. def get_absolute_url(self):
  6. """Returns the url to access af particular instance of the model."""
  7. return reverse('model-detail-view', args=[str(self.id)])
  8.  
  9.  
  10.  
  11.  
  12.  
  13. # Create your models here.
  14. def __str__(self):
  15. return self.entries
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement