title: Django - How can i limit the number of objects that a user can create?
body: <p>(first of all sorry for my bad English)</p>
  
  <p>I need to know if i can limit the number of objects that a user can create in a specific model, taking the number of object admitted to create from the user profile.</p>
  
  <p>I go to try to explain this. i have this model</p>
  
  <pre><code>class StoreBranchOffice(models.Model):
  store = models.ForeignKey(
          StoreBranchOffice,
          verbose_name=_('store branch')
      )
  name = models.CharField(
          max_length=30,
          verbose_name=_('name'),
      )
  email = models.EmailField(
          blank=True,
          verbose_name=_('email'),
      )
  phone = models.CharField(
          max_length=15,
          verbose_name=_('phone'),
          )
  address = models.CharField(
          max_length=100,
          verbose_name=_('address'),
      )
  </code></pre>
  
  <p>User Profile Model</p>
  
  <pre><code>class UserProfile(models.Model):
      # Relations
      user = models.OneToOneField(
              User,
              verbose_name=_('User'),
          )
      store_branch = models.ForeignKey(
              Store,
              verbose_name=_('Store'),
          )
      # Attributes - Mandatory
      level = models.IntegerField(
              choices=LEVEL_CHOICES,
              default=1,
              verbose_name=_('Level'),
          )
      stores_enable = models.BooleanField(
              default=True,
              verbose_name=_('Stores Enable'),
          )
      branch_max = models.IntegerField(
                  default=1,
                  verbose_name=_('branches admited')
          )
  </code></pre>
  
  <p>Well, in the userprofile, i have a field that have the number of branch office admitted for the user... 
  Well i need to check if the user try to create a branch office, if have admitted create branch office or if the user already have the maximum of branch offices admitted!</p>
  
  <p>Thanks very much!!!</p>