Implemented mandant based blog posts
This commit is contained in:
@@ -22,7 +22,7 @@ from django import forms
|
||||
from django.forms import ModelForm
|
||||
from django.contrib.auth.models import User
|
||||
from django.core.files.images import get_image_dimensions
|
||||
from tipp.models import Match, Competition, Post, UserProfile
|
||||
from tipp.models import Match, Competition, Post, UserProfile, Mandant, RelUserMandant
|
||||
|
||||
class NumberInput(forms.TextInput):
|
||||
input_type = 'number'
|
||||
@@ -48,6 +48,13 @@ class BlogpostForm(ModelForm):
|
||||
model = Post
|
||||
fields = ['content']
|
||||
|
||||
class MandantsForm(forms.Form):
|
||||
mandants = forms.MultipleChoiceField(
|
||||
label= "Mandanten",
|
||||
widget=forms.CheckboxSelectMultiple()
|
||||
)
|
||||
|
||||
|
||||
class UserForm(forms.ModelForm):
|
||||
class Meta:
|
||||
model = User
|
||||
|
||||
Reference in New Issue
Block a user