Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-Ply: #7

Open
wants to merge 42 commits into
base: 2024-stable
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
c0fb463
Fixmerge
resba Jul 9, 2024
a642596
Merge branch 'mistressAlisi-ply-ng' into ply-ng
resba Jul 9, 2024
8930951
Merge branch 'ply-ng' of github.com:furrydelphia/ply into ply-ng
resba Jul 11, 2024
bb38c71
-Ply:
mistressAlisi Jul 28, 2024
99f0928
-Ply:
mistressAlisi Jul 28, 2024
4a3d8d2
-added placeholder files for default theme
Jul 28, 2024
85f2890
Merge pull request #9 from sona1111/main
mistressAlisi Jul 28, 2024
a69e557
-removed a superfluous r...
Jul 28, 2024
82d1fff
-Ply:
mistressAlisi Jul 28, 2024
390dec1
Merge branch 'mistressAlisi:main' into main
sona1111 Jul 28, 2024
4b3bedc
Merge pull request #10 from sona1111/main
mistressAlisi Jul 28, 2024
aea2da6
Merge pull request #11 from furrydelphia/2024-stable
mistressAlisi Jul 30, 2024
92f8bdc
Ply: Modified the tooling so the whole app can be a library, ie, 'ply…
mistressAlisi Aug 15, 2024
bec64f8
-Ply:
mistressAlisi Aug 15, 2024
407a7e0
-it is now possible to use ply as a library.
mistressAlisi Aug 28, 2024
e3f8669
Update settings.py
resba Sep 12, 2024
7c3d271
-Ply:
mistressAlisi Sep 12, 2024
3eba885
Intermediate commit for merge
mistressAlisi Sep 12, 2024
e10dc54
Ply: Modified the tooling so the whole app can be a library, ie, 'ply…
mistressAlisi Aug 15, 2024
3566f05
-Ply:
mistressAlisi Aug 15, 2024
91a4055
-it is now possible to use ply as a library.
mistressAlisi Aug 28, 2024
d664482
Intermediate commit for merge
mistressAlisi Sep 12, 2024
c5d27ba
Merge branch 'main' of github.com:mistressAlisi/ply
mistressAlisi Sep 12, 2024
9c38721
ply:
mistressAlisi Sep 12, 2024
b89f161
-Ply:
mistressAlisi Sep 12, 2024
9f36468
Athena:
mistressAlisi Sep 12, 2024
4efb347
Merge remote-tracking branch 'origin/main'
mistressAlisi Nov 2, 2024
2c13967
Merge branch 'refs/heads/2024-stable' into production
resba Nov 16, 2024
de2380b
whoops
resba Nov 16, 2024
8337181
Ill fix this later
resba Nov 16, 2024
27f8cc1
Change deploy branch
resba Nov 16, 2024
32c8fc2
Work on frontend unified ui
resba Dec 11, 2024
33b2fc1
-Middleware introduces an user log.
mistressAlisi Dec 18, 2024
c6eb5c6
UFLS
resba Dec 19, 2024
8388277
ufls
resba Dec 19, 2024
579c0d2
addtl stuff
resba Dec 19, 2024
b53e7b5
UFLS
resba Dec 19, 2024
70de5e7
UFLS
resba Dec 19, 2024
805376d
ufls
resba Dec 20, 2024
81df447
Merge pull request #14 from furrydelphia/production
mistressAlisi Dec 27, 2024
596eff3
Merge branch '2024-Stable' of github.com:mistressAlisi/ply
mistressAlisi Dec 27, 2024
075e58b
-UFLS/Ply/Midsummer:
mistressAlisi Dec 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/production-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ name: Publish Docker Image (Production)
on:
push:
branches:
- ply-ng
- 2024-stable
- production

jobs:

Expand Down
12 changes: 12 additions & 0 deletions .idea/dataSources.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/ply.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 6 additions & 7 deletions communities/community/forge_api_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,15 +126,14 @@ def create_community_sidebar_menu(request):
)
if len(is_admin) < 1:
return render(request, "error-access-denied.html", {})
if request.POST["not_edited"] == "False":
logging.info(f"Creating new Sidebar Menu from data: Mode: {request.POST['application_mode']} Module: {request.POST['module']}. Class: {request.POST['sidebar_class']} in Community {request.POST['community']}")
form = CommunitySidebarMenuForm(request.POST)
# form.set_community(community)

else:
try:
created = False
instance = CommunitySidebarMenu.objects.get(pk=request.POST["uuid"])
form = CommunitySidebarMenuForm(request.POST, instance=instance)
except CommunitySidebarMenu.DoesNotExist:
instance,created = CommunitySidebarMenu.objects.get_or_create(pk=request.POST["uuid"])
form = CommunitySidebarMenuForm(request.POST, instance=instance)
if not form.is_valid():
instance.delete()
return JsonResponse({"res": "err", "e": form.errors}, safe=False)
else:
form.instance.not_edited = True
Expand Down
20 changes: 14 additions & 6 deletions communities/community/management/commands/populate_sidebars.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
from django.core.management.base import BaseCommand
from django.contrib.auth.models import User
import os, csv

