1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-12 13:24:52 +00:00

Add file shared link, and modify url viewing file

This commit is contained in:
xiez
2012-07-11 22:39:36 +08:00
parent c3296df1c1
commit d66938cce0
10 changed files with 547 additions and 85 deletions

View File

@@ -1,8 +1,21 @@
import datetime
from django.db import models
class AnonymousShare(models.Model):
"""
Model used for sharing repo to unregistered email.
"""
repo_owner = models.EmailField(max_length=255)
repo_id = models.CharField(max_length=36)
anonymous_email = models.EmailField(max_length=255)
token = models.CharField(max_length=25, unique=True)
class FileShare(models.Model):
"""
Model used for file share link.
"""
username = models.EmailField(max_length=255)
repo_id = models.CharField(max_length=36, db_index=True)
path = models.TextField()
token = models.CharField(max_length=10, unique=True)
ctime = models.DateTimeField(default=datetime.datetime.now)