Renamed calendar to widget_calendar to avoid error

parent c6a6fc19
from django.apps import AppConfig from django.apps import AppConfig
class CalendaConfig(AppConfig): class WidgetCalendarConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField' default_auto_field = 'django.db.models.BigAutoField'
name = 'calendar' name = 'widget_calendar'
# Generated by Django 3.2 on 2023-03-06 02:13
import datetime
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Location',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('mode', models.CharField(default='', max_length=100)),
('venue', models.CharField(default='', max_length=100)),
],
),
migrations.CreateModel(
name='Event',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('target_datetime', models.DateTimeField(default=datetime.datetime(2023, 3, 6, 10, 13, 38, 850474))),
('activity', models.CharField(default='', max_length=100)),
('estimated_hours', models.FloatField(default=0)),
('course', models.CharField(default='', max_length=100)),
('location', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='Venue', to='calendar.location')),
],
),
]
# Generated by Django 3.2 on 2023-03-06 02:13
import datetime
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('calendar', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='event',
name='target_datetime',
field=models.DateTimeField(default=datetime.datetime(2023, 3, 6, 10, 13, 56, 192323)),
),
]
...@@ -5,4 +5,4 @@ urlpatterns = [ ...@@ -5,4 +5,4 @@ urlpatterns = [
path('', index, name='index'), path('', index, name='index'),
] ]
app_name = "calendar" app_name = "widget_calendar"
...@@ -18,7 +18,7 @@ def index(request): ...@@ -18,7 +18,7 @@ def index(request):
body += "<p style='border: 2px solid gray;\ body += "<p style='border: 2px solid gray;\
border-radius:5px;\ border-radius:5px;\
padding:20px 30px;'>\ padding:20px 30px;'>\
{}<br>\ {} <br>\
</p>".format(event) </p>".format(event)
return_string = "<html>\ return_string = "<html>\
......
...@@ -41,7 +41,7 @@ INSTALLED_APPS = [ ...@@ -41,7 +41,7 @@ INSTALLED_APPS = [
'django.contrib.messages', 'django.contrib.messages',
'django.contrib.staticfiles', 'django.contrib.staticfiles',
'dashboard', 'dashboard',
'calendar', 'widget_calendar',
] ]
MIDDLEWARE = [ MIDDLEWARE = [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment