-
-
Save 0x46616c6b/778697 to your computer and use it in GitHub Desktop.
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
def new_entry(request): | |
format = "json" | |
if ('format' in request.POST): | |
format = request.POST['format'] | |
if ('submit' in request.POST): | |
# gives us a json: { "text" : "Dies ist eine Meldung", "isPublic" : 1 } | |
# entry_text = | |
# entry_isPublic = | |
# entry_published = datetime.now() | |
# -> save | |
def new_pin(request): | |
format = "json" | |
if ('format' in request.POST): | |
format = request.POST['format'] | |
if ('submit' in request.POST): | |
# { "pin" : "123456" } | |
# pin_value = |
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
# coding=utf-8 | |
from django.conf.urls.defaults import * | |
# Uncomment the next two lines to enable the admin: | |
from django.contrib import admin | |
admin.autodiscover() | |
urlpatterns = patterns('', | |
# Example: | |
# (r'^Ticker/', include('Ticker.foo.urls')), | |
(r'^$', 'Ticker.frontend.views.index'), | |
(r'^(?P<pin>\d+)/$', 'Ticker.frontend.views.index'), | |
(r'^manage/$', 'Ticker.frontend.views.manage'), | |
# dont know if this works but I have someting like this wuold be cool: | |
(r'^manage/(?P<action>)/$', 'Ticker.frontend.views.manage', { "action" : action }), | |
(r'^accounts/login/$', 'Ticker.frontend.views.login'), | |
(r'^accounts/logout/$', 'Ticker.frontend.views.logout'), | |
# Uncomment the admin/doc line below and add 'django.contrib.admindocs' | |
# to INSTALLED_APPS to enable admin documentation: | |
# (r'^admin/doc/', include('django.contrib.admindocs.urls')), | |
# Uncomment the next line to enable the admin: | |
(r'^admin/', include(admin.site.urls)), | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment