from django import forms
from .models import Url


class UrlForm(forms.ModelForm):


    class Meta:
        model = Url
        fields = '__all__'

    def clean(self):
        url = self.cleaned_data.get('url')
        if not url.endswith('/'):
            url += '/'
            self.cleaned_data['url'] = url
        return self.cleaned_data

052d983697177ef83f49e8baa3178bdf879c34e0
<mask token>

<mask token>


class UrlForm(forms.ModelForm):


    class Meta:
        model = Url
        fields = '__all__'
    <mask token>

<mask token>


class UrlForm(forms.ModelForm):


    class Meta:
        model = Url
        fields = '__all__'

    def clean(self):
        url = self.cleaned_data.get('url')
        if not url.endswith('/'):
            url += '/'
            self.cleaned_data['url'] = url
        return self.cleaned_data

from django import forms
from .models import Url


class UrlForm(forms.ModelForm):


    class Meta:
        model = Url
        fields = '__all__'

    def clean(self):
        url = self.cleaned_data.get('url')
        if not url.endswith('/'):
            url += '/'
            self.cleaned_data['url'] = url
        return self.cleaned_data
