mirror of
				https://github.com/django/django.git
				synced 2025-10-26 23:26:08 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			28 lines
		
	
	
		
			600 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
		
			600 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| from django.db import models
 | |
| 
 | |
| 
 | |
| class Event(models.Model):
 | |
|     dt = models.DateTimeField()
 | |
| 
 | |
| 
 | |
| class MaybeEvent(models.Model):
 | |
|     dt = models.DateTimeField(blank=True, null=True)
 | |
| 
 | |
| 
 | |
| class Session(models.Model):
 | |
|     name = models.CharField(max_length=20)
 | |
| 
 | |
| 
 | |
| class SessionEvent(models.Model):
 | |
|     dt = models.DateTimeField()
 | |
|     session = models.ForeignKey(Session, models.CASCADE, related_name='events')
 | |
| 
 | |
| 
 | |
| class Timestamp(models.Model):
 | |
|     created = models.DateTimeField(auto_now_add=True)
 | |
|     updated = models.DateTimeField(auto_now=True)
 | |
| 
 | |
| 
 | |
| class AllDayEvent(models.Model):
 | |
|     day = models.DateField()
 |