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

Doesnt seem to work in Django 2 #10

Open
sanderbrauwers opened this issue Mar 8, 2018 · 6 comments
Open

Doesnt seem to work in Django 2 #10

sanderbrauwers opened this issue Mar 8, 2018 · 6 comments

Comments

@sanderbrauwers
Copy link

No description provided.

@brad
Copy link
Member

brad commented Mar 8, 2018

@sanderbrauwers Thank you for the report

@piotrbulinski
Copy link

I'm successfully using it with Django 2.0.6. Please provide a way to reproduce the problem, otherwise I think this can be closed.

@youngminz
Copy link

I am using it in a production environment using Python 3.7.1 and Django 2.1.4, and I am using it without any problems.

@sevdog
Copy link

sevdog commented Mar 21, 2019

I also can confirm its working on Python 3.6.8 and Django 2.1.7.

However, IMHO, an update to this package may be needed since last release is becoming outdated.

@brad
Copy link
Member

brad commented May 10, 2019

Hey everyone, please try version 0.6

@mattdodge
Copy link

This is still an issue on version 0.6 for me. The issue seems to be surrounding saving bytes to an EncryptedTextField. I'm not 100% sure this is the issue the OP is talking about but I can reproduce with Django 2.2.12 and django-fernet-fields 0.6

Sample Model file

from django.db import models
from fernet_fields import EncryptedTextField

class SampleModel(models.Model):
    text = EncryptedTextField(null=True)

Reproduce script

>>> sample = SampleModel.objects.create(text="data".encode())
>>> sample.text
b'data'
>>> sample.refresh_from_db()
>>> sample.text
"b'data'"

Notice that after refreshing from the DB we've lost the type of bytes and instead we have a string with the byte prefix. I suspect this is related to #22 as well.

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

No branches or pull requests

6 participants