Thanks to visit codestin.com
Credit goes to github.com

Skip to content
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
7 changes: 7 additions & 0 deletions bugheist/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,10 @@ DEBUG=True
SUPERUSER=admin11
[email protected]
SUPERUSER_PASSWORD=admi345n@12343453

DOMAIN_NAME=bughiest.com
PORT=80
CALLBACK_URL_FOR_GITHUB=http://127.0.0.1:8000/domain_name
CALLBACK_URL_FOR_GOOGLE=http://127.0.0.1:8000/domain_name
CALLBACK_URL_FOR_FACEBOOK=http://127.0.0.1:8000/domain_name

2 changes: 2 additions & 0 deletions bugheist/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
ADMIN_URL = os.environ.get("ADMIN_URL", "admin")
DOMAIN_NAME = os.environ.get("DOMAIN_NAME","127.0.0.1")
PORT = os.environ.get("PORT","8000")
DEFAULT_FROM_EMAIL = "[email protected]"
SERVER_EMAIL = "[email protected]"

Expand Down
13 changes: 8 additions & 5 deletions website/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@
from django.views.generic import View
from django.views.generic.edit import CreateView
from django.core import serializers
from django.views.decorators.http import require_GET
from django.conf import settings

from rest_framework import viewsets, filters
from user_agents import parse
from rest_framework.authtoken.models import Token
Expand All @@ -61,6 +64,7 @@
from bugheist import settings
from rest_framework.authtoken.views import ObtainAuthToken
from website.models import (

Winner,
Payment,
Wallet,
Expand All @@ -80,7 +84,6 @@
from decimal import Decimal
import stripe
import humanize
from django.views.decorators.http import require_GET

from .serializers import (
IssueSerializer,
Expand Down Expand Up @@ -2652,9 +2655,9 @@ def withdraw(request):
wallet.save()
account_links = stripe.AccountLink.create(
account=account,
return_url="http://127.0.0.1:8000/dashboard/user/stripe/connected/"
return_url=f"http://{settings.DOMAIN_NAME}:{settings.PORT}/dashboard/user/stripe/connected/"
+ request.user.username,
refresh_url="http://127.0.0.1:8000/dashboard/user/profile/"
refresh_url=f"http://{settings.DOMAIN_NAME}:{settings.PORT}/dashboard/user/profile/"
+ request.user.username,
type="account_onboarding",
)
Expand All @@ -2669,9 +2672,9 @@ def withdraw(request):
wallet.save()
account_links = stripe.AccountLink.create(
account=account,
return_url="http://127.0.0.1:8000/dashboard/user/stripe/connected/"
return_url=f"http://{settings.DOMAIN_NAME}:{settings.PORT}/dashboard/user/stripe/connected/"
+ request.user.username,
refresh_url="http://127.0.0.1:8000/dashboard/user/profile/"
refresh_url=f"http://{settings.DOMAIN_NAME}:{settings.PORT}/dashboard/user/profile/"
+ request.user.username,
type="account_onboarding",
)
Expand Down