-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
102 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from django.contrib import admin | ||
from django.contrib.auth import get_user_model | ||
from models import Event | ||
|
||
|
||
class EventAdmin(admin.ModelAdmin): | ||
class Meta(): | ||
model = Event | ||
#fields = ("timestamp", "user", 'type', 'message') | ||
list_display = ("timestamp", "user", 'type', 'message') | ||
|
||
admin.site.register(Event, EventAdmin) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,12 @@ | ||
from django.db import models | ||
from django.conf import settings | ||
from django.contrib.auth import get_user_model | ||
|
||
# Create your models here. | ||
|
||
class Event(models.Model): | ||
timestamp = models.DateTimeField(auto_now=True) | ||
type = models.TextField(choices=( | ||
("chat", "Chat"), ("other", "Other")) | ||
) | ||
message = models.TextField() | ||
user = models.ForeignKey(get_user_model()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from django.conf import settings | ||
from django.conf.urls import patterns, include, url | ||
from views import StreamView, ChatSendView, HistoryView | ||
|
||
urlpatterns = patterns('', | ||
url(r'^$', StreamView.as_view(), name='activity_stream'), | ||
url(r'^send$', ChatSendView.as_view(), name='activity_send'), | ||
url(r'^history$', HistoryView.as_view(), name='activity_history'), | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,26 @@ | ||
[ | ||
{ | ||
"pk": 1, | ||
"model": "rpg.hero", | ||
"fields": { | ||
"username": "admin", | ||
"first_name": "", | ||
"last_name": "", | ||
"titles": [], | ||
"groups": [], | ||
"credits": 0, | ||
"is_active": true, | ||
"is_superuser": true, | ||
"is_staff": true, | ||
"last_login": "2013-08-14T16:31:42.360Z", | ||
"exp": 0, | ||
"user_permissions": [], | ||
"guilds": [], | ||
"password": "pbkdf2_sha256$10000$iBN5bF7Ds5PY$Rz7LO1HT5zLYc6ciwM7GvHiAgJ0sZURyDSc9xWZ8n48=", | ||
"email": "[email protected]", | ||
"date_joined": "2013-08-14T13:02:56.435Z" | ||
} | ||
}, | ||
{ | ||
"pk": 1, | ||
"model": "rpg.guild", | ||
|
@@ -48,27 +70,5 @@ | |
"fields": { | ||
"exp": 150 | ||
} | ||
}, | ||
{ | ||
"pk": 1, | ||
"model": "rpg.hero", | ||
"fields": { | ||
"username": "admin", | ||
"first_name": "", | ||
"last_name": "", | ||
"titles": [], | ||
"groups": [], | ||
"credits": 0, | ||
"is_active": true, | ||
"is_superuser": true, | ||
"is_staff": true, | ||
"last_login": "2013-08-14T16:31:42.360Z", | ||
"exp": 0, | ||
"user_permissions": [], | ||
"guilds": [], | ||
"password": "pbkdf2_sha256$10000$iBN5bF7Ds5PY$Rz7LO1HT5zLYc6ciwM7GvHiAgJ0sZURyDSc9xWZ8n48=", | ||
"email": "[email protected]", | ||
"date_joined": "2013-08-14T13:02:56.435Z" | ||
} | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters