Skip to content

Commit 8390b87

Browse files
author
Mirek Simek
committed
version 0.5.44: Finished the first iteration of support for foreign keys, fixed api location for demo
1 parent b749da9 commit 8390b87

File tree

6 files changed

+9
-7
lines changed

6 files changed

+9
-7
lines changed

angular/package-dist.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "django-angular-dynamic-forms",
3-
"version": "0.5.43",
3+
"version": "0.5.44",
44
"license": "MIT",
55
"description": "Django Rest Framework meets Angular 5 material.io dynamic forms - automatic create and edit dialogs",
66
"typings": "./django-angular-dynamic-forms.d.ts",

angular/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "django-angular-dynamic-forms",
3-
"version": "0.5.43",
3+
"version": "0.5.44",
44
"license": "MIT",
55
"description": "Django Rest Framework meets Angular 5 material.io dynamic forms - automatic create and edit dialogs",
66
"typings": "./django-angular-dynamic-forms.d.ts",

angular_dynamic_forms/rest.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import inspect
33
import re
44
from functools import lru_cache
5+
from urllib.parse import urlsplit
56

67
from django.core.exceptions import FieldDoesNotExist
78
from django.db.models import TextField
@@ -386,7 +387,7 @@ def _decorate_layout_item(self, item):
386387
# must be called from /form/ ...
387388
path = re.sub(r'/form/?$', '', path)
388389
path = '%s/autocomplete/%s/' % (path, name)
389-
item['autocomplete_url'] = request.build_absolute_uri(path)
390+
item['autocomplete_url'] = urlsplit(request.build_absolute_uri(path)).path
390391

391392
# noinspection PyUnusedLocal
392393
def _autocomplete(self, request, has_instance, **kwargs):
@@ -473,7 +474,8 @@ def _decorate_layout_item(self, item):
473474
# must be called from /form/ ...
474475
path = re.sub(r'/form/?$', '', path)
475476
path = '%s/foreign-autocomplete/%s/' % (path, item_id)
476-
item['autocomplete_url'] = request.build_absolute_uri(path)
477+
item['autocomplete_url'] = urlsplit(request.build_absolute_uri(path)).path
478+
print(item['autocomplete_url'])
477479

478480
# noinspection PyUnusedLocal
479481
def _foreign_autocomplete(self, request, has_instance, **kwargs):

demo/angular/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "django-angular-dynamic-forms-demo",
3-
"version": "0.5.43",
3+
"version": "0.5.44",
44
"license": "MIT",
55
"scripts": {
66
"ng": "ng",

demo/django/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
# Versions should comply with PEP440. For a discussion on single-sourcing
2626
# the version across setup.py and the project code, see
2727
# https://packaging.python.org/en/latest/single_source_version.html
28-
version='0.5.43',
28+
version='0.5.44',
2929

3030
description='Angular forms for django rest framework',
3131
long_description=long_description,

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
# Versions should comply with PEP440. For a discussion on single-sourcing
2626
# the version across setup.py and the project code, see
2727
# https://packaging.python.org/en/latest/single_source_version.html
28-
version='0.5.43',
28+
version='0.5.44',
2929

3030
description='Angular forms for django rest framework',
3131
long_description=long_description,

0 commit comments

Comments
 (0)