mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	git-svn-id: http://code.djangoproject.com/svn/django/trunk@6374 bcc190cf-cafb-0310-a4f2-bffc1f526a37
		
			
				
	
	
		
			27 lines
		
	
	
		
			565 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			565 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| """
 | |
| Regression tests for Django built-in views
 | |
| """
 | |
| 
 | |
| from django.db import models
 | |
| from django.conf import settings
 | |
| 
 | |
| class Author(models.Model):
 | |
|     name = models.CharField(max_length=100)
 | |
| 
 | |
|     def __unicode__(self):
 | |
|         return self.name
 | |
| 
 | |
|     def get_absolute_url(self):
 | |
|         return '/views/authors/%s/' % self.id
 | |
| 
 | |
| 
 | |
| class Article(models.Model):
 | |
|     title = models.CharField(max_length=100)
 | |
|     slug = models.SlugField()
 | |
|     author = models.ForeignKey(Author)
 | |
|     date_created = models.DateTimeField()
 | |
|     
 | |
|     def __unicode__(self):
 | |
|         return self.title
 | |
| 
 |