Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
insights
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
insights
Commits
10b80e19
Commit
10b80e19
authored
Jun 17, 2013
by
Piotr Mitros
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A little bit of scaffolding to make it easier for beginners to get started.
parent
2b4cd5ac
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
1 deletions
+33
-1
example/src/mongolog/mongolog/settings.py
+1
-0
example/src/mongolog/mongolog/static/intro.html
+27
-0
example/src/mongolog/mongolog/urls.py
+1
-1
example/src/mongolog/mongolog/views.py
+4
-0
No files found.
example/src/mongolog/mongolog/settings.py
View file @
10b80e19
...
@@ -167,6 +167,7 @@ INSTALLED_APPS = (
...
@@ -167,6 +167,7 @@ INSTALLED_APPS = (
'django.contrib.sites'
,
'django.contrib.sites'
,
'django.contrib.messages'
,
'django.contrib.messages'
,
'django.contrib.staticfiles'
,
'django.contrib.staticfiles'
,
'mongolog'
,
)
+
DJ_REQUIRED_APPS
)
+
DJ_REQUIRED_APPS
# A sample logging configuration. The only tangible logging
# A sample logging configuration. The only tangible logging
...
...
example/src/mongolog/mongolog/static/intro.html
0 → 100644
View file @
10b80e19
<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>
example/src/mongolog/mongolog/urls.py
View file @
10b80e19
...
@@ -7,7 +7,7 @@ from django.conf.urls import patterns, include, url
...
@@ -7,7 +7,7 @@ from django.conf.urls import patterns, include, url
urlpatterns
=
patterns
(
''
,
urlpatterns
=
patterns
(
''
,
url
(
r'^httpevent$'
,
'djeventstream.httphandler.views.http_view'
),
url
(
r'^httpevent$'
,
'djeventstream.httphandler.views.http_view'
),
# Examples:
# Examples:
#
url(r'^$', 'mongolog.views.home', name='home'),
url
(
r'^$'
,
'mongolog.views.home'
,
name
=
'home'
),
# url(r'^mongolog/', include('mongolog.foo.urls')),
# url(r'^mongolog/', include('mongolog.foo.urls')),
# Uncomment the admin/doc line below to enable admin documentation:
# Uncomment the admin/doc line below to enable admin documentation:
...
...
example/src/mongolog/mongolog/views.py
0 → 100644
View file @
10b80e19
from
django.shortcuts
import
redirect
def
home
(
request
):
return
redirect
(
'/static/intro.html'
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment