-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
4 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
||
|
@@ -13,6 +12,7 @@ | |
path, | ||
reverse, | ||
) | ||
from django.utils.timezone import now | ||
|
||
import iommi.part | ||
import iommi.style | ||
|
@@ -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]', | ||
|
@@ -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 '#' | ||
|