From → To | Expression |
---|
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
# Read more at http://www.pindi.us/blog/migrating-cross-domain-cookies-django | |
from django.conf import settings | |
from importlib import import_module | |
class UpdateSessionCookieMiddleware(object): | |
""" | |
Migrates session data from an old (hardcoded) session cookie name and domain to the name and | |
domain currently defined in the Django settings. | |
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
val a = ListBuffer(1, 2, 3) | |
val b = a.toIterable.asInstanceOf[List[Int]] | |
// List(1, 2, 3) | |
a.append(4, 5, 6) | |
b | |
// List(1, 2, 3, 4, 5, 6) |