Re: WYSIWYG editor, file browser and multiple users

2017-07-28 Thread Avery Uslaner
It sounds like Wagtail would fit your needs but from 
where you are now it seems like it might be easier just to extend your 
existing models to include permissions on a per-image basis.

On Friday, July 28, 2017 at 7:37:56 AM UTC-6, Karol Bujaček wrote:
>
> Hello, 
>
> I’m trying to install WYSIWYG editor and file browser which allows user 
> to upload images. Then these images can be inserted into users article. 
> I also have multiple users registered on my site and I need 
> separate/hide one users’ images from another user. 
>
> Using django-tinymce4-lite [1] and django-filebrowser-no-grappelli [2] 
> I’m able to achieve “half of the work”: I can upload any image and embed 
> it into nice WYSIWIG TinyMCE interface. However, I’m not able to limit 
> access to the images and all users can access/view/delete/… any image. 
>
> I will be glad if somebody can suggest any information, help or tips. 
> TinyMCE and something like mentioned filebrowser are highly appreciated, 
> but these two applications are not strictly necessary. 
>
>
> Thanks. 
>
> Karol 
>
>
> [1] https://github.com/romanvm/django-tinymce4-lite 
> [2] https://github.com/smacker/django-filebrowser-no-grappelli 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/93c8d3ba-bc0f-447b-bba2-4885d7df9fe0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Django form needs pagination and saved data - how????

2017-07-28 Thread Jim Illback
I use the latest versions of Django, python, bootstrap3, and crispy forms for 
this project.

I am trying to present a list of flashcards to a user, sorted by category 
(e.g., Math, Vocabulary, etc.). Then, I want the user to check either the full 
category or individual flashcards to be added to their practice account.

To maintain user inputted checkboxes on multiple pages, I must use POST. But, 
pagination only uses GET. So, a hack on pagination is to wrap the Next/Previous 
buttons in a sub-form and POST using the buttons. This works for pagination, 
but then my normal “I’m done, submit this session and process the updates” 
button - my submit button - does nothing: no GET, no POST, nothing.

How can I enable pagination, multiple screen data accumulation across pages, 
and final submission of the session when complete?

