Browse Source

Fixed Tenant import

Jeremy Stretch 8 years ago
parent
commit
41b2b7dbf6
2 changed files with 9 additions and 4 deletions
  1. 8 3
      netbox/templates/tenancy/tenant_import.html
  2. 1 1
      netbox/tenancy/forms.py

+ 8 - 3
netbox/templates/tenancy/tenant_import.html

@@ -31,22 +31,27 @@
 				<tr>
 					<td>Name</td>
 					<td>Tenant name</td>
-					<td>Widgets Inc.</td>
+					<td>WIDG01</td>
 				</tr>
 				<tr>
 					<td>Slug</td>
 					<td>URL-friendly name</td>
-					<td>widgets-inc</td>
+					<td>widg01</td>
 				</tr>
 				<tr>
 					<td>Group</td>
 					<td>Tenant group</td>
 					<td>Customers</td>
 				</tr>
+				<tr>
+					<td>Description</td>
+					<td>Long-form name or other text (optional)</td>
+					<td>Widgets Inc.</td>
+				</tr>
 			</tbody>
 		</table>
 		<h4>Example</h4>
-		<pre>Widgets Inc.,widgets-inc,Customers</pre>
+		<pre>WIDG01,widg01,Customers,Widgets Inc.</pre>
 	</div>
 </div>
 {% endblock %}

+ 1 - 1
netbox/tenancy/forms.py

@@ -39,7 +39,7 @@ class TenantFromCSVForm(forms.ModelForm):
 
     class Meta:
         model = Tenant
-        fields = ['name', 'slug', 'group', 'description', 'comments']
+        fields = ['name', 'slug', 'group', 'description']
 
 
 class TenantImportForm(BulkImportForm, BootstrapMixin):