Renaming files to solve namespace error

parent 0164299a
...@@ -3,4 +3,4 @@ from django.apps import AppConfig ...@@ -3,4 +3,4 @@ from django.apps import AppConfig
class WidgetCalendarConfig(AppConfig): class WidgetCalendarConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField' default_auto_field = 'django.db.models.BigAutoField'
name = 'widget_calendar' name = 'calendar'
...@@ -30,7 +30,7 @@ class Migration(migrations.Migration): ...@@ -30,7 +30,7 @@ class Migration(migrations.Migration):
('activity', models.CharField(default='', max_length=100)), ('activity', models.CharField(default='', max_length=100)),
('estimated_hours', models.FloatField(default=0)), ('estimated_hours', models.FloatField(default=0)),
('course', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='assignments.course')), ('course', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='assignments.course')),
('location', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='Venue', to='widget_calendar.location')), ('location', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='Venue', to='calendar.location')),
], ],
), ),
] ]
...@@ -7,7 +7,7 @@ from django.db import migrations, models ...@@ -7,7 +7,7 @@ from django.db import migrations, models
class Migration(migrations.Migration): class Migration(migrations.Migration):
dependencies = [ dependencies = [
('widget_calendar', '0001_initial'), ('calendar', '0001_initial'),
] ]
operations = [ operations = [
......
...@@ -7,7 +7,7 @@ from django.db import migrations, models ...@@ -7,7 +7,7 @@ from django.db import migrations, models
class Migration(migrations.Migration): class Migration(migrations.Migration):
dependencies = [ dependencies = [
('widget_calendar', '0002_alter_event_target_datetime'), ('calendar', '0002_alter_event_target_datetime'),
] ]
operations = [ operations = [
......
...@@ -7,7 +7,7 @@ from django.db import migrations, models ...@@ -7,7 +7,7 @@ from django.db import migrations, models
class Migration(migrations.Migration): class Migration(migrations.Migration):
dependencies = [ dependencies = [
('widget_calendar', '0003_alter_event_target_datetime'), ('calendar', '0003_alter_event_target_datetime'),
] ]
operations = [ operations = [
......
...@@ -7,7 +7,7 @@ from django.db import migrations, models ...@@ -7,7 +7,7 @@ from django.db import migrations, models
class Migration(migrations.Migration): class Migration(migrations.Migration):
dependencies = [ dependencies = [
('widget_calendar', '0004_alter_event_target_datetime'), ('calendar', '0004_alter_event_target_datetime'),
] ]
operations = [ operations = [
......
...@@ -7,7 +7,7 @@ from django.db import migrations, models ...@@ -7,7 +7,7 @@ from django.db import migrations, models
class Migration(migrations.Migration): class Migration(migrations.Migration):
dependencies = [ dependencies = [
('widget_calendar', '0005_alter_event_target_datetime'), ('calendar', '0005_alter_event_target_datetime'),
] ]
operations = [ operations = [
......
...@@ -7,7 +7,7 @@ from django.db import migrations, models ...@@ -7,7 +7,7 @@ from django.db import migrations, models
class Migration(migrations.Migration): class Migration(migrations.Migration):
dependencies = [ dependencies = [
('widget_calendar', '0006_alter_event_target_datetime'), ('calendar', '0006_alter_event_target_datetime'),
] ]
operations = [ operations = [
......
...@@ -7,7 +7,7 @@ from django.db import migrations, models ...@@ -7,7 +7,7 @@ from django.db import migrations, models
class Migration(migrations.Migration): class Migration(migrations.Migration):
dependencies = [ dependencies = [
('widget_calendar', '0007_alter_event_target_datetime'), ('calendar', '0007_alter_event_target_datetime'),
] ]
operations = [ operations = [
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<p> {{ event.location }} </p> <p> {{ event.location }} </p>
</div> </div>
<button onclick="window.location.href='{% url 'calendar:event-edit' pk=object.pk %}';"> <button onclick="window.location.href='{% url 'wcalendar:event-edit' pk=object.pk %}';">
Edit Activity Edit Activity
</button> </button>
......
...@@ -9,4 +9,4 @@ urlpatterns = [ ...@@ -9,4 +9,4 @@ urlpatterns = [
] ]
app_name = "widget_calendar" app_name = "calendar"
...@@ -8,22 +8,22 @@ from .models import Event, Location ...@@ -8,22 +8,22 @@ from .models import Event, Location
def index(request): def index(request):
events = Event.objects.all() events = Event.objects.all()
return render(request, 'widget_calendar/calendar.html', return render(request, 'calendar/calendar.html',
{'events': events, }) {'events': events, })
class EventDetailView(DetailView): class EventDetailView(DetailView):
model = Event model = Event
template_name = 'widget_calendar/event-details.html' template_name = 'calendar/event-details.html'
class EventCreateView(CreateView): class EventCreateView(CreateView):
model = Event model = Event
template_name = 'widget_calendar/event-add.html' template_name = 'calendar/event-add.html'
fields = ["activity", "target_datetime", "estimated_hours", "location", "course"] fields = ["activity", "target_datetime", "estimated_hours", "location", "course"]
class EventUpdateView(UpdateView): class EventUpdateView(UpdateView):
model = Event model = Event
template_name = 'widget_calendar/event-edit.html' template_name = 'calendar/event-edit.html'
fields = '__all__' fields = '__all__'
...@@ -19,7 +19,7 @@ from django.urls import include, path ...@@ -19,7 +19,7 @@ from django.urls import include, path
urlpatterns = [ urlpatterns = [
path('admin/', admin.site.urls), path('admin/', admin.site.urls),
path('', include('dashboard.urls', namespace="dashboard")), path('', include('dashboard.urls', namespace="dashboard")),
path('widget_calendar/', include('widget_calendar.urls', namespace="widget_calendar")), path('calendar/', include('widget_calendar.urls', namespace="calendar")),
path('assignments/', include('assignments.urls', namespace="assignments")), path('assignments/', include('assignments.urls', namespace="assignments")),
path('announcementBoard/', include('announcementBoard.urls', namespace="announcementBoard")), path('announcementBoard/', include('announcementBoard.urls', namespace="announcementBoard")),
path('forum/', include('forum.urls', namespace="forum")), path('forum/', include('forum.urls', namespace="forum")),
......
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