Compare commits

...

8 Commits

Author SHA1 Message Date
Arthur Hanson a38915feae
Merge c4a4cac21a into 5c68fc9202 2024-05-08 07:39:11 -07:00
Jeremy Stretch 5c68fc9202 Fixes #16020: Include Python version on system UI view 2024-05-08 10:35:38 -04:00
Jeremy Stretch ff8dabe8d9 Fixes #16025: Fix execution of scripts via the runscript management command 2024-05-08 10:30:47 -04:00
Markku Leiniö 5c5c0e1e43 Fixes #16032: Specify the WSGI module to load in uwsgi.ini 2024-05-08 10:28:35 -04:00
Jeremy Stretch b87d1eca98 Fixes #16016: Correct typo 2024-05-08 10:15:43 -04:00
teapot db823634cf Fixes #16027: Correct typo in error message 2024-05-08 09:42:20 -04:00
Jeremy Stretch 195dbaed00 Fixes #16017: Bump Django to 5.0.6 2024-05-07 21:33:13 -04:00
Jeremy Stretch a9a012daf0 Fixes #16011: Fix site tenant assignment by PK via REST API 2024-05-07 16:35:11 -04:00
8 changed files with 18 additions and 4 deletions

View File

@ -16,3 +16,9 @@ need-app = true
; do not use multiple interpreters
single-interpreter = true
; change to the project directory
chdir = netbox
; specify the WSGI module to load
module = netbox.wsgi

View File

@ -17,7 +17,7 @@ pip3 install pyuwsgi
Once installed, add the package to `local_requirements.txt` to ensure it is re-installed during future rebuilds of the virtual environment:
```no-highlight
sudo sh -c "echo 'pyuwgsi' >> /opt/netbox/local_requirements.txt"
sudo sh -c "echo 'pyuwsgi' >> /opt/netbox/local_requirements.txt"
```
## Configuration

View File

@ -51,7 +51,7 @@ class SiteSerializer(NetBoxModelSerializer):
status = ChoiceField(choices=SiteStatusChoices, required=False)
region = RegionSerializer(nested=True, required=False, allow_null=True)
group = SiteGroupSerializer(nested=True, required=False, allow_null=True)
tenant = TenantSerializer(required=False, allow_null=True)
tenant = TenantSerializer(nested=True, required=False, allow_null=True)
time_zone = TimeZoneSerializerField(required=False, allow_null=True)
asns = SerializedPKRelatedField(
queryset=ASN.objects.all(),

View File

@ -10,6 +10,7 @@ from dcim.models import *
from extras.models import ConfigTemplate
from ipam.models import ASN, RIR, VLAN, VRF
from netbox.api.serializers import GenericObjectSerializer
from tenancy.models import Tenant
from utilities.testing import APITestCase, APIViewTestCases, create_test_device
from virtualization.models import Cluster, ClusterType
from wireless.choices import WirelessChannelChoices
@ -152,6 +153,7 @@ class SiteTest(APIViewTestCases.APIViewTestCase):
Site.objects.bulk_create(sites)
rir = RIR.objects.create(name='RFC 6996', is_private=True)
tenant = Tenant.objects.create(name='Tenant 1', slug='tenant-1')
asns = [
ASN(asn=65000 + i, rir=rir) for i in range(8)
@ -166,6 +168,7 @@ class SiteTest(APIViewTestCases.APIViewTestCase):
'group': groups[1].pk,
'status': SiteStatusChoices.STATUS_ACTIVE,
'asns': [asns[0].pk, asns[1].pk],
'tenant': tenant.pk,
},
{
'name': 'Site 5',

View File

@ -85,6 +85,7 @@ class Command(BaseCommand):
module_name, script_name = script.split('.', 1)
module, script = get_module_and_script(module_name, script_name)
script = script.python_class
# Take user from command line if provided and exists, other
if options['user']:

View File

@ -574,7 +574,7 @@ class IPRange(PrimaryModel):
if not self.end_address > self.start_address:
raise ValidationError({
'end_address': _(
"Ending address must be lower than the starting address ({start_address})"
"Ending address must be greater than the starting address ({start_address})"
).format(start_address=self.start_address)
})

View File

@ -31,6 +31,10 @@
<th scope="row">{% trans "NetBox version" %}</th>
<td>{{ stats.netbox_version }}</td>
</tr>
<tr>
<th scope="row">{% trans "Python version" %}</th>
<td>{{ stats.python_version }}</td>
</tr>
<tr>
<th scope="row">{% trans "Django version" %}</th>
<td>{{ stats.django_version }}</td>

View File

@ -1,4 +1,4 @@
Django==5.0.5
Django==5.0.6
django-cors-headers==4.3.1
django-debug-toolbar==4.3.0
django-filter==24.2