Git Product home page Git Product logo

exoruth's Introduction

Blog_NaN

APP (4)

  • Blog
  • Contact
  • User
  • Mainconfig

Proposition de model

app1

#BLOG

class Cathegorie(models.Model):
    titre =  models.CharField(max_length = 255 )

    date_add = models.DateTimeField(auto_now_add = True)
    date_upd = models.DateTimeField(auto_now = True)
    statut = models.BooleanField(default = True)

class Tags(models.Model):
    titre =  models.CharField(max_length = 255 )

    date_add = models.DateTimeField(auto_now_add = True)
    date_upd = models.DateTimeField(auto_now = True)
    statut = models.BooleanField(default = True)

class Article(models.Model):
    auteur =  models.ForeignKey('User', on_delete = models.CASCADE, related_name = 'auteur')
    cathegorie =  models.ForeignKey('Cathegorie', on_delete = models.CASCADE, related_name = 'article_cathegorie')
    titre =  models.CharField(max_length = 255 )
    description =  models.CharField(max_length = 255 )
    contenue =  models.HTMLField()
    image = models.ImageField(upload_to='image/', blank=True)
    image_accueil = models.ImageField(upload_to='image/', blank=True)

    date_add = models.DateTimeField(auto_now_add = True)
    date_upd = models.DateTimeField(auto_now = True)
    statut = models.BooleanField(default = True)

class Commentaire(models.Model):
    article =  models.ForeignKey('Article', on_delete = models.CASCADE, related_name = 'article_commentaire')
    nom =  models.CharField(max_length = 255 )
    email =  models.EmailField(max_length = 255 )
    sujet =  models.CharField(max_length = 255 )
    message =  models.CharField(max_length = 255 )

    date_add = models.DateTimeField(auto_now_add = True)
    date_upd = models.DateTimeField(auto_now = True)
    statut = models.BooleanField(default = True)

app2

#Contact

class Contact(models.Model):
    nom =  models.CharField(max_length = 255 )
    email =  models.EmailField(max_length = 255 )
    sujet =  models.CharField(max_length = 255 )
    message =  models.CharField(max_length = 255 )

    date_add = models.DateTimeField(auto_now_add = True)
    date_upd = models.DateTimeField(auto_now = True)
    statut = models.BooleanField(default = True)

class Newsletter(models.Model):
    email =  models.CharField(max_length = 255 )

    date_add = models.DateTimeField(auto_now_add = True)
    date_upd = models.DateTimeField(auto_now = True)
    statut = models.BooleanField(default = True)
    ````

app3

#User

class User(models.Model):
    nom = models.CharField(max_length=255)
    prenom =models.CharField(max_length=255)
    isMembre =models.BooleanField(default = False)
    photo = models.ImageField(upload_to='profile', default='useravatar.png')
    fb_link=models.URLField(blank=True)
    tw_link=models.URLField(blank=True)
    goo_link=models.URLField(blank=True)
    insta_link=models.URLField(blank=True)
    description =models.CharField(max_length=255, null='True')
    
    date_add = models.DateTimeField(auto_now_add = True)
    date_upd = models.DateTimeField(auto_now = True)
    statut = models.BooleanField(default = True)

app4

#MainConf

class Config(models.Model):
    lien_map =models.CharField(max_length=255)
    logo = models.ImageField(upload_to='profile', default='useravatar.png')
    
    date_add = models.DateTimeField(auto_now_add = True)
    date_upd = models.DateTimeField(auto_now = True)
    statut = models.BooleanField(default = True)
    
 class Header(models.Model):
    nom = models.CharField(max_length=255)
    titre =models.CharField(max_length=255)
    image = models.ImageField(upload_to='header', default='useravatar.png')
    
    date_add = models.DateTimeField(auto_now_add = True)
    date_upd = models.DateTimeField(auto_now = True)
    statut = models.BooleanField(default = True)
    
class Sociaux(models.Model):
    titre = models.CharField(max_length=255)
    icon =models.CharField(max_length=255)
    lien =models.CharField(max_length=255)
    
    date_add = models.DateTimeField(auto_now_add = True)
    date_upd = models.DateTimeField(auto_now = True)
    statut = models.BooleanField(default = True)
    
class Footer(models.Model):
    titre = models.CharField(max_length=255)
    description =models.CharField(max_length=255)
    
    date_add = models.DateTimeField(auto_now_add = True)
    date_upd = models.DateTimeField(auto_now = True)
    statut = models.BooleanField(default = True)
    
class portofolio(models.Model):
    image = models.ImageField(upload_to='profile', default='useravatar.png')
    
    date_add = models.DateTimeField(auto_now_add = True)
    date_upd = models.DateTimeField(auto_now = True)
    statut = models.BooleanField(default = True)

exoruth's People

Contributors

gbane26 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.