Just FYI - for me, session data and hidden forms haven’t worked because the 
data doesn’t come back to the Django server. So, request.POST.get(‘CAT') 
returns NULL even though the web page has a value in the tag ‘CAT’. Session 
data doesn’t work because I can’t get the data to the server.

Here are sub-sections of my code. The “hidden” fields (cat and crd) are visible 
during my testing. They are filled with the IDs of any/all selected categories 
(cat) or flashcards (crd) - comma separated.

Views.py:
class CardsCreate(TemplateView):
template_name = 'sel_cards_add.html'
model = FlashCard

def dispatch(self, request, *args, **kwargs):
print('DISPATCH:')
student_id = kwargs.get('student_id')

try:
flashcards = FlashCard.objects.all().order_by('category', 'front')
except FlashCard.DoesNotExist:
flashcards = None
except Exception as e:
print('type=%s args=%s (%s)' % (type(e), e.args, e))
raise Http404

flashcard_paginator = paginator.Paginator(flashcards, 2)
try:
page = int(request.GET.get('page', '1'))
except ValueError:
page = 1
try:
flashcards = flashcard_paginator.page(page)
except (paginator.EmptyPage, paginator.InvalidPage):
flashcards = flashcard_paginator.page(flashcard_paginator.num_pages)

context = {'flashcards': flashcards, 'id': student_id, 'title': 
'Available Flashcards By Category'}
print('End of DISPATCH:')
return render(request, self.template_name, context)

Template (sel_cards_add.html):
{% extends 'base.html' %}
{% load crispy_forms_tags %}


{% block content %}
{% csrf_token %}


  


{{ title }}
{% for flashcard in flashcards %}
{% ifchanged flashcard.category %}

   Category:  {{ flashcard.category 
}}


  Select?
  Flashcard
  Answer
  Easy Factor

{% endifchanged %}


{{ flashcard.front }}
{{ flashcard.answer }}
{{ flashcard.easy_factor }}

{% empty %}
No flashcards to select 
yet.
{% endfor %}




  



{% if flashcards.has_previous %}


 {% csrf_token %}
Previous

{% endif %}

Page {{ flashcards.number }} of {{ 
flashcards.paginator.num_pages }}

{% if flashcards.has_next %}


 {% csrf_token %}
Next

{% endif %}




Add Selections to 
User
  
Cancel
  
  

http://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js";>


  function chkcat(element) {
  var x = $(element).attr('name');
  var num = x.substring(6,12);
  var categorys = document.getElementById("cat").value;
  var array = strToArray(categorys);
  var checked = document.getElementsByName(x)[0].checked;
  if (checked) {
  if ((array.indexOf(num)) == -1) {
  array.push(num.concat(","));
  }
  }
  else {
  array = valueRemove(num,array);
  }
  document.getElementById("cat").value = array;
  }

  function chkid(element) {
  var x = $(element).attr('name');
  var num = x.substring(5,11);
  var cards = document.getElementById("crd").value;
  var array = strToArray(cards);
  var checked = document.getElementsByName(x)[0].checked;
  if (checked) {
  if ((array.indexOf(num)) == -1) {
  array.push(num.concat(","));
  }
  }
  else {
  array = valueRemove(num,array);
  }
  document.getElementById("crd").value = array;
  }


Re: Run Django tasks with another programming language

2017-07-28 Thread Jani Tiainen
Hi.

I greatly suspect that your problem isn't the Python itself but what you do
in your workers.

Also what analysis made you to conclusion that using golang or c# would
improve situation? In other words have you really measured and identified
the slow part?


28.7.2017 19.21 "M Mihai" <1497mi...@gmail.com> kirjoitti:

> Hi,
>
> Right now I use https://github.com/Koed00/django-q and as broker, I use
> Redis to run some tasks on my Django website, but they're using 100% of the
> processor when I'm running 30 workers.
>
> So I'm looking for a way to run the tasks with another programing
> language(I would prefer golang or c#) and just update the database from
> python after the tasks were processed until now I've found only this
> package for golang: https://github.com/gocelery/gocelery but I was unable
> to make this work.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/c256b5fa-b3d9-4386-bfca-39ebf745c793%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAHn91oeQQ_uYcjR6Sxnp1vE6YH9Mx_CBTM%2BCOEPG%3DFO%3DfX7e_g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Run Django tasks with another programming language

2017-07-28 Thread M Mihai
Hi,

Right now I use https://github.com/Koed00/django-q and as broker, I use 
Redis to run some tasks on my Django website, but they're using 100% of the 
processor when I'm running 30 workers. 

So I'm looking for a way to run the tasks with another programing 
language(I would prefer golang or c#) and just update the database from 
python after the tasks were processed until now I've found only this 
package for golang: https://github.com/gocelery/gocelery but I was unable 
to make this work.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/c256b5fa-b3d9-4386-bfca-39ebf745c793%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


WYSIWYG editor, file browser and multiple users

2017-07-28 Thread Karol Bujaček

Hello,

I’m trying to install WYSIWYG editor and file browser which allows user 
to upload images. Then these images can be inserted into users article. 
I also have multiple users registered on my site and I need 
separate/hide one users’ images from another user.


Using django-tinymce4-lite [1] and django-filebrowser-no-grappelli [2] 
I’m able to achieve “half of the work”: I can upload any image and embed 
it into nice WYSIWIG TinyMCE interface. However, I’m not able to limit 
access to the images and all users can access/view/delete/… any image.


I will be glad if somebody can suggest any information, help or tips. 
TinyMCE and something like mentioned filebrowser are highly appreciated, 
but these two applications are not strictly necessary.



Thanks.

Karol


[1] https://github.com/romanvm/django-tinymce4-lite
[2] https://github.com/smacker/django-filebrowser-no-grappelli

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/92948c21-acf0-fc53-6828-f4d8882ba8a7%40fossilgroup.net.
For more options, visit https://groups.google.com/d/optout.


how to get user's informations by clic on the user_object in a user_list view

2017-07-28 Thread vitalysweb


I'm beginner in django, what i'm trying to do is:

I want to build a view for a *Staff_User*. Inside this view the staff 
member can select a user (from a *list of users*) and by clic that lets him 
get some informations(Specifically check some files uploaded by the 
selected user)

some of my code :

models.py

from django.db import modelsfrom django.contrib.auth.models import Userfrom 
django.db.models.signals import post_savefrom django.dispatch import receiver
class Profile(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE)
birth_date = models.DateField(('Date de Naissance'), null=True, 
 blank=True)
phone_number = models.IntegerField(('N° de Téléphone'), null=True, 
   blank=True)
profile_completed = models.BooleanField(('Profile completé'), 
default=False)#DOCUMENTS TO UPLOAD
id_card = models.FileField(('Carte Nationale d\'Identité'), 
upload_to='documents/CNI')
drive_licence = models.FileField(('Permis de conduire'), 
upload_to='documents/PERMIS_CONDUIRE')
police_record = models.FileField(('Casier judiciaire'), 
upload_to='documents/CASIER_JUDICIAIRE')
carte_vitale = models.FileField(('Carte vitale'), 
   upload_to='documents/CARTE_VITALE')
medical_visit = models.FileField(('Visite médicale'), 
upload_to='documents/MEDICAL_VISIT')
rib = models.FileField(('Relevé d\'Identité Bancaire (RIB)'), 
  upload_to='documents/RIB')
uploaded_at = models.DateTimeField(('Ajouté le'), auto_now_add=True)
docs_are_checked = models.BooleanField(('documents verifés'), 
   default=False)

def __str__(self):
return self.user.username
@receiver(post_save, sender=User)def update_user_profile(sender, instance, 
created, **kwargs):
if created:
Profile.objects.create(user=instance)
instance.profile.save()

App/urls.py

from django.conf.urls import url, includefrom django.contrib.auth import views 
as auth_views
from . import views as core_views

urlpatterns = [
url(r'^accounts/login/$', auth_views.login, {'template_name': 
'login.html'}, name='login'),
url(r'^accounts/logout/$', auth_views.logout, {'next_page': 'login'}, 
name='logout'),
url(r'^accounts/signup/$', core_views.signup, name='signup'),
url(r'^account_activation_sent/$', core_views.account_activation_sent, 
name='account_activation_sent'),
url(r'^accounts/activate/(?P[0-9A-Za-z_\-]+)/(?P[0-9A-Za-
z]{1,13}-[0-9A-Za-z]{1,20})/$', core_views.activate, 
name='activate'),
url(r'^accounts/email_confirmation_done/$', 
core_views.email_confirmation_done, name='email_confirmation_done'),
url(r'^accounts/complete_profile/$', core_views.complete_profile, 
name='complete_profile'),
url(r'^accounts/upload_files/$', core_views.upload_files, 
name='upload_files'),
url(r'^profile/$', core_views.view_profile, name='view_profile'),

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/05ebb2be-3868-43d4-9320-5f7aa1e08075%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Dos Modelos en un formulario django

2017-07-28 Thread Vijay Khemlani
Puedes crear un formulario común y corriente de Django

class Formulario(forms.Form):
... campos del usuario
... campos de sus caracteristicas

Y manejar la lógica en tu vista

formulario = Formulario(this.request.POST)
if formulario.is_valid():
  ... actualizar usuario con campos de formulario.cleaned_data
  ... actualizar sus caracteristicas con campos de formulario.cleaned_data

2017-07-27 15:15 GMT-04:00 Nelson Fernando Garcia Gomez <
nefeg...@misena.edu.co>:

> hola Buenas soy algo nuevo en django y me anima aprender cada vez mas,l
> bueno mi inquietud es la siguiente
> como puedo enlazar dos modelos a un formulario
> tengo como modelos usuarios y características y donde el modelo
> características tiene una relacion models.OneToOneField
> con usuarios, quisiera saber como puedo trabajar estos dos modelos en un
> solo formulario con un solo submit
> espero sea claro bueno en fin deseo es crear un solo formulario para
> recoger datos para estos dos modelos y hay si almacenarlos.
> gracias por su colaboración  :)
>
>
>
> *Declinación de Responsabilidades:* Los servicios de MISENA son
> soportados tecnológicamente por © Google y ofrecidos por el Servicio
> Nacional de Aprendizaje – SENA de manera gratuita a los aprendices e
> instructores de programas de formación titulada, las opiniones que contenga
> este mensaje son exclusivas de su autor y no representan la opinión del
> Servicio Nacional de Aprendizaje o de sus autoridades. El receptor deberá
> verificar posibles virus informáticos que tenga el correo o cualquier
> anexo, razón por la cual el SENA no es responsable de los daños causados
> por cualquier virus transmitido en este correo electrónico.
>
> Los contenidos, textos, imágenes, archivos enviados en este mensaje son
> responsabilidad exclusiva del remitente y no reflejan ni comprometen de
> ninguna manera a la institución. No se autoriza el uso de esta herramienta
> para el intercambio de correos masivos, cadenas o spam, ni de mensajes
> ofensivos, de carácter político, sexual o religioso, con fines de lucro,
> con propósitos delictivos o cualquier otro mensaje que se considere
> indebido o que vaya en contra de la Ley.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/116eff81-4257-4fa1-a71a-ee11f3f22f0b%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CALn3ei3uf88qAeg0NKu%3DxBU_Oa%2Bmasw%3D-KVHmVoew_vbV0SsGw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: TypeError: __init__() takes 2 positional arguments but 3 were given (django-material)

2017-07-28 Thread 'Tom Evans' via Django users
Your error refers to part of a class you haven't included,
ClientsForm, and it has an error to do with a class called Stacked,
which you haven't shown where it is imported from. Hard to diagnose
further..

Cheers

Tom

On Thu, Jul 27, 2017 at 1:02 AM, Elias Coutinho
 wrote:
> Traceback (most recent call last):
>   File
> "/home/eliaspai/danibraz/.danibraz/lib/python3.5/site-packages/django/utils/autoreload.py",
> line 226, in wrapper
> fn(*args, **kwargs)
>   File
> "/home/eliaspai/danibraz/.danibraz/lib/python3.5/site-packages/django/core/management/commands/runserver.py",
> line 121, in inner_run
> self.check(display_num_errors=True)
>   File
> "/home/eliaspai/danibraz/.danibraz/lib/python3.5/site-packages/django/core/management/base.py",
> line 374, in check
> include_deployment_checks=include_deployment_checks,
>   File
> "/home/eliaspai/danibraz/.danibraz/lib/python3.5/site-packages/django/core/management/base.py",
> line 361, in _run_checks
> return checks.run_checks(**kwargs)
>   File
> "/home/eliaspai/danibraz/.danibraz/lib/python3.5/site-packages/django/core/checks/registry.py",
> line 81, in run_checks
> new_errors = check(app_configs=app_configs)
>   File
> "/home/eliaspai/danibraz/.danibraz/lib/python3.5/site-packages/django/core/checks/urls.py",
> line 14, in check_url_config
> return check_resolver(resolver)
>   File
> "/home/eliaspai/danibraz/.danibraz/lib/python3.5/site-packages/django/core/checks/urls.py",
> line 24, in check_resolver
> for pattern in resolver.url_patterns:
>   File
> "/home/eliaspai/danibraz/.danibraz/lib/python3.5/site-packages/django/utils/functional.py",
> line 35, in __get__
> res = instance.__dict__[self.name] = self.func(instance)
>   File
> "/home/eliaspai/danibraz/.danibraz/lib/python3.5/site-packages/django/urls/resolvers.py",
> line 313, in url_patterns
> patterns = getattr(self.urlconf_module, "urlpatterns",
> self.urlconf_module)
>   File
> "/home/eliaspai/danibraz/.danibraz/lib/python3.5/site-packages/django/utils/functional.py",
> line 35, in __get__
> res = instance.__dict__[self.name] = self.func(instance)
>   File
> "/home/eliaspai/danibraz/.danibraz/lib/python3.5/site-packages/django/urls/resolvers.py",
> line 306, in urlconf_module
> return import_module(self.urlconf_name)
>   File
> "/home/eliaspai/.pyenv/versions/3.5.0/lib/python3.5/importlib/__init__.py",
> line 126, in import_module
> return _bootstrap._gcd_import(name[level:], package, level)
>   File "", line 986, in _gcd_import
>   File "", line 969, in _find_and_load
>   File "", line 958, in _find_and_load_unlocked
>   File "", line 673, in _load_unlocked
>   File "", line 662, in exec_module
>   File "", line 222, in
> _call_with_frames_removed
>   File "/home/eliaspai/dani/config/urls.py", line 20, in 
> url(r'^cadastro/', include('danibraz.persons.urls',
> namespace='persons')),
>   File
> "/home/eliaspai/danibraz/.danibraz/lib/python3.5/site-packages/django/conf/urls/__init__.py",
> line 50, in include
> urlconf_module = import_module(urlconf_module)
>   File
> "/home/eliaspai/.pyenv/versions/3.5.0/lib/python3.5/importlib/__init__.py",
> line 126, in import_module
> return _bootstrap._gcd_import(name[level:], package, level)
>   File "", line 986, in _gcd_import
>   File "", line 969, in _find_and_load
>   File "", line 958, in _find_and_load_unlocked
>   File "", line 673, in _load_unlocked
>   File "", line 662, in exec_module
>   File "", line 222, in
> _call_with_frames_removed
>   File "/home/eliaspai/dani/danibraz/persons/urls.py", line 5, in 
> from danibraz.persons.views import clients, employees
>   File "/home/eliaspai/dani/danibraz/persons/views.py", line 6, in 
> from danibraz.persons.forms import ClientsForm, EmployeeForm
>   File "/home/eliaspai/dani/danibraz/persons/forms.py", line 31, in 
> class ClientsForm(Form):
>   File "/home/eliaspai/dani/danibraz/persons/forms.py", line 52, in
> ClientsForm
> Stacked(1, 'addresses'),
> TypeError: __init__() takes 1 positional argument but 3 were given
>
>
>
>
> Em terça-feira, 25 de julho de 2017 18:16:20 UTC-3, Tim Graham escreveu:
>>
>> Please give the exception traceback.
>>
>> On Tuesday, July 25, 2017 at 3:35:41 PM UTC-4, Elias Coutinho wrote:
>>>
>>> Hello guys!
>>>
>>> I'm trying to recreate a form with Inline using django and django-stuff.
>>> I already got it once, but this is not being easy!
>>>
>>> I want to create a form that can register a Client and its addresses, or
>>> something similar to this link here.
>>>
>>> Example 1: Adding contacts.
>>>
>>> Example 2: Adding addresses.
>>>
>>> I'm trying like this:
>>>
>>> Forms.py
>>>
>>> from django import forms
>>> from material import Layout, Row, Fieldset
>>> from .models import Client
>>>
>>>
>>> class Address(forms.Form):# TA FEITO
>>> public_place = forms.CharField(label='Logradouro')
>>> number = forms.CharField(label='Número')
>>> city = 

Problems with ModelForm which edits fields in 2 models

2017-07-28 Thread Uri Even-Chen
Hi friends,

I have a problem with a form in Django 1.11.3. Here is the form:

class ProfileNotificationsForm(forms.ModelForm):
class Meta:
model = User
fields = ('notify_on_message', )
profile_model = get_site_profile_model(profile_model=None)
profile_fields = ()

def __init__(self, **kwargs):
super().__init__(**kwargs)
for field in self._meta.profile_model._meta.fields:
if field.name in self._meta.profile_fields:
self.fields[field.name] = field.formfield()
self.helper = FormHelper()
self.helper.add_input(Submit('submit',
pgettext_lazy(context=self.instance.get_gender(), message='Save
Changes')))

def save(self, commit=True):
for field_name in self.fields.keys():
if field_name in self._meta.profile_fields:
setattr(self.instance.profile, field_name,
self.cleaned_data[field_name])
return super().save(commit=commit)

This is the view:

class EditProfileNotificationsView(LoginRequiredMixin,
FormValidMessageMixin, generic.UpdateView):
template_name = 'accounts/edit_profile/notifications.html'
success_url = reverse_lazy('accounts:edit_profile_notifications')
form_class = ProfileNotificationsForm

def get_object(self, queryset=None):
return self.request.user

In speedy.net this form edits only one field in one model. But in
speedy.match I want to add another field from another model:

from speedy.core.accounts.forms import ProfileNotificationsForm as
CoreProfileNotificationsForm

class ProfileNotificationsForm(CoreProfileNotificationsForm):
class Meta(CoreProfileNotificationsForm.Meta):
profile_fields = ("notify_on_like", )

And the view:

class EditProfileNotificationsView(CoreEditProfileNotificationsView):
form_class = ProfileNotificationsForm

But the problem is, this form throws an exception:

speedy\net>manage.py test
Creating test database for alias 'default'...
System check identified no issues (0 silenced).
.E.EE
==
ERROR: test_has_correct_fields
(speedy.core.accounts.tests.test_forms.ProfileNotificationsFormTestCase)
--
Traceback (most recent call last):
  File "E:\Uri\Speedy Net\Git\speedy-net
[public]\speedy\core\base\test.py", line 31, in inner
return method_or_class(*args, **kwargs)
  File "E:\Uri\Speedy Net\Git\speedy-net
[public]\speedy\core\accounts\tests\test_forms.py", line 111, in
test_has_correct_fields
form = ProfileNotificationsForm(instance=self.user)
  File "E:\Uri\Speedy Net\Git\speedy-net
[public]\speedy\core\accounts\forms.py", line 171, in __init__
for field in self._meta.profile_model._meta.fields:
AttributeError: 'ModelFormOptions' object has no attribute 'profile_model'

==
ERROR: test_user_can_open_the_page
(speedy.core.accounts.tests.test_views.EditProfileNotificationsViewTestCase)
--
Traceback (most recent call last):
  File "E:\Uri\Speedy Net\Git\speedy-net
[public]\speedy\core\accounts\tests\test_views.py", line 293, in
test_user_can_open_the_page
r = self.client.get(self.page_url)
  File "E:\Uri\Speedy Net\Git\speedy-net
[public]\.venv\lib\site-packages\django\test\client.py", line 536, in get
**extra)
  File "E:\Uri\Speedy Net\Git\speedy-net
[public]\.venv\lib\site-packages\django\test\client.py", line 340, in get
return self.generic('GET', path, secure=secure, **r)
  File "E:\Uri\Speedy Net\Git\speedy-net
[public]\.venv\lib\site-packages\django\test\client.py", line 416, in
generic
return self.request(**r)
  File "E:\Uri\Speedy Net\Git\speedy-net
[public]\.venv\lib\site-packages\django\test\client.py", line 501, in
request
six.reraise(*exc_info)
  File "E:\Uri\Speedy Net\Git\speedy-net
[public]\.venv\lib\site-packages\django\utils\six.py", line 686, in reraise
raise value
  File "E:\Uri\Speedy Net\Git\speedy-net
[public]\.venv\lib\site-packages\django\core\handlers\exception.py", line
41, in inner
response = get_response(request)
  File "E:\Uri\Speedy Net\Git\speedy-net
[public]\.venv\lib\site-packages\django\core\handlers\base.py", line 187,
in _get_response
response = self.process_exception_by_middleware(e, request)
  File "E:\Uri\Speedy Net\Git\speedy-net
[public]\.venv\lib\site-packages\django\core\handlers\base.py", line 185,
in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "E:\Uri\Speedy Net\Git\speedy-net
[public]\.venv\lib\site-packages\django\views\generic\base.py", line 68, in
view
return