sistemas app added
This commit is contained in:
@@ -15,7 +15,7 @@ BASE_DIR = Path(__file__).resolve().parent.parent
|
||||
SECRET_KEY = os.getenv("adminAS_KEY")
|
||||
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = False
|
||||
DEBUG = True
|
||||
|
||||
ALLOWED_HOSTS = ['*']
|
||||
# Application definition
|
||||
@@ -36,6 +36,7 @@ INSTALLED_APPS = [
|
||||
'widget_tweaks',
|
||||
|
||||
'Clientes',
|
||||
'Sistemas',
|
||||
]
|
||||
REST_FRAMEWORK = {
|
||||
'DEFAULT_AUTHENTICATION_CLASSES': [
|
||||
|
||||
@@ -74,13 +74,3 @@ class Clientes(models.Model):
|
||||
ordering = ('-Activo','-conteo_mes','RFC')
|
||||
|
||||
|
||||
class Maquinas_Conectadas(models.Model):
|
||||
UserName = models.CharField(max_length=255)
|
||||
PC_Name = models.CharField(max_length=255)
|
||||
Is64 = models.BooleanField()
|
||||
OSversion= models.CharField(max_length=255)
|
||||
local_ip = models.CharField(max_length=55)
|
||||
public_ip= models.CharField(max_length=55)
|
||||
RFC = models.CharField(max_length=13)
|
||||
class Meta:
|
||||
abstract =True
|
||||
0
Sistemas/__init__.py
Normal file
0
Sistemas/__init__.py
Normal file
3
Sistemas/admin.py
Normal file
3
Sistemas/admin.py
Normal file
@@ -0,0 +1,3 @@
|
||||
from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
||||
6
Sistemas/apps.py
Normal file
6
Sistemas/apps.py
Normal file
@@ -0,0 +1,6 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class SistemasConfig(AppConfig):
|
||||
default_auto_field = 'django.db.models.BigAutoField'
|
||||
name = 'Sistemas'
|
||||
0
Sistemas/migrations/__init__.py
Normal file
0
Sistemas/migrations/__init__.py
Normal file
28
Sistemas/models.py
Normal file
28
Sistemas/models.py
Normal file
@@ -0,0 +1,28 @@
|
||||
from django.db import models
|
||||
|
||||
from Clientes.models import Clientes
|
||||
# Create your models here.
|
||||
|
||||
class Sistema(models.Model):
|
||||
nombre_sistema= models.CharField(max_length=100, blank=False,null=False,unique=True)
|
||||
# class Meta:
|
||||
# abstract=True
|
||||
|
||||
class sistemas_por_cliente(models.Model):
|
||||
id_sistema= models.ForeignKey(Sistema, related_name='sistema_spc', on_delete=models.CASCADE)
|
||||
cliente = models.ForeignKey(Clientes, related_name='cliente_spc', on_delete=models.CASCADE)
|
||||
num_licencias= models.IntegerField(default=1)
|
||||
|
||||
# class Meta:
|
||||
# abstract = True
|
||||
|
||||
class Maquinas_Conectadas(models.Model):
|
||||
UserName = models.CharField(max_length=255)
|
||||
PC_Name = models.CharField(max_length=255)
|
||||
Is64 = models.BooleanField()
|
||||
OSversion= models.CharField(max_length=255)
|
||||
local_ip = models.CharField(max_length=55)
|
||||
public_ip= models.CharField(max_length=55)
|
||||
RFC = models.CharField(max_length=13)
|
||||
class Meta:
|
||||
abstract =True
|
||||
3
Sistemas/tests.py
Normal file
3
Sistemas/tests.py
Normal file
@@ -0,0 +1,3 @@
|
||||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
||||
3
Sistemas/views.py
Normal file
3
Sistemas/views.py
Normal file
@@ -0,0 +1,3 @@
|
||||
from django.shortcuts import render
|
||||
|
||||
# Create your views here.
|
||||
Reference in New Issue
Block a user