-
Notifications
You must be signed in to change notification settings - Fork 1
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
5 changed files
with
117 additions
and
7 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
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,10 +1,11 @@ | ||
from django.conf.urls import patterns, url | ||
|
||
from .views import RoomsView, CreateRoomView, RoomView | ||
from .views import RoomsView, CreateRoomView, RoomView, EnrollRoomView | ||
|
||
urlpatterns = patterns( | ||
'', | ||
url(r'^$', RoomsView.as_view(), name='index'), | ||
url(r'^create/', CreateRoomView.as_view(), name='create'), | ||
url(r'^(?P<slug>[-\w]+)/', RoomView.as_view(), name='room'), | ||
url(r'^create/$', CreateRoomView.as_view(), name='create'), | ||
url(r'^(?P<slug>[-\w]+)/$', RoomView.as_view(), name='room'), | ||
url(r'^(?P<slug>[-\w]+)/check/$', EnrollRoomView.as_view(), name='check'), | ||
) |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{% extends "base.html" %} | ||
{% load crispy_forms_tags %} | ||
{% block title %}Rooms | Enroll{% endblock title %} | ||
{% block content %} | ||
<div class="row"> | ||
<div class="col-sm-6 col-sm-offset-3"> | ||
<h1>{{ room.name }}</h1> | ||
<hr> | ||
{% crispy form %} | ||
</div> | ||
</div> | ||
{% endblock content %} |
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,15 @@ | ||
{% extends "base.html" %} | ||
{% load crispy_forms_tags %} | ||
{% block title %}Chats | {{ room.name }}{% endblock title %} | ||
{% block content %} | ||
<div class="row"> | ||
<div class="col-sm-6 col-sm-offset-3"> | ||
{% for m in messages %} | ||
<h4>{{ m.user.username }}</h4> | ||
<p>{{ m }}</p> | ||
<hr> | ||
{% endfor %} | ||
{% crispy form %} | ||
</div> | ||
</div> | ||
{% endblock content %} |