Skip to content

Commit ed3c8ed

Browse files
committed
feat: Restructure project
1 parent 7b3f382 commit ed3c8ed

File tree

105 files changed

+93
-647
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+93
-647
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ indent_size = 4
1414

1515
[*.py]
1616
line_length = 88
17-
known_first_party = algo_sports_api,config
17+
known_first_party = algo_sports,config
1818
multi_line_output = 3
1919
default_section = THIRDPARTY
2020
recursive = true

.envs/.local/.postgres

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
# ------------------------------------------------------------------------------
33
POSTGRES_HOST=postgres
44
POSTGRES_PORT=5432
5-
POSTGRES_DB=algo_sports_api
5+
POSTGRES_DB=algo_sports
66
POSTGRES_USER=debug
77
POSTGRES_PASSWORD=debug

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ tags
267267

268268
### Project template
269269

270-
algo_sports_api/media/
270+
algo_sports/media/
271271

272272
.pytest_cache/
273273

README.md

Lines changed: 13 additions & 0 deletions

README.rst

Lines changed: 0 additions & 102 deletions
This file was deleted.
File renamed without changes.

algo_sports_api/conftest.py renamed to algo_sports/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import pytest
22

3-
from algo_sports_api.users.models import User
4-
from algo_sports_api.users.tests.factories import UserFactory
3+
from algo_sports.users.models import User
4+
from algo_sports.users.tests.factories import UserFactory
55

66

77
@pytest.fixture(autouse=True)
File renamed without changes.

algo_sports_api/contrib/sites/migrations/0003_set_site_domain_and_name.py renamed to algo_sports/contrib/sites/migrations/0003_set_site_domain_and_name.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def update_site_forward(apps, schema_editor):
1414
id=settings.SITE_ID,
1515
defaults={
1616
"domain": "algosports.com",
17-
"name": "algo_sports_api",
17+
"name": "algo_sports",
1818
},
1919
)
2020

File renamed without changes.
File renamed without changes.

algo_sports_api/templates/500.html renamed to algo_sports/templates/500.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,3 @@ <h3>Looks like something went wrong!</h3>
99

1010
<p>We track these errors automatically, but if the problem persists feel free to contact us. In the meantime, try refreshing.</p>
1111
{% endblock content %}
12-
13-

algo_sports_api/templates/account/account_inactive.html renamed to algo_sports/templates/account/account_inactive.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,3 @@ <h1>{% trans "Account Inactive" %}</h1>
99

1010
<p>{% trans "This account is inactive." %}</p>
1111
{% endblock %}
12-

algo_sports_api/templates/account/email.html renamed to algo_sports/templates/account/email.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,3 @@ <h2>{% trans "Add E-mail Address" %}</h2>
7777
$('.form-group').removeClass('row');
7878
</script>
7979
{% endblock %}
80-

algo_sports_api/templates/account/email_confirm.html renamed to algo_sports/templates/account/email_confirm.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,3 @@ <h1>{% trans "Confirm E-mail Address" %}</h1>
2929
{% endif %}
3030

3131
{% endblock %}
32-

algo_sports_api/templates/account/login.html renamed to algo_sports/templates/account/login.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,3 @@ <h1>{% trans "Sign In" %}</h1>
4545
</form>
4646

4747
{% endblock %}
48-

algo_sports_api/templates/account/logout.html renamed to algo_sports/templates/account/logout.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,3 @@ <h1>{% trans "Sign Out" %}</h1>
1919

2020

2121
{% endblock %}
22-

algo_sports_api/templates/account/password_change.html renamed to algo_sports/templates/account/password_change.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,3 @@ <h1>{% trans "Change Password" %}</h1>
1414
<button class="btn btn-primary" type="submit" name="action">{% trans "Change Password" %}</button>
1515
</form>
1616
{% endblock %}
17-

algo_sports_api/templates/account/password_reset.html renamed to algo_sports/templates/account/password_reset.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,3 @@ <h1>{% trans "Password Reset" %}</h1>
2323

