django-rdkit icon indicating copy to clipboard operation
django-rdkit copied to clipboard

NameError: name 'forms' is not defined

Open taryep opened this issue 6 years ago • 1 comments

Hello, thank you for this project that helped me a lot, I'm using Django 1.11, I recently tried to use a molecule MolField in a django model and I got this error : File "/opt/anaconda/lib/python3.6/site-packages/django_rdkit/models/fields.py", line 89, in formfield defaults = {'form_class': forms.CharField, 'strip': False, 'widget':forms.Textarea} NameError: name 'forms' is not defined

I corrected it by importing forms at the beggining of the file django_rdkit/models/fields.py : from django import forms

Should it be corrected in the git repository ?

taryep avatar Nov 06 '18 10:11 taryep

Thanks a lot for reporting this issue. Indeed this should be solved in the git repository, I'm traveling this week, but I'll try and find a moment when I'm back.

Il giorno mar 6 nov 2018, 11:21 taryep [email protected] ha scritto:

Hello, thank you for this project that helped me a lot, I'm using Django 1.11, I recently tried to use a molecule MolField in a django model and I got this error : File "/opt/anaconda/lib/python3.6/site-packages/django_rdkit/models/fields.py", line 89, in formfield defaults = {'form_class': forms.CharField, 'strip': False, 'widget':forms.Textarea} NameError: name 'forms' is not defined

I corrected it by importing forms at the beggining of the file django_rdkit/models/fields.py : from django import forms

Should it be corrected in the git repository ?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/rdkit/django-rdkit/issues/8, or mute the thread https://github.com/notifications/unsubscribe-auth/AAXYesUnG15s0z2Boqx_K83nhmbJGEtcks5usWKwgaJpZM4YQJfp .

rvianello avatar Nov 06 '18 21:11 rvianello