Commits

ghorvath committed f4c02c3

BUG: filter missing META Keys. Add restart to fabfile

  • Participants
  • Parent commits 060e4f7

Comments (0)

Files changed (2)

     "updates the haystack search index"
     manage_django('update_index')
 
+@task(task_class=CustomTask)
+def restart():
+    "restarts the apache django daemon"
+    with env.cd(env.directory):
+        env.run('touch ./freieit/apache2/django.wsgi')
 

freieit/views/home.py

     try:
       self.seed = self.request.COOKIES['seed']
     except KeyError:
-      self.seed = "-".join(map(self.request.META.get,
-                               ['HTTP_USER_AGENT',     
-                                'REMOTE_ADDR',
-                                'REMOTE_HOST']))
+      self.seed = "-".join(map(filter(None,
+                                      self.request.META.get,
+                                      ['HTTP_USER_AGENT',     
+                                       'REMOTE_ADDR',
+                                       'REMOTE_HOST'])))
     kwargs['seed'] = self.seed      
     return self.form_class(data, **kwargs)