fix: fixed urls for prod

This commit is contained in:
Rushil Umaretiya 2021-02-15 16:10:14 -05:00
parent dff1b6eaff
commit d4c392916c
No known key found for this signature in database
GPG Key ID: 4E8FAF9C926AF959
5 changed files with 16 additions and 10 deletions

View File

@ -150,8 +150,10 @@ STATIC_URL = '/static/'
if DEBUG:
STATIC_PREFIX = STATIC_URL
URL_PREFIX = ''
else:
STATIC_PREFIX = '/launchx' + STATIC_URL
URL_PREFIX = '/launchx'
CRISPY_TEMPLATE_PACK = 'bootstrap4'

View File

@ -9,6 +9,6 @@
<main class="signup">
<h1>Congrats!</h1>
<h4>You've successfully signed up for InnovateTJ, please check your email for a confirmation. We'll see you there!</h4>
<a href="{% url 'landing' %}"><button class="btn btn-light">Back</button></a>
<a href="{% url '/' %}"><button class="btn btn-light">Back</button></a>
</main>
{% endblock %}

View File

@ -42,7 +42,7 @@
</div>
<div class="col-sm-4 sign-up">
<h1>Sign up </h>
<a href="{% url 'competitor-signup' %}" class="btn btn-light signup">Here</a>
<a href="{% url '/innovate/signup' %}" class="btn btn-light signup">Here</a>
</div>
</section>
{% endblock %}

View File

@ -22,23 +22,23 @@
<header class="site-header">
<nav class="navbar navbar-expand-lg navbar-dark">
<div class="container">
<a class="navbar-brand mr-4" href="{% url 'landing' %}">LaunchX</a>
<a class="navbar-brand mr-4" href="{% url '/' %}">LaunchX</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarToggle" aria-controls="navbarToggle" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarToggle">
<div class="navbar-nav mr-auto">
<a class="nav-item nav-link {% if request.resolver_match.url_name == 'landing' %}active{% endif %}" href="{% url 'landing' %}">Home</a>
<a class="nav-item nav-link {% if request.resolver_match.url_name == 'innovate-home' %}active{% endif %}" href="{% url 'innovate-home' %}">InnovateTJ</a>
<a class="nav-item nav-link {% if request.resolver_match.url_name == 'calendar' %}active{% endif %}" href="{% url 'calendar' %}">Calendar</a>
<a class="nav-item nav-link {% if request.resolver_match.url_name == 'officers' %}active{% endif %}" href="{% url 'officers' %}">Officers</a>
<a class="nav-item nav-link {% if request.resolver_match.url_name == 'landing' %}active{% endif %}" href="{% url '/' %}">Home</a>
<a class="nav-item nav-link {% if request.resolver_match.url_name == 'innovate-home' %}active{% endif %}" href="{% url '/innovate' %}">InnovateTJ</a>
<a class="nav-item nav-link {% if request.resolver_match.url_name == 'calendar' %}active{% endif %}" href="{% url '/calendar' %}">Calendar</a>
<a class="nav-item nav-link {% if request.resolver_match.url_name == 'officers' %}active{% endif %}" href="{% url '/officers' %}">Officers</a>
</div>
<!-- Navbar Right Side -->
<div class="navbar-nav">
{% if user.is_authenticated %}
<a class="nav-item nav-link" href="{% url 'logout' %}">Logout</a>
<a class="nav-item nav-link" href="{% url '/logout' %}">Logout</a>
{% else %}
<a class="nav-item nav-link" href="{% url 'login' %}">Login</a>
<a class="nav-item nav-link" href="{% url '/login' %}">Login</a>
{% endif %}
</div>
</div>

View File

@ -5,4 +5,8 @@ register = template.Library()
@register.simple_tag
def static(file_location):
return settings.STATIC_PREFIX + file_location
return settings.STATIC_PREFIX + file_location
@register.simple_tag
def url(url):
return settings.URL_PREFIX + url