Skip to content
This repository has been archived by the owner on May 20, 2019. It is now read-only.

Commit

Permalink
A little bit of scaffolding to make it easier for beginners to get st…
Browse files Browse the repository at this point in the history
…arted.
  • Loading branch information
Piotr Mitros committed Jun 17, 2013
1 parent 2b4cd5a commit 10b80e1
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 1 deletion.
1 change: 1 addition & 0 deletions example/src/mongolog/mongolog/settings.py
Expand Up @@ -167,6 +167,7 @@
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'mongolog',
) + DJ_REQUIRED_APPS

# A sample logging configuration. The only tangible logging
Expand Down
27 changes: 27 additions & 0 deletions example/src/mongolog/mongolog/static/intro.html
@@ -0,0 +1,27 @@
<html>
<head><title>It's running!</title></head>
<body>
<h1> The example application is running. Next steps: </h1>
<p> Send an event to the database (the sendevent script is in src/sendevent/):
<pre> python sendevent.py localhost:8000 /httpevent actor=bob action=submitanswer object=problem5
</pre>
<p> Connect to the database, and see what events are there:
<pre>
$ mongo
MongoDB shell version: 2.0.4
connecting to: test
> show dbs
...
modules_dump_to_db
...
> use modules_dump_to_db
switched to db modules_dump_to_db
> show collections
event_log
system.indexes
> db.event_log.find()

[ should show all events sent to database ]
</pre>
</body>
</html>
2 changes: 1 addition & 1 deletion example/src/mongolog/mongolog/urls.py
Expand Up @@ -7,7 +7,7 @@
urlpatterns = patterns('',
url(r'^httpevent$', 'djeventstream.httphandler.views.http_view'),
# Examples:
# url(r'^$', 'mongolog.views.home', name='home'),
url(r'^$', 'mongolog.views.home', name='home'),
# url(r'^mongolog/', include('mongolog.foo.urls')),

# Uncomment the admin/doc line below to enable admin documentation:
Expand Down
4 changes: 4 additions & 0 deletions example/src/mongolog/mongolog/views.py
@@ -0,0 +1,4 @@
from django.shortcuts import redirect

def home(request):
return redirect('/static/intro.html')

0 comments on commit 10b80e1

Please sign in to comment.