Created
          September 20, 2011 15:17 
        
      - 
      
 - 
        
Save gusano/1229379 to your computer and use it in GitHub Desktop.  
    django Model example
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | class Category(models.Model): | |
| """Category for posts""" | |
| name = models.CharField(max_length=50) | |
| has_children = models.BooleanField(default=0) | |
| is_sub = models.BooleanField(default=0) | |
| parent = models.CharField(max_length=50, null=True, blank=True) | |
| position = models.IntegerField() | |
| visible = models.BooleanField(default=1) | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment