Commit 67bbe465 authored by Benoit Alessandroni's avatar Benoit Alessandroni

Initial commit to the data repository

image: python:3.6
- test
- release
stage: test
- echo 'Make your tests here !'
- master
- sib
stage: release
- git config "${GITLAB_USER_NAME}"
- git config "${GITLAB_USER_EMAIL}"
- git remote set-url origin "https://gitlab-ci-token:${GL_TOKEN}${CI_PROJECT_PATH}.git"
- pip install git+
- pip install sib-commit-parser
- semantic-release publish
- master
- sib
# CoopStarter Application data repository
This project is a Python module, compatible with Django REST Framework and DjangoLDP additional module, describing the models and the API needed and available on the future coopstarter application.
## installation
`pip install sib-manager`
`sib startproject mysite -m coopstarter_data`
## run project
`cd mysite`
`python runserver`
__version__ = '0.1.0'
\ No newline at end of file
from django.contrib import admin
from .models import Faq, Collective, Testimony, Event
\ No newline at end of file
from django.apps import AppConfig
class CoopstarterConfig(AppConfig):
name = 'coopstarter'
from django.db import models
from djangoldp.models import Model
class Faq (Model):
question = models.TextField(verbose_name="Question")
answer = models.TextField(verbose_name="Réponse")
category = models.CharField(max_length=50, blank=True, null=True, verbose_name="Catégorie de question")
def __str__(self):
return self.question
class Collective (Model):
name = models.CharField(max_length=50, verbose_name="Nom")
email = models.CharField(max_length=50, verbose_name="Mail")
website = models.CharField(max_length=50, blank=True, null=True, verbose_name="Site web")
facebook = models.CharField(max_length=50, blank=True, null=True, verbose_name="Lien Facebook")
twitter = models.CharField(max_length=50, blank=True, null=True, verbose_name="Lien Twitter")
def __str__(self):
class Testimony (Model):
name = models.CharField(max_length=50, verbose_name="Nom de l'indépendant")
statut = models.CharField(max_length=50, verbose_name="Statut")
porteur = models.BooleanField(default=False, verbose_name="Porteur de cellule")
img = models.ImageField(blank=True, null=True, verbose_name="Photo")
def __str__(self):
class Event (Model):
name = models.CharField(max_length=50, verbose_name="Nom de l'évènement")
city = models.CharField(max_length=50, verbose_name="Ville")
type = models.CharField(max_length=10, choices=(('apero', 'Apéro'), ('coworking', 'Coworking'),('coliving', 'Coliving'),('other', 'Autre') ), verbose_name="Type d'évènement")
startdate = models.DateTimeField(verbose_name="Date et heure de début")
enddate = models.DateTimeField(verbose_name="Date et heure de fin")
img = models.ImageField(blank=True, null=True, verbose_name="Illustration de l'évènement")
address = models.CharField(max_length=225, blank=True, null=True, verbose_name="Adresse")
description = models.TextField(verbose_name="Description")
link = models.CharField(max_length=50, blank=True, null=True, verbose_name="Lien internet")
facebook = models.CharField(max_length=50, blank=True, null=True, verbose_name="Lien Facebook")
def __str__(self):
from django.test import TestCase
# Create your tests here.
name = coopstarter
# points to the variable in the code
version = attr: hd_data.__version__
description = CoopStarter Application
long_description = file:
license = MIT
classifiers =
Programming Language :: Python :: 3
packages = find:
version_source = tag
# points to the variable in the code
version_variable = coopstarter/
commit_parser = commit_parser.parse
#!/usr/bin/env python
"""Setup script."""
from setuptools import setup
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment