Skip to content

Commit 81e80dd

Browse files
renzonrenzon
renzon
authored andcommitted
Removed cohort webinário link and added Discord Link
close #4776
1 parent 572713b commit 81e80dd

File tree

7 files changed

+3
-184
lines changed

7 files changed

+3
-184
lines changed

pythonpro/cohorts/templates/cohorts/webinars.html

-46
This file was deleted.

pythonpro/cohorts/tests/conftest.py

+1-14
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
from datetime import timedelta
21
from os import path
32

43
import pytest
54
from django.core.files.uploadedfile import SimpleUploadedFile
6-
from django.utils import timezone
75
from model_bakery import baker
86

97
from pythonpro import settings
10-
from pythonpro.cohorts.models import Cohort, Webinar
8+
from pythonpro.cohorts.models import Cohort
119

1210
img_path = path.join(settings.BASE_DIR, 'pythonpro', 'core', 'static', 'img', 'instructors', 'renzo-nuccitelli.jpeg')
1311

@@ -19,14 +17,3 @@ def cohort(client, django_user_model):
1917
content_type='image/png')
2018
cohort = baker.make(Cohort, slug='guido-van-rossum', title='Guido van Rossum', students=[user], image=image)
2119
return cohort
22-
23-
24-
@pytest.fixture
25-
def webinars(cohort):
26-
now = timezone.now()
27-
image = SimpleUploadedFile(name='renzo-nuccitelli.jpeg', content=open(img_path, 'rb').read(),
28-
content_type='image/png')
29-
return [
30-
baker.make(Webinar, cohort=cohort, vimeo_id=str(i), image=image, start=now + timedelta(days=i)) for i in
31-
range(100, 105)
32-
]

pythonpro/cohorts/tests/test_webinar_detail.py

-56
This file was deleted.

pythonpro/cohorts/tests/test_webinars.py

-48
This file was deleted.

pythonpro/cohorts/urls.py

-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,5 @@
44

55
app_name = 'cohorts'
66
urlpatterns = [
7-
path('webinarios/', views.webinars, name='webinars'),
8-
path('webinarios/<slug:slug>/', views.webinar, name='webinar'),
97
path('aulas/<int:pk>/', views.live_class, name='live_class'),
108
]

pythonpro/cohorts/views.py

+1-17
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,11 @@
11
from django.contrib.auth.decorators import login_required
2-
from django.shortcuts import redirect, render
2+
from django.shortcuts import redirect
33
from django.urls import reverse
44

55
from pythonpro.cohorts import facade
66
from pythonpro.memberkit import facade as memberkit_facade
77

88

9-
@login_required
10-
def webinars(request):
11-
return render(request, 'cohorts/webinars.html', {'webinars': facade.find_recorded_webinars()})
12-
13-
14-
@login_required
15-
def webinar(request, slug):
16-
user = request.user
17-
if memberkit_facade.has_memberkit_account(user):
18-
webinar = facade.find_webinar(slug=slug)
19-
return redirect(webinar.memberkit_url, permanent=True)
20-
if memberkit_facade.has_any_subscription(user):
21-
return redirect(reverse('migrate_to_memberkit'), permanent=True)
22-
return redirect(reverse('checkout:bootcamp_lp'), permanent=False)
23-
24-
259
@login_required
2610
def live_class(request, pk):
2711
user = request.user

pythonpro/core/templates/core/base.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
<a class="nav-link" href="https://plataforma.dev.pro.br">Cursos</a>
6464
</li>
6565
<li class="nav-item">
66-
<a class="nav-link" href="{% url 'cohorts:webinars' %}">Webinários</a>
66+
<a class="nav-link" href="https://l.dev.pro.br/comunidade" target="_blank">Discord</a>
6767
</li>
6868

6969
{% endif %}

0 commit comments

Comments
 (0)