from django.db import IntegrityError

from communities.community.models import (
Community,
CommunitySidebarMenu
CommunitySidebarMenu, CommunityDashboardType
)
from communities.profiles.models import Profile
from ply.models import PlyApplication
Expand All @@ -18,7 +21,7 @@ def add_arguments(self, parser):
def handle(self, *args, **options):
community = options["community"]
if community == "_all_":
cob = Community.objects.all()[0]
cob = Community.objects.all()
else:
cob = Community.objects.filter(hash=community)
if len(cob) < 1:
Expand All @@ -28,8 +31,13 @@ def handle(self, *args, **options):
)
)
return False
for c in cob:
dtos = PlyApplication.objects.filter(active=True)
for d in dtos:
csmo = CommunitySidebarMenu.get_or_create(community=c,application_mode=d.mode,)
for dt in CommunityDashboardType.objects.all():
for c in cob:
dtos = PlyApplication.objects.all()
for d in dtos:
try:
self.stdout.write(f"Application: {d}, Mode: {dt.type}....")
csmo = CommunitySidebarMenu.objects.get_or_create(community=c,application_mode=dt.type,module=d)
except IntegrityError:
pass
self.stdout.write(self.style.SUCCESS("Success!"))
Original file line number Diff line number Diff line change
@@ -1,18 +1,27 @@
# Generated by Django 5.0.1 on 2024-09-07 03:09
# Generated by Django 5.0.1 on 2024-08-15 01:29

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('community', '0042_merge_20240724_1003'),
("community", "0042_merge_20240724_1003"),
]

