Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange behavior or? #10

Closed
djhojd opened this issue May 17, 2013 · 1 comment
Closed

Strange behavior or? #10

djhojd opened this issue May 17, 2013 · 1 comment

Comments

@djhojd
Copy link

djhojd commented May 17, 2013

# models
class Order(models.Model):
    details = PickledObjectField()

# view
data = {'test': 0}
o = Order.objects.create(details=data)
print o.details # {'test': 0}

data['test'] = 1
print o.details # {'test': 1}

Is the second print result correct?

PS: I'm have under 1year of django/python so maybe I'm missing something here.

@charettes
Copy link
Collaborator

This is the expected behavior since o.details is data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants