diff --git a/.github/workflows/running_tests_py.yml b/.github/workflows/running_tests_py.yml
index b4b57dde..67ea451b 100644
--- a/.github/workflows/running_tests_py.yml
+++ b/.github/workflows/running_tests_py.yml
@@ -28,4 +28,4 @@ jobs:
- name: Run Tests
run: |
cd ./Django/communicado
- docker exec communicado_container_test python manage.py test
+ docker exec communicado_container_test python manage.py test --noinput
diff --git a/Django/communicado/pages/models.py b/Django/communicado/pages/models.py
index 1f2ea114..b7bc0e91 100644
--- a/Django/communicado/pages/models.py
+++ b/Django/communicado/pages/models.py
@@ -59,6 +59,14 @@ class Events(models.Model):
category = models.CharField(max_length=50, null=True, blank=True)
artist = models.CharField(max_length=100, null=True, blank=True)
isVerified = models.BooleanField(default=False)
+ #isVerified=models.IntegerField(default=0)
+ # IS_VERIFIED_CHOICES = (
+ # (0, 'Not Checked'),
+ # (1, 'Approved'),
+ # (-1, 'Rejected'),
+ # )
+ # isVerified = models.IntegerField(choices=IS_VERIFIED_CHOICES, default=0)
+
adminID = models.ForeignKey(Admin, on_delete=models.CASCADE, null=True, blank=True,db_column= "adminID")
eventOrganizerID = models.ForeignKey(EventOrganizer, on_delete=models.CASCADE, null=True, blank=True,db_column="eventOrganizerID")
imageURL = models.CharField(max_length=100, null=True, blank=True)
diff --git a/Django/communicado/pages/templates/pages/admin_actions.html b/Django/communicado/pages/templates/pages/admin_actions.html
new file mode 100644
index 00000000..4552a2c0
--- /dev/null
+++ b/Django/communicado/pages/templates/pages/admin_actions.html
@@ -0,0 +1,113 @@
+
+
+
+
+
+ Organizer Account
+
+
+
+
+
+
+
+
Administrator Portal
+
+
+
+
+
+
+
+
+
+
diff --git a/Django/communicado/pages/templates/pages/pending.html b/Django/communicado/pages/templates/pages/pending.html
new file mode 100644
index 00000000..f1ef3b76
--- /dev/null
+++ b/Django/communicado/pages/templates/pages/pending.html
@@ -0,0 +1,9 @@
+
+
+
+ Pending Events
+
+
+ Pending Events
+
+
\ No newline at end of file
diff --git a/Django/communicado/pages/templates/pages/rejected.html b/Django/communicado/pages/templates/pages/rejected.html
new file mode 100644
index 00000000..f716c6af
--- /dev/null
+++ b/Django/communicado/pages/templates/pages/rejected.html
@@ -0,0 +1,9 @@
+
+
+
+ Page Title
+
+
+ Rejected
+
+
\ No newline at end of file
diff --git a/Django/communicado/pages/templates/pages/signup.html b/Django/communicado/pages/templates/pages/signup.html
index e7863454..1a8148e1 100644
--- a/Django/communicado/pages/templates/pages/signup.html
+++ b/Django/communicado/pages/templates/pages/signup.html
@@ -153,7 +153,7 @@ Signup
Name:
Email:
Address:
- Phone Number (Event organizer only):
+ Phone Number (Event organizer only):
Role: Customer Event Organizer
diff --git a/Django/communicado/pages/urls.py b/Django/communicado/pages/urls.py
index 86b4fcfd..671d6a05 100644
--- a/Django/communicado/pages/urls.py
+++ b/Django/communicado/pages/urls.py
@@ -16,6 +16,9 @@
path('userbookinfo',views.userbookeventinfo , name = 'userbookeventinfo'),
path('add_to_cart//', views.add_to_cart, name='add_to_cart'),
path('payment', views.payment, name='payment'),
+ path('admin_actions', views.admin_actions, name='admin_actions'),
+ path('pending', views.pending, name='pending'),
+ path('rejected', views.rejected, name='rejected'),
]
diff --git a/Django/communicado/pages/views.py b/Django/communicado/pages/views.py
index 877f2c97..f05c1401 100644
--- a/Django/communicado/pages/views.py
+++ b/Django/communicado/pages/views.py
@@ -2,7 +2,7 @@
from unicodedata import numeric
from django.shortcuts import render,redirect,get_object_or_404
from django.contrib.auth.hashers import make_password,check_password
-from .models import users, EventOrganizer, Events
+from .models import *
from django.contrib import messages
from django.shortcuts import render, redirect, get_object_or_404
from .models import Events , BookedEvent
@@ -30,6 +30,8 @@ def login(request):
success_message = "Welcome " + user.name + ", userid:"+ str(user.userID) # Accessing name from the user object
messages.success(request, success_message)
return redirect('organizer_actions')
+ elif user.role == 'Admin':
+ return redirect('admin_actions')
else:
success_message = "Welcome " + user.name + ", userid:"+ str(user.userID) # Accessing name from the user object
@@ -60,6 +62,7 @@ def signup(request):
if role.__eq__('EventOrganizer'):
event_organizer = EventOrganizer(user=user, phoneNumber=phoneNumber)
event_organizer.save()
+
success_message = "User Account Created for: " + user.name
return render(request, 'pages/login.html', {'success_message': success_message})
@@ -292,4 +295,18 @@ def payment(request):
return render(request, 'pages/payment.html')
+def admin_actions(request):
+ userData = users.objects.all()
+ context = {"userData": userData, }
+ return render (request,"pages/admin_actions.html",context)
+def pending(request):
+ userData = users.objects.all()
+ context = {"userData": userData, }
+ return render (request,"pages/pending.html",context)
+
+def rejected(request):
+ userData = users.objects.all()
+ context = {"rejected": userData, }
+ return render (request,"pages/rejected.html",context)
+
\ No newline at end of file