operations = [
migrations.AlterField(
model_name='communitysidebarmenu',
name='module',
field=models.TextField(choices=[('communities.preferences', 'communities.preferences'), ('communities.community', 'communities.community'), ('communities.dashboards', 'communities.dashboards'), ('media.gallery.core', 'media.gallery.core'), ('ufls.front', 'ufls.front'), ('ufls.event', 'ufls.event'), ('ufls.registrar', 'ufls.registrar'), ('ufls.dealers', 'ufls.dealers'), ('ufls.scheduling', 'ufls.scheduling'), ('ufls.staff', 'ufls.staff')], help_text='Application to Include in the Menus', max_length=200, verbose_name='Module/AppName:'),
model_name="communitysidebarmenu",
name="module",
field=models.TextField(
choices=[
("communities.preferences", "communities.preferences"),
("communities.community", "communities.community"),
("communities.dashboards", "communities.dashboards"),
("media.gallery.core", "media.gallery.core"),
],
help_text="Application to Include in the Menus",
max_length=200,
verbose_name="Module/AppName:",
),
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Generated by Django 5.0.1 on 2024-08-15 04:52

from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("community", "0043_alter_communitysidebarmenu_module"),
]

operations = [
migrations.AlterField(
model_name="communitysidebarmenu",
name="module",
field=models.TextField(
choices=[
("communities.preferences", "communities.preferences"),
("communities.community", "communities.community"),
("communities.dashboards", "communities.dashboards"),
("media.gallery.core", "media.gallery.core"),
("leagues.sports", "leagues.sports"),
],
help_text="Application to Include in the Menus",
max_length=200,
verbose_name="Module/AppName:",
),
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Generated by Django 5.0.8 on 2024-08-16 01:49

from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("community", "0044_alter_communitysidebarmenu_module"),
]

operations = [
migrations.AlterField(
model_name="communitysidebarmenu",
name="module",
field=models.TextField(
choices=[
("communities.preferences", "communities.preferences"),
("communities.community", "communities.community"),
("communities.dashboards", "communities.dashboards"),
("media.gallery.core", "media.gallery.core"),
("leagues.sports", "leagues.sports"),
("theodds.odds", "theodds.odds"),
("player.wager", "player.wager"),
],
help_text="Application to Include in the Menus",
max_length=200,
verbose_name="Module/AppName:",
),
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Generated by Django 5.0.8 on 2024-08-17 02:12

from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("community", "0045_alter_communitysidebarmenu_module"),
]

operations = [
migrations.AlterField(
model_name="communitysidebarmenu",
name="module",
field=models.TextField(
choices=[
("communities.preferences", "communities.preferences"),
("communities.community", "communities.community"),
("communities.dashboards", "communities.dashboards"),
("media.gallery.core", "media.gallery.core"),
("leagues.sports", "leagues.sports"),
("leagues.matches", "leagues.matches"),
("theodds.odds", "theodds.odds"),
("player.wager", "player.wager"),
],
help_text="Application to Include in the Menus",
max_length=200,
verbose_name="Module/AppName:",
),
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Generated by Django 5.0.1 on 2024-09-12 04:20

from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("community", "0046_alter_communitysidebarmenu_module"),
]

operations = [
migrations.AlterField(
model_name="communitysidebarmenu",
name="module",
field=models.TextField(
choices=[
("communities.preferences", "communities.preferences"),
("communities.community", "communities.community"),
("communities.dashboards", "communities.dashboards"),
("media.gallery.core", "media.gallery.core"),
("ufls.event", "ufls.event"),
("ufls.registrar", "ufls.registrar"),
("ufls.dealers", "ufls.dealers"),
("ufls.staff", "ufls.staff"),
],
help_text="Application to Include in the Menus",
max_length=200,
verbose_name="Module/AppName:",
),
),
]
12 changes: 12 additions & 0 deletions communities/community/models.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from logging import NullHandler

from django.db import models
from django.contrib import admin
import uuid
Expand Down Expand Up @@ -454,6 +456,16 @@ class Meta:
bool_value = models.BooleanField(verbose_name="Boolean Value", null=True, blank=True,default=False)
uuid_value = models.UUIDField(verbose_name="UUID Value", null=True, blank=True)

def clear_all(self,confirm=False):
if confirm:
self.text_value = None
self.int_value = None
self.json_value = None
self.bin_value = None
self.bool_value = False
self.uuid_value = None
self.save()

def __str__(self):
rstr = f"Community: {self.community.name} - Registry Setting {self.key}"
if self.grouping_key:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{% block bootstrap5_content %}

<script src="https://cdnjs.cloudflare.com/ajax/libs/js-cookie/2.2.1/js.cookie.min.js" integrity="sha512-Meww2sXqNHxI1+5Dyh/9KAtvI9RZSA4c1K2k5iL02oiPO/RH3Q30L3M1albtqMg50u4gRTYdV4EXOQqXEI336A==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://kit.fontawesome.com/4f00122db6.js" crossorigin="anonymous"></script>
<script src="https://kit.fontawesome.com/52b95d724a.js" crossorigin="anonymous"></script>
<link href="/static/css/dashboard.css" rel="stylesheet">
<link href="/static/communities.community/css/dashboard/base.css" rel="stylesheet">
<link rel="preconnect" href="https://fonts.googleapis.com">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
</td>
<td>{{app.ordering}}</td>
<td>{{app.active}}</td>
<td><a href="#edit_menu_{{app.pk}}" onclick="community_dashboard.edit_menu('{{app.pk}}');"><i class="fa-solid fa-pen-to-square"></i>&#160;Edit</a></td>
<td><a href="#edit_menu_{{app.pk}}" class="link-danger" onclick="community_dashboard.delete_menu('{{app.pk}}');"><i class="fa-solid fa-trash"></i>&#160;Del</a></td>
<td><a href="#communities.community%2Fmenus%2Feditor" onclick="community_dashboard.edit_menu('{{app.pk}}');"><i class="fa-solid fa-pen-to-square"></i>&#160;Edit</a></td>
<td><a href="#communities.community%2Fmenus%2Feditor" class="link-danger" onclick="community_dashboard.delete_menu('{{app.pk}}');"><i class="fa-solid fa-trash"></i>&#160;Del</a></td>
</tr>
{% endif %}
{% endfor %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

{% block bootstrap5_extra_head %}{% endblock %}
<!-- Font Awesome -->
<script src="https://kit.fontawesome.com/4f00122db6.js" crossorigin="anonymous"></script>
<script src="https://kit.fontawesome.com/52b95d724a.js" crossorigin="anonymous"></script>

<!-- Fonts -->
<link href="https://fonts.googleapis.com/css2?family=Lily+Script+One&display=swap" rel="stylesheet">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def handle(self, *args, **options):
# All profiles must be owned by the primary admin:


# Add a basic Header Widget to the dynapage template:

self.stdout.write(self.style.SUCCESS('Creating Timezone Objects....'))
for tzi in pytz.common_timezones:
dto = datetime.datetime.now(pytz.timezone(tzi))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js" integrity="sha512-894YE6QWD5I59HgZOGReFYm4dnWc1Qt5NtvYSaNcOP+u1T9qYdvdihz0PPSiiqn/+/3e7Jo4EaG7TubfWGUrMQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-cookie/2.2.1/js.cookie.min.js" integrity="sha512-Meww2sXqNHxI1+5Dyh/9KAtvI9RZSA4c1K2k5iL02oiPO/RH3Q30L3M1albtqMg50u4gRTYdV4EXOQqXEI336A==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://kit.fontawesome.com/4f00122db6.js" crossorigin="anonymous"></script>
<script src="https://kit.fontawesome.com/52b95d724a.js" crossorigin="anonymous"></script>
<script src="https://unpkg.com/bs5-toast/dist/bs5-toast.js"></script>
<script type="module" src="/static/dashboard/js/dashboard.js"></script>
<header class="navbar navbar-dark sticky-top bg-dark flex-md-nowrap p-0 shadow">
Expand Down
2 changes: 1 addition & 1 deletion communities/profiles/templates/profiles_index_view.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{{community.name}} - All Profiles
{% endblock %}
{% block bootstrap5_content %}
<script src="https://kit.fontawesome.com/4f00122db6.js" crossorigin="anonymous"></script>
<script src="https://kit.fontawesome.com/52b95d724a.js" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js" integrity="sha512-894YE6QWD5I59HgZOGReFYm4dnWc1Qt5NtvYSaNcOP+u1T9qYdvdihz0PPSiiqn/+/3e7Jo4EaG7TubfWGUrMQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-cookie/2.2.1/js.cookie.min.js" integrity="sha512-Meww2sXqNHxI1+5Dyh/9KAtvI9RZSA4c1K2k5iL02oiPO/RH3Q30L3M1albtqMg50u4gRTYdV4EXOQqXEI336A==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="/static/js/dashboard_loginAgent.js"></script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<link href="https://fonts.googleapis.com/css2?family=Lily+Script+One&display=swap" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js" integrity="sha512-894YE6QWD5I59HgZOGReFYm4dnWc1Qt5NtvYSaNcOP+u1T9qYdvdihz0PPSiiqn/+/3e7Jo4EaG7TubfWGUrMQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-cookie/2.2.1/js.cookie.min.js" integrity="sha512-Meww2sXqNHxI1+5Dyh/9KAtvI9RZSA4c1K2k5iL02oiPO/RH3Q30L3M1albtqMg50u4gRTYdV4EXOQqXEI336A==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://kit.fontawesome.com/4f00122db6.js" crossorigin="anonymous"></script>
<script src="https://kit.fontawesome.com/52b95d724a.js" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
<script src="/static/js/dashboard.js"></script>
<script src="/static/js/gallery_core.js"></script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<link href="https://fonts.googleapis.com/css2?family=Lily+Script+One&display=swap" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js" integrity="sha512-894YE6QWD5I59HgZOGReFYm4dnWc1Qt5NtvYSaNcOP+u1T9qYdvdihz0PPSiiqn/+/3e7Jo4EaG7TubfWGUrMQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-cookie/2.2.1/js.cookie.min.js" integrity="sha512-Meww2sXqNHxI1+5Dyh/9KAtvI9RZSA4c1K2k5iL02oiPO/RH3Q30L3M1albtqMg50u4gRTYdV4EXOQqXEI336A==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://kit.fontawesome.com/4f00122db6.js" crossorigin="anonymous"></script>
<script src="https://kit.fontawesome.com/52b95d724a.js" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
<script src="/static/js/dashboard.js"></script>
<script src="/static/js/gallery_core.js"></script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<link href="https://fonts.googleapis.com/css2?family=Lily+Script+One&display=swap" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js" integrity="sha512-894YE6QWD5I59HgZOGReFYm4dnWc1Qt5NtvYSaNcOP+u1T9qYdvdihz0PPSiiqn/+/3e7Jo4EaG7TubfWGUrMQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-cookie/2.2.1/js.cookie.min.js" integrity="sha512-Meww2sXqNHxI1+5Dyh/9KAtvI9RZSA4c1K2k5iL02oiPO/RH3Q30L3M1albtqMg50u4gRTYdV4EXOQqXEI336A==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://kit.fontawesome.com/4f00122db6.js" crossorigin="anonymous"></script>
<script src="https://kit.fontawesome.com/52b95d724a.js" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>

<div class="sticky-top">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<link href="https://fonts.googleapis.com/css2?family=Lily+Script+One&display=swap" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js" integrity="sha512-894YE6QWD5I59HgZOGReFYm4dnWc1Qt5NtvYSaNcOP+u1T9qYdvdihz0PPSiiqn/+/3e7Jo4EaG7TubfWGUrMQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-cookie/2.2.1/js.cookie.min.js" integrity="sha512-Meww2sXqNHxI1+5Dyh/9KAtvI9RZSA4c1K2k5iL02oiPO/RH3Q30L3M1albtqMg50u4gRTYdV4EXOQqXEI336A==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://kit.fontawesome.com/4f00122db6.js" crossorigin="anonymous"></script>
<script src="https://kit.fontawesome.com/52b95d724a.js" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
<script src="/static/js/dashboard.js"></script>
<script src="/static/js/gallery_core.js"></script>
Expand Down
Loading