1
0
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:
plt
2011-09-10 20:14:08 +08:00
parent ead966c6e2
commit 29b7e1d334
4 changed files with 29 additions and 0 deletions

0
group/__init__.py Normal file
View File

15
group/forms.py Normal file
View 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
View 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
View File

@@ -0,0 +1 @@
# Create your views here.