mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-05 00:43:53 +00:00
Add group app
This commit is contained in:
0
group/__init__.py
Normal file
0
group/__init__.py
Normal file
15
group/forms.py
Normal file
15
group/forms.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from django import forms
|
||||
from models import GroupRepo
|
||||
|
||||
|
||||
class GroupAddRepoForm(forms.Form):
|
||||
"""
|
||||
Form for adding repo to a group.
|
||||
|
||||
"""
|
||||
|
||||
repo_id = forms.CharField(max_length=36)
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(GroupAddRepoForm, self).__init__(*args, **kwargs)
|
||||
|
13
group/models.py
Normal file
13
group/models.py
Normal file
@@ -0,0 +1,13 @@
|
||||
from django.db import models
|
||||
|
||||
# Create your models here.
|
||||
|
||||
class GroupRepo(models.Model):
|
||||
"""A repo shared to a group."""
|
||||
|
||||
group_id = models.CharField(max_length=36)
|
||||
repo_id = models.CharField(max_length=36)
|
||||
repo_location = models.CharField(max_length=40, blank=True)
|
||||
|
||||
class Meta:
|
||||
unique_together = ("group_id", "repo_id")
|
1
group/views.py
Normal file
1
group/views.py
Normal file
@@ -0,0 +1 @@
|
||||
# Create your views here.
|
Reference in New Issue
Block a user