Compare commits

..

8 Commits

Author SHA1 Message Date
Jeremy Stretch
f731900e2f Merge pull request #1154 from digitalocean/develop
Release v2.0.1
2017-05-09 22:47:52 -04:00
Jeremy Stretch
b89bd24bed Release v2.0.1 2017-05-09 22:41:37 -04:00
Jeremy Stretch
effda88b51 Fixes #1153: UnicodeEncodeError when searching for non-ASCII characters on Python 2 2017-05-09 22:40:46 -04:00
Jeremy Stretch
3844f70a4d Fixes #1152: Unable to edit user keys 2017-05-09 17:53:37 -04:00
Jeremy Stretch
8e333757f9 Fixes #1150: Error when uploading image attachments with Unicode names under Python 2 2017-05-09 17:12:45 -04:00
Jeremy Stretch
0fb12bcc9c Fixes #1151: name 'escape' is not defined 2017-05-09 17:06:17 -04:00
Jeremy Stretch
44d78ef92a Fixes #1149: Port list does not populate when creating a console or power connection 2017-05-09 17:01:43 -04:00
Jeremy Stretch
ebb6729a26 Post-release version bump 2017-05-09 15:13:40 -04:00
6 changed files with 14 additions and 12 deletions

View File

@@ -976,7 +976,7 @@ class ConsolePortConnectionForm(BootstrapMixin, forms.ModelForm):
queryset=ConsoleServerPort.objects.all(),
label='Port',
widget=APISelect(
api_url='/api/dcim/console-server-ports/?device_id={{device}}',
api_url='/api/dcim/console-server-ports/?device_id={{console_server}}',
disabled_indicator='connected_console',
)
)
@@ -1244,7 +1244,7 @@ class PowerPortConnectionForm(BootstrapMixin, forms.ModelForm):
queryset=PowerOutlet.objects.all(),
label='Outlet',
widget=APISelect(
api_url='/api/dcim/power-outlets/?device_id={{device}}',
api_url='/api/dcim/power-outlets/?device_id={{pdu}}',
disabled_indicator='connected_port'
)
)

View File

@@ -11,6 +11,7 @@ from django.db.models import Count
from django.http import HttpResponseRedirect
from django.shortcuts import get_object_or_404, redirect, render
from django.urls import reverse
from django.utils.html import escape
from django.utils.http import urlencode
from django.utils.safestring import mark_safe
from django.views.generic import View

View File

@@ -383,7 +383,7 @@ def image_upload(instance, filename):
elif instance.name:
filename = instance.name
return '{}{}_{}_{}'.format(path, instance.content_type.name, instance.object_id, filename)
return u'{}{}_{}_{}'.format(path, instance.content_type.name, instance.object_id, filename)
@python_2_unicode_compatible

View File

@@ -13,7 +13,7 @@ except ImportError:
)
VERSION = '2.0.0'
VERSION = '2.0.1'
# Import local configuration
ALLOWED_HOSTS = DATABASE = SECRET_KEY = None

View File

@@ -191,7 +191,7 @@ class SearchView(View):
results.append({
'name': queryset.model._meta.verbose_name_plural,
'table': table,
'url': '{}?q={}'.format(reverse(url), form.cleaned_data['q'])
'url': u'{}?q={}'.format(reverse(url), form.cleaned_data['q'])
})
return render(request, 'search.html', {

View File

@@ -16,13 +16,14 @@ $(document).ready(function() {
// Adding/editing a secret
$('form').submit(function(event) {
if (
$(this).find('input.requires-session-key').filter(function() {return this.value == ""}) &&
document.cookie.indexOf('session_key') == -1
) {
$('#privkey_modal').modal('show');
event.preventDefault();
}
$(this).find('input.requires-session-key').each(function() {
if (this.value && document.cookie.indexOf('session_key') == -1) {
console.log('Field ' + this.value + ' requires a session key');
$('#privkey_modal').modal('show');
event.preventDefault();
return false;
}
});
});
// Retrieve a session key