Advertisement
Guest User

Untitled

a guest
Jul 26th, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.49 KB | None | 0 0
  1. #-*- encoding: utf-8 -*-
  2. from django.db import models
  3. from django.contrib.flatpages.models import FlatPage
  4. from tinymce.widgets import TinyMCE
  5.  
  6. class MainIndex(models.Model):
  7.     titre = models.CharField(max_length=50)
  8.     article = models.TextField(widget=TinyMCE(attrs={'cols': 100, 'rows': 200}))
  9.     image = models.ImageField(upload_to='static_media/uploads/', blank=True)
  10.    
  11.     class Meta:
  12.         model = FlatPage    
  13.    
  14.     def __unicode__(self):
  15.         return self.titre
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement