Skip to content
This repository has been archived by the owner on Oct 1, 2022. It is now read-only.

plugin registration #189

Merged
merged 2 commits into from
Sep 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Binary file modified deals/migrations/__pycache__/__init__.cpython-39.pyc
Binary file not shown.
Binary file modified prospect/migrations/__pycache__/__init__.cpython-39.pyc
Binary file not shown.
32 changes: 32 additions & 0 deletions prospect/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,38 @@
from .serializers import ProspectSerializer
import requests, json
import pandas as pd
from django.http import HttpResponse
import requests

# Create your views here.
"""
This view shows how the plugin was registered
"""
def plugin_registration(request):
url = "https://zccore.herokuapp.com/plugin/register"

payload = {
"name": "sales_prospects",
"description": "A Sales Prospects Plugin",
"template_url": "https://sales.zuri.chat",
"sidebar_url": "https://sales.zuri.chat/sidebar",
"install_url": "https://sales.zuri.chat/install",
"icon_url": "icon.png",
"developer_email":"[email protected]",
"developer_name":"Sodiq Azeez"
}
working =True
if working:
return JsonResponse(data={
'Message': 'This plugin has been registered on the marketplace',
"plugin_id": "000000000000000000000000",
"organization_id": "612a3a914acf115e685df8e3",
"collection_name": "prospects",

})




class ProspectsListView(APIView):
"""
Expand Down Expand Up @@ -106,6 +136,8 @@ def post(self, request, *args, **kwargs):
return Response(data={'message':'successful'}, status=status.HTTP_201_CREATED)
return Response(data={"message":"Try again later"}, status=status.HTTP_500_INTERNAL_SERVER_ERROR)



class ProspectsUpdateView(APIView):
serializer_class = ProspectSerializer
queryset = None
Expand Down
Binary file modified prospectapp/sidebar/__pycache__/__init__.cpython-39.pyc
Binary file not shown.
6 changes: 4 additions & 2 deletions prospectapp/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
from django.contrib import admin
from django.urls import path,include
from django.views.generic import TemplateView
from prospect.views import plugin_registration

from .sidebar.views import *
from .info import views
# from prospect import views
# from deals import views


urlpatterns = [
path('admin/', admin.site.urls),
Expand All @@ -29,5 +29,7 @@
path('api/info', views.info),
path('prospects/', include('prospect.urls')),
path('api/info', views.info),
path('register', plugin_registration, name='register'),
path("deals/", include("deals.urls")),
]