mirror of
https://github.com/kristoferssolo/FOSSDB.git
synced 2025-10-21 17:50:35 +00:00
Change CharFiled to URLField
This commit is contained in:
parent
90debba248
commit
f995959286
@ -1,26 +1,26 @@
|
||||
from django import forms
|
||||
|
||||
from .hosting_platform.models import HostingPlatform, ProjectHostingPlatform
|
||||
from .hosting_platform.models import HostingPlatform
|
||||
|
||||
from .models import Project
|
||||
|
||||
|
||||
class ProjectForm(forms.ModelForm):
|
||||
hosting_platform = forms.ModelChoiceField(queryset=HostingPlatform.objects.all())
|
||||
url = forms.CharField(max_length=100)
|
||||
url = forms.URLField(max_length=100)
|
||||
|
||||
class Meta:
|
||||
model = Project
|
||||
fields = (
|
||||
"name",
|
||||
"description",
|
||||
"url",
|
||||
"hosting_platform",
|
||||
"license",
|
||||
"tag",
|
||||
"operating_system",
|
||||
)
|
||||
|
||||
exclude = ("hosting_platform",)
|
||||
|
||||
widgets = {
|
||||
"name": forms.TextInput(
|
||||
attrs={
|
||||
|
||||
Loading…
Reference in New Issue
Block a user