1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-01 15:09:14 +00:00

Add notification at info-bar, and fix bug in visiting register/login page when user is already logged in.

This commit is contained in:
xiez
2012-06-04 21:27:32 +08:00
parent 28dbc2ad73
commit f9c72b57a4
17 changed files with 286 additions and 5 deletions

18
notifications/models.py Normal file
View File

@@ -0,0 +1,18 @@
from django.db import models
from django.forms import ModelForm, Textarea
class Notification(models.Model):
message = models.CharField(max_length=512)
primary = models.BooleanField(default=False)
class NotificationForm(ModelForm):
"""
Form for adding notification.
"""
class Meta:
model = Notification
fields = ('message', 'primary')
widgets = {
'message': Textarea(),
}