Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #-*- encoding: utf-8 -*-
- from django.db import models
- from django.contrib.flatpages.models import FlatPage
- from tinymce.widgets import TinyMCE
- class MainIndex(models.Model):
- titre = models.CharField(max_length=50)
- article = models.TextField(widget=TinyMCE(attrs={'cols': 100, 'rows': 200}))
- image = models.ImageField(upload_to='static_media/uploads/', blank=True)
- class Meta:
- model = FlatPage
- def __unicode__(self):
- return self.titre
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement