article/
...
├── forms.py
├── __init__.py
├── models.py
├── static
│ ├── article
│ └── static_root
├── templates
│ ├── about.html
│ ├── article
│ ├── contact.html
│ └── thanks.html
├── urls.py
└── views.py
forms.py:
from django import forms
class ContactForm(forms.Form):
subject = forms.CharField(max_length=50)
message = forms.CharField(widget=forms.Textarea)
sender = forms.EmailField()
cc_myself = forms.BooleanField(required=False)
views.py:
...
from .forms import ContactForm
from .models import Article
...
Ловлю странную ошибку :
Traceback (most recent call last):
File "/home/danya/PycharmProjects/blog/article/views.py", line 8, in <module>
from .forms import ContactForm
SystemError: Parent module '' not loaded, cannot perform relative import
В чем может быть дело?