2424
<p>{% blocktrans %}Please contact us if you have any trouble resetting your password.{% endblocktrans %}</p>
2525
{% endblock %}
26-
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{% extends "account/base.html" %}
2+
3+
{% load i18n %}
4+
{% load account %}
5+
6+
{% block head_title %}{% trans "Password Reset" %}{% endblock %}
7+
8+
{% block inner %}
9+
<h1>{% trans "Password Reset" %}</h1>
10+
11+
{% if user.is_authenticated %}
12+
{% include "account/snippets/already_logged_in.html" %}
13+
{% endif %}
14+
15+
<p>{% blocktrans %}We have sent you an e-mail. Please contact us if you do not receive it within a few
16+
minutes.{% endblocktrans %}</p>
17+
{% endblock %}

algo_sports_api/templates/account/password_reset_from_key.html renamed to algo_sports/templates/account/password_reset_from_key.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,3 @@ <h1>{% if token_fail %}{% trans "Bad Token" %}{% else %}{% trans "Change Passwor
2222
{% endif %}
2323
{% endif %}
2424
{% endblock %}
25-

algo_sports_api/templates/account/password_reset_from_key_done.html renamed to algo_sports/templates/account/password_reset_from_key_done.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,3 @@
77
<h1>{% trans "Change Password" %}</h1>
88
<p>{% trans 'Your password is now changed.' %}</p>
99
{% endblock %}
10-

algo_sports_api/templates/account/password_set.html renamed to algo_sports/templates/account/password_set.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,3 @@ <h1>{% trans "Set Password" %}</h1>
1414
<input class="btn btn-primary" type="submit" name="action" value="{% trans 'Set Password' %}"/>
1515
</form>
1616
{% endblock %}
17-

algo_sports_api/templates/account/signup.html renamed to algo_sports/templates/account/signup.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,3 @@ <h1>{% trans "Sign Up" %}</h1>
2020
</form>
2121

2222
{% endblock %}
23-

algo_sports_api/templates/account/signup_closed.html renamed to algo_sports/templates/account/signup_closed.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,3 @@ <h1>{% trans "Sign Up Closed" %}</h1>
99

1010
<p>{% trans "We are sorry, but the sign up is currently closed." %}</p>
1111
{% endblock %}
12-

algo_sports_api/templates/account/verification_sent.html renamed to algo_sports/templates/account/verification_sent.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,3 @@ <h1>{% trans "Verify Your E-mail Address" %}</h1>
1010
<p>{% blocktrans %}We have sent an e-mail to you for verification. Follow the link provided to finalize the signup process. Please contact us if you do not receive it within a few minutes.{% endblocktrans %}</p>
1111

1212
{% endblock %}
13-

algo_sports_api/templates/account/verified_email_required.html renamed to algo_sports/templates/account/verified_email_required.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,3 @@ <h1>{% trans "Verify Your E-mail Address" %}</h1>
2121

2222

2323
{% endblock %}
24-

algo_sports_api/templates/base.html renamed to algo_sports/templates/base.html

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="utf-8">
55
<meta http-equiv="x-ua-compatible" content="ie=edge">
6-
<title>{% block title %}algo_sports_api{% endblock title %}</title>
6+
<title>{% block title %}algo_sports{% endblock title %}</title>
77
<meta name="viewport" content="width=device-width, initial-scale=1.0">
88
<meta name="description" content="Backend server for Algo sports">
99
<meta name="author" content="Taejung Heo">
@@ -16,17 +16,17 @@
1616
<link rel="icon" href="{% static 'images/favicons/favicon.ico' %}">
1717

1818
{% block css %}
19-
19+
2020
<!-- Latest compiled and minified Bootstrap CSS -->
2121
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
22-
22+
2323

2424
<!-- Your stuff: Third-party CSS libraries go here -->
2525
{% compress css %}
2626
<!-- This file stores project-specific CSS -->
27-
27+
2828
<link href="{% static 'css/project.css' %}" rel="stylesheet">
29-
29+
3030
{% endcompress %}
3131
{% endblock %}
3232

@@ -39,7 +39,7 @@
3939
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
4040
<span class="navbar-toggler-icon"></span>
4141
</button>
42-
<a class="navbar-brand" href="{% url 'home' %}">algo_sports_api</a>
42+
<a class="navbar-brand" href="{% url 'home' %}">algo_sports</a>
4343

4444
<div class="collapse navbar-collapse" id="navbarSupportedContent">
4545
<ul class="navbar-nav mr-auto">
@@ -94,14 +94,14 @@
9494
================================================== -->
9595
<!-- Placed at the end of the document so the pages load faster -->
9696
{% block javascript %}
97-
97+
9898
<!-- Bootstrap JS and its dependencies-->
9999
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
100100
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
101101
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
102102

103103
<!-- Your stuff: Third-party javascript libraries go here -->
104-
104+
105105

106106
<!-- place project specific Javascript in this file -->
107107
{% compress js %}
@@ -111,4 +111,3 @@
111111
{% endblock javascript %}
112112
</body>
113113
</html>
114-
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{% extends "base.html" %}

algo_sports/templates/pages/home.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{% extends "base.html" %}

algo_sports_api/templates/users/user_detail.html renamed to algo_sports/templates/users/user_detail.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,3 @@ <h2>{{ object.username }}</h2>
3333

3434
</div>
3535
{% endblock content %}
36-
File renamed without changes.
File renamed without changes.

algo_sports_api/users/admin.py renamed to algo_sports/users/admin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from django.contrib.auth import admin as auth_admin
33
from django.contrib.auth import get_user_model
44

5-
from algo_sports_api.users.forms import UserChangeForm, UserCreationForm
5+
from algo_sports.users.forms import UserChangeForm, UserCreationForm
66

77
User = get_user_model()
88

File renamed without changes.

algo_sports_api/users/apps.py renamed to algo_sports/users/apps.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33

44

55
class UsersConfig(AppConfig):
6-
name = "algo_sports_api.users"
6+
name = "algo_sports.users"
77
verbose_name = _("Users")
88

99
def ready(self):
1010
try:
11-
import algo_sports_api.users.signals # noqa F401
11+
import algo_sports.users.signals # noqa F401
1212
except ImportError:
1313
pass
File renamed without changes.

algo_sports_api/users/models.py renamed to algo_sports/users/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66

77
class User(AbstractUser):
8-
"""Default user for algo_sports_api."""
8+
"""Default user for algo_sports."""
99

1010
#: First and last name do not cover name patterns around the globe
1111
name = CharField(_("Name of User"), blank=True, max_length=255)
File renamed without changes.

algo_sports_api/users/tests/test_drf_urls.py renamed to algo_sports/users/tests/test_drf_urls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import pytest
22
from django.urls import resolve, reverse
33

4-
from algo_sports_api.users.models import User
4+
from algo_sports.users.models import User
55

66
pytestmark = pytest.mark.django_db
77

algo_sports_api/users/tests/test_drf_views.py renamed to algo_sports/users/tests/test_drf_views.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import pytest
22
from django.test import RequestFactory
33

4-
from algo_sports_api.users.api.views import UserViewSet
5-
from algo_sports_api.users.models import User
4+
from algo_sports.users.api.views import UserViewSet
5+
from algo_sports.users.models import User
66

77
pytestmark = pytest.mark.django_db
88

algo_sports_api/users/tests/test_forms.py renamed to algo_sports/users/tests/test_forms.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import pytest
22

3-
from algo_sports_api.users.forms import UserCreationForm
4-
from algo_sports_api.users.tests.factories import UserFactory
3+
from algo_sports.users.forms import UserCreationForm
4+
from algo_sports.users.tests.factories import UserFactory
55

66
pytestmark = pytest.mark.django_db
77

algo_sports_api/users/tests/test_models.py renamed to algo_sports/users/tests/test_models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import pytest
22

3-
from algo_sports_api.users.models import User
3+
from algo_sports.users.models import User
44

55
pytestmark = pytest.mark.django_db
66

0 commit comments

Comments
 (0)