-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from Clivern/issue/dev-#26
Issue/dev#28-Validation
- Loading branch information
Showing
63 changed files
with
5,714 additions
and
280 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
""" | ||
Install API Endpoint | ||
""" | ||
|
||
from django.views import View | ||
from django.http import JsonResponse | ||
from django.views.decorators.csrf import csrf_exempt | ||
from django.utils.decorators import method_decorator | ||
from pprint import pprint | ||
|
||
from app.modules.validation.form import Form | ||
from app.modules.util.helpers import Helpers | ||
|
||
@method_decorator(csrf_exempt, name='dispatch') | ||
class Install(View): | ||
|
||
_request = None | ||
_request_data = {} | ||
|
||
_helpers = None | ||
_form = None | ||
|
||
def __init__(self): | ||
self._helpers = Helpers() | ||
self._form = Form() | ||
|
||
def post(self, request): | ||
self._request = request | ||
self._request_data = self._helpers.get_request_data(self._request.POST, { | ||
"app_name" : "", | ||
"app_email" : "", | ||
"admin_username" : "", | ||
"admin_email" : "", | ||
"admin_password" : "" | ||
}) | ||
|
||
print(self._request_data) | ||
|
||
return JsonResponse({"status":"d"}) |
Empty file.
Empty file.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
""" | ||
Forbidden Access Views | ||
""" | ||
|
||
from django.http import JsonResponse | ||
|
||
def csrf_failure(request, reason=""): | ||
return JsonResponse({ | ||
"errors":[{ | ||
"message":"Access forbidden due to invalid or expired CSRF token!", "code":43 | ||
}] | ||
}, status=403) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
""" | ||
Sanitization Rule Not Found | ||
""" | ||
|
||
class Sanitization_Rule_Not_Found(Exception): | ||
"""Sanitization Rule Not Exist Custom Exception""" | ||
|
||
def __init__(self, error_info): | ||
Exception.__init__(self, "Sanitization Rule Not Found!") | ||
self.error_info = error_info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
""" | ||
Validation Rule Not Found | ||
""" | ||
|
||
class Validation_Rule_Not_Found(Exception): | ||
"""Validation Rule Not Exist Custom Exception""" | ||
|
||
def __init__(self, error_info): | ||
Exception.__init__(self, "Validation Rule Not Found!") | ||
self.error_info = error_info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
""" | ||
Upgrade Module | ||
""" | ||
|
||
class Upgrade(): | ||
|
||
def need_upgrade(self): | ||
"""Check if Application need upgrade""" | ||
pass | ||
|
||
def _get_latest_version(self): | ||
"""Get Latest Stable Release""" | ||
pass | ||
|
||
def _get_current_version(self): | ||
"""Get Current Version""" | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
""" | ||
Validation Extensions | ||
""" |
Oops, something went wrong.