diff --git a/ProyectoWeb/servicios/__init__.py b/ProyectoWeb/servicios/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/ProyectoWeb/servicios/admin.py b/ProyectoWeb/servicios/admin.py new file mode 100644 index 0000000..e524e4d --- /dev/null +++ b/ProyectoWeb/servicios/admin.py @@ -0,0 +1,11 @@ +from django.contrib import admin +from .models import Servicio + +# Register your models here. + +class ServicioAdmin(admin.ModelAdmin): + readonly_fields = ('created','updated') + + +admin.site.register(Servicio, ServicioAdmin) + diff --git a/ProyectoWeb/servicios/apps.py b/ProyectoWeb/servicios/apps.py new file mode 100644 index 0000000..3570a29 --- /dev/null +++ b/ProyectoWeb/servicios/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class ServiciosConfig(AppConfig): + name = 'servicios' diff --git a/ProyectoWeb/servicios/migrations/0001_initial.py b/ProyectoWeb/servicios/migrations/0001_initial.py new file mode 100644 index 0000000..d0a98ac --- /dev/null +++ b/ProyectoWeb/servicios/migrations/0001_initial.py @@ -0,0 +1,29 @@ +# Generated by Django 3.1.3 on 2020-11-19 02:46 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='Servicio', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('titulo', models.CharField(max_length=50)), + ('contenido', models.CharField(max_length=50)), + ('imagen', models.ImageField(upload_to='')), + ('created', models.DateTimeField(auto_now_add=True)), + ('updated', models.DateTimeField(auto_now_add=True)), + ], + options={ + 'verbose_name': 'servicio', + 'verbose_name_plural': 'servicios', + }, + ), + ] diff --git a/ProyectoWeb/servicios/migrations/0002_auto_20201118_2354.py b/ProyectoWeb/servicios/migrations/0002_auto_20201118_2354.py new file mode 100644 index 0000000..3932ca0 --- /dev/null +++ b/ProyectoWeb/servicios/migrations/0002_auto_20201118_2354.py @@ -0,0 +1,17 @@ +# Generated by Django 3.1.3 on 2020-11-19 02:54 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('servicios', '0001_initial'), + ] + + operations = [ + migrations.AlterModelOptions( + name='servicio', + options={'verbose_name': 'servicio', 'verbose_name_plural': 's'}, + ), + ] diff --git a/ProyectoWeb/servicios/migrations/0003_auto_20201118_2357.py b/ProyectoWeb/servicios/migrations/0003_auto_20201118_2357.py new file mode 100644 index 0000000..28bae5b --- /dev/null +++ b/ProyectoWeb/servicios/migrations/0003_auto_20201118_2357.py @@ -0,0 +1,17 @@ +# Generated by Django 3.1.3 on 2020-11-19 02:57 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('servicios', '0002_auto_20201118_2354'), + ] + + operations = [ + migrations.AlterModelOptions( + name='servicio', + options={'verbose_name': 'servicio'}, + ), + ] diff --git a/ProyectoWeb/servicios/migrations/0004_auto_20201119_0000.py b/ProyectoWeb/servicios/migrations/0004_auto_20201119_0000.py new file mode 100644 index 0000000..0172ae1 --- /dev/null +++ b/ProyectoWeb/servicios/migrations/0004_auto_20201119_0000.py @@ -0,0 +1,17 @@ +# Generated by Django 3.1.3 on 2020-11-19 03:00 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('servicios', '0003_auto_20201118_2357'), + ] + + operations = [ + migrations.AlterModelOptions( + name='servicio', + options={'verbose_name': 'app_service'}, + ), + ] diff --git a/ProyectoWeb/servicios/migrations/0005_auto_20201119_0010.py b/ProyectoWeb/servicios/migrations/0005_auto_20201119_0010.py new file mode 100644 index 0000000..82338a9 --- /dev/null +++ b/ProyectoWeb/servicios/migrations/0005_auto_20201119_0010.py @@ -0,0 +1,17 @@ +# Generated by Django 3.1.3 on 2020-11-19 03:10 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('servicios', '0004_auto_20201119_0000'), + ] + + operations = [ + migrations.AlterModelOptions( + name='servicio', + options={'verbose_name': 'service', 'verbose_name_plural': 'services'}, + ), + ] diff --git a/ProyectoWeb/servicios/migrations/0006_auto_20201119_0323.py b/ProyectoWeb/servicios/migrations/0006_auto_20201119_0323.py new file mode 100644 index 0000000..ad86401 --- /dev/null +++ b/ProyectoWeb/servicios/migrations/0006_auto_20201119_0323.py @@ -0,0 +1,17 @@ +# Generated by Django 3.1.3 on 2020-11-19 06:23 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('servicios', '0005_auto_20201119_0010'), + ] + + operations = [ + migrations.AlterModelOptions( + name='servicio', + options={'verbose_name': 'servic', 'verbose_name_plural': 'services'}, + ), + ] diff --git a/ProyectoWeb/servicios/migrations/0007_auto_20201119_0323.py b/ProyectoWeb/servicios/migrations/0007_auto_20201119_0323.py new file mode 100644 index 0000000..e396444 --- /dev/null +++ b/ProyectoWeb/servicios/migrations/0007_auto_20201119_0323.py @@ -0,0 +1,17 @@ +# Generated by Django 3.1.3 on 2020-11-19 06:23 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('servicios', '0006_auto_20201119_0323'), + ] + + operations = [ + migrations.AlterModelOptions( + name='servicio', + options={'verbose_name': 'service', 'verbose_name_plural': 'services'}, + ), + ] diff --git a/ProyectoWeb/servicios/migrations/__init__.py b/ProyectoWeb/servicios/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/ProyectoWeb/servicios/models.py b/ProyectoWeb/servicios/models.py new file mode 100644 index 0000000..4a51322 --- /dev/null +++ b/ProyectoWeb/servicios/models.py @@ -0,0 +1,21 @@ +from django.db import models + +# Create your models here. + +class Servicio(models.Model): + titulo = models.CharField( max_length = 50 ) + contenido = models.CharField( max_length = 50 ) + imagen = models.ImageField() + created = models.DateTimeField( auto_now_add = True) + updated = models.DateTimeField( auto_now_add = True) + + class Meta: + verbose_name = 'servicio' + verbose_name_plural = 'servicios' + + + def __str_(self): + return self.titulo + + + diff --git a/ProyectoWeb/servicios/tests.py b/ProyectoWeb/servicios/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/ProyectoWeb/servicios/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/ProyectoWeb/servicios/views.py b/ProyectoWeb/servicios/views.py new file mode 100644 index 0000000..91ea44a --- /dev/null +++ b/ProyectoWeb/servicios/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/ProyectoWeb/wikimg/admin_panel.png b/ProyectoWeb/wikimg/admin_panel.png new file mode 100644 index 0000000..686b4dc Binary files /dev/null and b/ProyectoWeb/wikimg/admin_panel.png differ