Paul Rogov
Paul Rogov
`AgentUpdateView` is actually not working neither here [https://crm.justdjango.com/agents/](https://crm.justdjango.com/agents/), nor if you `git clone` the latest version from the [official repo](https://github.com/justdjango/getting-started-with-django). These are the files that cause this issue: * https://github.com/justdjango/getting-started-with-django/blob/main/agents/views.py...
@Bowiemb I also tried to fix this and came up to a similar function-based view first. But your code has a dangerous bug _(I also had it the first time...
I ended up with two equal solutions _(honestly, I prefer function-based view, because it's easier to debug and more explicit):_ **1. function-based view** `agents/views.py` ```python def agent_update_view(request, pk): organisation= request.user.userprofile...
**2. class-based view** `agents/forms.py` ```python from django import forms from django.contrib.auth import get_user_model from leads.models import Agent User = get_user_model() class AgentModelForm(forms.ModelForm): class Meta: model = User fields = (...
Was reading Django docs on Forms and came up with a shorter and more elegant solution. It seems that you just need to override `get_form_kwargs` method inside `AgentUpdateView` to make...
The fix is the same as for the `AssignAgentForm`. You need to update a queryset of a form field "agent" inside a form's `__init__` Add a new form to `forms.py`...
Optionally, you can use this `cloud-init` config for persistent config on Ubuntu 24.04 **client servers**. This is in `yaml` format and should be specified when creating a new server instance...
You're right @ugnelis The method `dj_rest_auth.forms.AllAuthPasswordResetForm.save()` is broken. It's missing `**(extra_email_context or {}),` from the original `django.contrib.auth.forms.PasswordResetForm` ```python extra_email_context = kwargs.get("extra_email_context", {}) context.update(extra_email_context) ```
@ruilvo try setting `TOKEN_SERIALIZER` to `None` like this: ```python # settings.py REST_AUTH = { 'SESSION_LOGIN': True, 'USE_JWT': False, 'TOKEN_MODEL': None, 'TOKEN_SERIALIZER': None, } ```