소스 검색

Merge branch 'unstable' of https://git.sharix-app.org/ShariX_Open/sharix-open-webapp-base into unstable

1Mike21 1 년 전
부모
커밋
fe97f1cb12
6개의 변경된 파일12개의 추가작업 그리고 10개의 파일을 삭제
  1. 1 1
      SharixAdmin/templates/SharixAdmin/auth.html
  2. 5 4
      SharixAdmin/views/partner_info.py
  3. 3 0
      SharixAdmin/views/service_info.py
  4. 1 1
      bin/webuser.sh
  5. 2 4
      core/urls.py
  6. 0 0
      install_unix.sh

+ 1 - 1
SharixAdmin/templates/SharixAdmin/auth.html

@@ -6,7 +6,7 @@
 <div class="text-center" style="margin-top: 150px;">
     <div class="form-signin" style="width: 100%; max-width:330px; margin: auto; display:block;">
         <form class="m-2 p-2" method="post">
-            <img class="mb-4" src="{% static 'SharixAdmin/img/logo.png' %}" alt="" width="72" >
+            <img class="mb-4" style="height: 100px;" src="{% static 'SharixAdmin/img/logo.png' %}" alt="" >
             <h1 class="h3 mb-3 fw-normal">{% trans 'Log in' %}</h1>
             {% csrf_token %}
             

+ 5 - 4
SharixAdmin/views/partner_info.py

@@ -14,6 +14,10 @@ from core.config import API_URL
 api = AuthAPI("89855703300", "12345")
 import requests
 from django.urls import reverse_lazy
+from django.contrib.auth.hashers import check_password
+
+import xmpp
+from xmpp import cli
 
 class PartnerInformationCreate(UserPassesTestMixin, CreateView):
     model = Company
@@ -30,15 +34,12 @@ class PartnerInformationCreate(UserPassesTestMixin, CreateView):
             "title": "service_create",
             "note": str(form.data),
         }
-        
         resp = requests.post(f"{API_URL}/tickets/api/tickets/", data=new_ticket, headers=api.headers)
         jso = resp.json()
-        print(resp.content)
-        print(resp.json())
-        print(resp)
         form.instance.ticket_status = Task.objects.get(pk=int(jso['id']))
         print(form.cleaned_data)
         responce = super().form_valid(form)
+        cli.send_message("open_tickets_backend@ej.sharix-app.org", "eb177b1c9f99a7a13798928318d7a72c", "open_strequest_new@ej.sharix-app.org", str(jso))
         return responce
 
     def get_context_data(self, **kwargs):

+ 3 - 0
SharixAdmin/views/service_info.py

@@ -13,6 +13,8 @@ api = AuthAPI("89855703300", "12345")
 import requests
 from django.urls import reverse_lazy
 from datetime import timezone
+import xmpp
+from xmpp import cli
 
 class ServiceInformationCreate(UserPassesTestMixin, CreateView):
     model = Service
@@ -33,6 +35,7 @@ class ServiceInformationCreate(UserPassesTestMixin, CreateView):
         form.instance.ticket_status = Task.objects.get(pk=int(jso['id']))
         print(form.cleaned_data)
         responce = super().form_valid(form)
+        cli.send_message("open_tickets_backend@ej.sharix-app.org", "eb177b1c9f99a7a13798928318d7a72c", "open_strequest_new@ej.sharix-app.org", str(jso))
         return responce
 
 

+ 1 - 1
bin/webuser.sh

@@ -1,5 +1,5 @@
 #!/bin/bash
 #cd /path/to/project
-cd /root/sharix-open-webapp-base
+cd /root/sharix-open-webapp-base/
 #exec /path/to/project/env/bin/gunicorn core.wsgi:application -c core/conf_gunicorn.py
 exec /root/sharix-open-webapp-base/env/bin/gunicorn core.wsgi:application -c core/conf_gunicorn.py

+ 2 - 4
core/urls.py

@@ -22,10 +22,8 @@ urlpatterns = (
     )
 
     
-
-    + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
-    + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
   )
 
 if settings.DEBUG:
-    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
+    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
+    urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)

+ 0 - 0
install_unix.sh