mirror of
https://github.com/boostorg/website-v2.git
synced 2026-01-19 04:42:17 +00:00
Libraries
This commit is contained in:
0
libraries/__init__.py
Normal file
0
libraries/__init__.py
Normal file
3
libraries/admin.py
Normal file
3
libraries/admin.py
Normal file
@@ -0,0 +1,3 @@
|
||||
from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
||||
6
libraries/apps.py
Normal file
6
libraries/apps.py
Normal file
@@ -0,0 +1,6 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class LibrariesConfig(AppConfig):
|
||||
default_auto_field = 'django.db.models.BigAutoField'
|
||||
name = 'libraries'
|
||||
0
libraries/migrations/__init__.py
Normal file
0
libraries/migrations/__init__.py
Normal file
48
libraries/models.py
Normal file
48
libraries/models.py
Normal file
@@ -0,0 +1,48 @@
|
||||
from django.db import models
|
||||
|
||||
|
||||
class Category(models.Model):
|
||||
"""
|
||||
Library categories such as:
|
||||
- Math and Numerics
|
||||
- Algorithms
|
||||
- etc
|
||||
"""
|
||||
|
||||
name = models.CharField(max_length=100)
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
|
||||
class Library(models.Model):
|
||||
"""
|
||||
Model to represent component Libraries of Boost
|
||||
"""
|
||||
|
||||
name = models.CharField(max_length=100, db_index=True)
|
||||
description = models.TextField(blank=True, null=True)
|
||||
github_url = models.URLField(max_length=500, blank=True, null=True)
|
||||
first_release = models.ForeignKey(
|
||||
"versions.Version",
|
||||
related_name="first_releases",
|
||||
on_delete=models.CASCADE,
|
||||
blank=True,
|
||||
null=True,
|
||||
)
|
||||
cpp_standard_minimum = models.CharField(max_length=50, blank=True, null=True)
|
||||
|
||||
active_development = models.BooleanField(default=True, db_index=True)
|
||||
last_github_update = models.DateTimeField(blank=True, null=True, db_index=True)
|
||||
|
||||
categories = models.ManyToManyField(Category, related_name="libraries")
|
||||
|
||||
authors = models.ManyToManyField("users.User", related_name="authors")
|
||||
maintainers = models.ManyToManyField("users.User", related_name="maintainers")
|
||||
|
||||
closed_prs_per_month = models.IntegerField(blank=True, null=True)
|
||||
open_issues = models.IntegerField(blank=True, null=True)
|
||||
commits_per_release = models.IntegerField(blank=True, null=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
0
libraries/tests/__init__.py
Normal file
0
libraries/tests/__init__.py
Normal file
0
libraries/tests/test_models.py
Normal file
0
libraries/tests/test_models.py
Normal file
3
libraries/views.py
Normal file
3
libraries/views.py
Normal file
@@ -0,0 +1,3 @@
|
||||
from django.shortcuts import render
|
||||
|
||||
# Create your views here.
|
||||
Reference in New Issue
Block a user