Skip to content

Commit

Permalink
Fix broken example app (#476)
Browse files Browse the repository at this point in the history
  • Loading branch information
jlubcke authored Oct 13, 2023
1 parent 4db182a commit ed0e570
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions examples/examples/views.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import json
from datetime import (
date,
datetime,
)
from pathlib import Path

Expand All @@ -13,6 +12,7 @@
path,
reverse,
)
from django.utils.timezone import now

import iommi.part
import iommi.style
Expand Down Expand Up @@ -196,9 +196,9 @@ def all_field_sorts(request):
fields__float__initial=3.14,
fields__password__initial='abc123',
fields__boolean__initial=True,
fields__datetime__initial=datetime.now(),
fields__datetime__initial=now(),
fields__date__initial=date.today(),
fields__time__initial=datetime.now().time(),
fields__time__initial=now().time(),
fields__decimal__initial=3.14,
fields__url__initial='http://iommi.rocks',
fields__email__initial='[email protected]',
Expand All @@ -217,6 +217,7 @@ def __getattr__(self, attr):
_, _, shortcut = attr.partition('column_of_type_')
s = f'{shortcut} #{self.idx}'
if shortcut == 'link' or attr == 'link':

class Link:
def get_absolute_url(self):
return '#'
Expand Down

0 comments on commit ed0e570

Please sign in to comment.