Commits

offline committed 38f5cb8

bugfix

Comments (0)

Files changed (4)

 \.pyc$
+django_flashcookie.egg-info
+dist
+build

flashcookie/context_processors.py

 
 def flash_context(request):
     flash = None
-    if 'djangoflashcookie' in request.COOKIES:
-        flash = simplejson.loads(request.COOKIES['djangoflashcookie'])
+    if 'flashcookie' in request.COOKIES:
+        flash = simplejson.loads(request.COOKIES['flashcookie'])
     return {'flash': flash}

flashcookie/middleware.py

         serialize data to json and put it in coockies
         """
         data = simplejson.dumps(request.flash)
-        response.set_cookie('djangoflashcookie', data)
+        response.set_cookie('flashcookie', data)
 
     def process_request(self, request):
         """
         if request.flash have data, put it to cookies,
         delete previous cookie if no data in request.flash
         """
-        if hasattr(request, 'djangoflashcookie') and len(request.flash):
+        if hasattr(request, 'flash') and len(request.flash):
             self._set_messages(request, response)
         else:
-            response.delete_cookie('djangoflashcookie')
+            response.delete_cookie('flashcookie')
         return response
 from setuptools import setup, find_packages
 setup(
     name = "django-flashcookie",
-    version = "0.1.2",
+    version = "0.1.3",
     packages = find_packages(),
     author = "Anderson",
     author_email = "self.anderson@gmail.com",