Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class mymodel(models.Model):
- foo = models........
- def get_cname(self):
- class_name = ....
- return class_name
- class mymodel(models.Model):
- foo = models........
- def get_cname(self):
- class_name = ....
- return class_name
- {% for obj in objects %}
- <div class="{{obj.get_cname}}">
- ..
- </div>
- {% endfor }}
Add Comment
Please, Sign In to add comment