Skip to content

Commit

Permalink
Merge pull request #159 from ContriHUB/workflow-fix
Browse files Browse the repository at this point in the history
Fixes and Additions
  • Loading branch information
shank03 authored Oct 4, 2023
2 parents 426232f + 3870660 commit 02dfc16
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/django.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Setup MySQL
- uses: mirromutth/[email protected]
with:
mysql user: 'dbuser' # Required if "mysql root password" is empty, default is empty. The superuser for the specified database. Can use secrets, too
mysql password: '1234' # Required if "mysql user" exists. The password for the "mysql user"
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
Expand Down
4 changes: 2 additions & 2 deletions contrihub/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@
# https://docs.djangoproject.com/en/3.2/ref/settings/#databases

DB_NAME = config('DB_NAME', default='contrihub')
DB_USER = config('DB_USER')
DB_PASSWORD = config('DB_PASSWORD')
DB_USER = config('DB_USER', default='dbuser')
DB_PASSWORD = config('DB_PASSWORD', default='1234')
DB_HOST = config('DB_HOST', default='localhost')
DB_PORT = config('DB_PORT', default='3306')

Expand Down
10 changes: 9 additions & 1 deletion contrihub/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,14 @@
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from decouple import config
from django.contrib import admin
# from django.conf.urls import
from django.urls import path, include, re_path

urlpatterns = [
BASE_URL = config('BASE_URL')

basepatterns = [
path('admin/', admin.site.urls),
path('', include('home.urls')),
path('profile/', include('user_profile.urls')),
Expand All @@ -26,3 +29,8 @@
# this url is handled by social_django app under social-auth-app-django python library
re_path(r'^oauth/', include('social_django.urls', namespace='social')),
]

if BASE_URL:
urlpatterns = [ path(str(BASE_URL), include(basepatterns)) ]
else:
urlpatterns = basepatterns

0 comments on commit 02dfc16

Please sign in to comment.