mirror of
https://github.com/kristoferssolo/FOSSDB.git
synced 2025-10-21 17:50:35 +00:00
Users can now add programming language and percentage to the project. ### TODO - [ ] Allow users to add multiple languages
34 lines
868 B
Python
34 lines
868 B
Python
from django import forms
|
|
|
|
from .models import Project
|
|
|
|
|
|
class ProjectForm(forms.ModelForm):
|
|
class Meta:
|
|
model = Project
|
|
fields = (
|
|
"name",
|
|
"description",
|
|
"license",
|
|
"tag",
|
|
"operating_system",
|
|
)
|
|
|
|
widgets = {
|
|
"name": forms.TextInput(
|
|
attrs={
|
|
"class": "form-control",
|
|
"placeholder": "Project name",
|
|
}
|
|
),
|
|
"description": forms.Textarea(
|
|
attrs={
|
|
"class": "form-control",
|
|
"placeholder": "Description",
|
|
}
|
|
),
|
|
"license": forms.CheckboxSelectMultiple(),
|
|
"tag": forms.CheckboxSelectMultiple(),
|
|
"operating_system": forms.CheckboxSelectMultiple(),
|
|
}
|