Coverage for src/django_resume/education.py: 100%

1 from django import forms

2

3 from .plugins import SimplePlugin, SimpleTemplates

4

5

6 class EducationForm(forms.Form):

7 school_name = forms.CharField(

8 label="School name", max_length=100, initial="School name"

9 )

10 school_url = forms.URLField(

11 label="School url",

12 max_length=100,

13 initial="https://example.com",

14 assume_scheme="https",

15 )

16 start = forms.CharField(widget=forms.TextInput(), required=False, initial="start")

17 end = forms.CharField(widget=forms.TextInput(), required=False, initial="end")

18

19

20 class EducationPlugin(SimplePlugin):

21 name: str = "education"

22 verbose_name: str = "Education"

23 templates = SimpleTemplates(

24 main="django_resume/plain/education.html",

25 form="django_resume/plain/education_form.html",

26 )

27 admin_form_class = inline_form_class = EducationForm