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

Closes #1451 Added user categories to profile and settings #1459

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions project/accounts/forms.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import re

from accounts.models import Profile
from categories.models import Category
from django import forms
from django.contrib.auth import get_user_model
from django.core.files.images import get_image_dimensions
Expand Down Expand Up @@ -120,19 +121,18 @@ class Meta:
"email",
"categories",
]
widgets = {"categories": forms.CheckboxSelectMultiple()}

first_name = forms.CharField(label="First Name", max_length=63, required=False)
last_name = forms.CharField(label="Last Name", max_length=63, required=False)
about_me = forms.CharField(label="About Me", max_length=511, required=False)
email = forms.EmailField(label="Email", disabled=True)
username = forms.CharField(label="Username", disabled=True)
profile_image = forms.ImageField(required=False)
# categories = forms.ModelMultipleChoiceField(
# queryset=Category.objects.all(),
# required=False,
# widget=forms.CheckboxSelectMultiple
# )
categories = forms.ModelMultipleChoiceField(
queryset=Category.objects.all(),
required=False,
widget=forms.CheckboxSelectMultiple(),
brylie marked this conversation as resolved.
Show resolved Hide resolved
)


class UpdatePassword(forms.ModelForm):
Expand Down