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:
18
notifications/models.py
Normal file
18
notifications/models.py
Normal 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(),
|
||||
}
|
||||
|
Reference in New Issue
Block a user