Compare commits
8 Commits
5faa1d6a52
...
a38915feae
Author | SHA1 | Date |
---|---|---|
Arthur Hanson | a38915feae | |
Jeremy Stretch | 5c68fc9202 | |
Jeremy Stretch | ff8dabe8d9 | |
Markku Leiniö | 5c5c0e1e43 | |
Jeremy Stretch | b87d1eca98 | |
teapot | db823634cf | |
Jeremy Stretch | 195dbaed00 | |
Jeremy Stretch | a9a012daf0 |
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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(),
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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']:
|
||||
|
|
|
@ -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)
|
||||
})
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue