Commits

Nattaphoom Ch. committed 114e8b3

Try to do subdomain for API and add keydown callback for updateCountdown
method too (inspired by Twitter again).

Comments (0)

Files changed (3)

myproject/settings.py

 DEBUG = True
 TEMPLATE_DEBUG = DEBUG
 
-
 EMAIL_HOST = 'smtp.webfaction.com'
 EMAIL_HOST_USER = 'attomos'
 EMAIL_HOST_PASSWORD = 'bookatom2144'
     # 'django.middleware.clickjacking.XFrameOptionsMiddleware',
     'tracking.middleware.VisitorCleanUpMiddleware',
     'tracking.middleware.UserRestrictMiddleware',
+    'subdomains.middleware.SubdomainURLRoutingMiddleware',
 )
 
 ROOT_URLCONF = 'myproject.urls'
+SUBDOMAIN_URLCONFS = {
+    None: ROOT_URLCONF,
+    'api': 'api.urls',
+}
 
 # Python dotted path to the WSGI application used by Django's runserver.
 WSGI_APPLICATION = 'myproject.wsgi.application'

templates/misscall_message.html

                 updateCountdown();
                 $('#message_body').change(updateCountdown);
                 $('#message_body').keyup(updateCountdown);
+                $('#message_body').keydown(updateCountdown);
 
                 $('.reply-missedcall').click(function() {
                     var recipient = $(this).data('recipient');

templates/sendmessage.html

                 updateCountdown();
                 $('#message_body').change(updateCountdown);
                 $('#message_body').keyup(updateCountdown);
+                $('#message_body').keydown(updateCountdown);
 
 				
 				$('#input_date').datepicker();