Skip to content
Snippets Groups Projects
Commit 7eb31468 authored by Alexa Valentová's avatar Alexa Valentová
Browse files

add email settings

parent c5303815
No related branches found
No related tags found
2 merge requests!1208Release,!1201Release career template test
Pipeline #20270 passed
...@@ -148,6 +148,10 @@ V produkci musí být navíc nastaveno: ...@@ -148,6 +148,10 @@ V produkci musí být navíc nastaveno:
| `DJANGO_ALLOWED_HOSTS` | | allowed hosts (více hodnot odděleno čárkami) | | `DJANGO_ALLOWED_HOSTS` | | allowed hosts (více hodnot odděleno čárkami) |
| `CELERY_BROKER_URL` | | URL pro Celery Broker | | `CELERY_BROKER_URL` | | URL pro Celery Broker |
| `CELERY_RESULT_BACKEND` | | URL pro Celery Result Backend | | `CELERY_RESULT_BACKEND` | | URL pro Celery Result Backend |
| `EMAIL_HOST` | SMTP pro odesílání přihlášek do kariér |
| `EMAIL_HOST_USER` | --||-- Username |
| `EMAIL_HOST_PASSWORD` | --||-- Heslo |
| `EMAIL_PORT` | --||-- Port |
Různé: Různé:
...@@ -177,8 +181,6 @@ Přes CRON je třeba na pozadí spouštět Django `manage.py` commandy: ...@@ -177,8 +181,6 @@ Přes CRON je třeba na pozadí spouštět Django `manage.py` commandy:
* `update_callendars` - stáhne a aktualizuje kalendáře (několikrát denně) * `update_callendars` - stáhne a aktualizuje kalendáře (několikrát denně)
* `update_main_timeline_articles` - aktualizuje články na `pirati.cz` z `https://piratipracuji.cz/api/` * `update_main_timeline_articles` - aktualizuje články na `pirati.cz` z `https://piratipracuji.cz/api/`
* `update_redmine_issues` - aktualizuje programované body MS a KS stránek napojených na Redmine (několikrát denně) * `update_redmine_issues` - aktualizuje programované body MS a KS stránek napojených na Redmine (několikrát denně)
* `update_tweets` - aktualizuje tweety podle nastavení na Homepage pirati.cz - vyžaduje mít v .env TWITTER_BEARER_TOKEN, parametr --days určuje stáří tweetů (default 1)
* `update_instagram` - aktualizuje Instagramové posty na Homepage pirati.cz.
### Fulltextové vyhledávání v češtině ### Fulltextové vyhledávání v češtině
......
# Generated by Django 5.0.7 on 2024-12-10 07:37
import wagtail.fields
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('main', '0137_maincareerspage_perex_col_1_and_more'),
]
operations = [
migrations.AddField(
model_name='maincareerpage',
name='content',
field=wagtail.fields.RichTextField(blank=True, verbose_name='Text nabídky'),
),
]
...@@ -11,6 +11,7 @@ from wagtailmetadata.models import MetadataPageMixin ...@@ -11,6 +11,7 @@ from wagtailmetadata.models import MetadataPageMixin
from datetime import date from datetime import date
from shared import blocks as shared_blocks from shared import blocks as shared_blocks
from shared.const import RICH_TEXT_DEFAULT_FEATURES
from shared.models import ( # MenuMixin, from shared.models import ( # MenuMixin,
ArticleMixin, ArticleMixin,
ExtendedMetadataHomePageMixin, ExtendedMetadataHomePageMixin,
...@@ -92,6 +93,11 @@ class MainHomePage(MainHomePageMixin): ...@@ -92,6 +93,11 @@ class MainHomePage(MainHomePageMixin):
class Meta: class Meta:
verbose_name = "HomePage pirati.cz" verbose_name = "HomePage pirati.cz"
@property
def careers_page(self):
return self._first_subpage_of_type(MainCareersPage)
@property @property
def article_page_model(self): def article_page_model(self):
return MainArticlePage return MainArticlePage
...@@ -488,14 +494,28 @@ class MainCareerPage( ...@@ -488,14 +494,28 @@ class MainCareerPage(
default=date.today default=date.today
) )
content = RichTextField(
"Text nabídky",
blank=True,
features=RICH_TEXT_DEFAULT_FEATURES
)
content_panels = Page.content_panels + [ content_panels = Page.content_panels + [
MultiFieldPanel(
[
FieldPanel("submission_end_date"),
FieldPanel("created_date"),
],
"Datumy"
),
FieldPanel("category"), FieldPanel("category"),
FieldPanel("location"), FieldPanel("location"),
FieldPanel("time_cost"), FieldPanel("time_cost"),
FieldPanel("employment_relationship"), FieldPanel("employment_relationship"),
FieldPanel("pay_rate"), FieldPanel("pay_rate"),
FieldPanel("submission_end_date"),
FieldPanel("created_date"), FieldPanel("content"),
] ]
parent_page_types = ["main.MainCareersPage"] parent_page_types = ["main.MainCareersPage"]
......
{% extends "styleguide2/base.html" %}
{% load wagtailcore_tags %}
{% block content %}
{% block navbar %}
{% include 'styleguide2/includes/organisms/layout/navbar.html' with selected_item=page.get_menu_title %}
{% endblock %}
{% block header %}
{% include 'styleguide2/includes/organisms/header/main/career_header.html' with title=page.title %}
{% endblock %}
<main role="main">
<section class="container--wide mb-4 xl:mb-20">
<div class="text-lg mb-6">
<strong>Přihlášky do</strong>: {{ page.submission_end_date }}<br>
<strong>Zveřejněno</strong>: {{ page.created_date }}<br>
</div>
<div class="mb-6">
{{ page.content|richtext }}
</div>
<div data-micromodal-trigger="modal-1" class="lg:mb-3 mb-12">
{% include "styleguide2/includes/atoms/buttons/round_button.html" with text="Přihlásit se" show_arrow_on_hover=True %}
</div>
</section>
</main>
<div class="modal micromodal-slide" id="modal-1" aria-hidden="true">
<div class="modal__overlay" tabindex="-1">
<form
class="modal__container"
role="dialog"
aria-modal="true"
aria-labelledby="modal-1-title"
method="POST"
action=""
>
<header class="modal__header">
<h2 class="modal__title" id="modal-1-title">
Přihlásit se
</h2>
<button class="modal__close" aria-label="Close modal" data-micromodal-close></button>
</header>
<main class="modal__content mb-6" id="modal-1-content">
<div class="form_control">
<section
class="
flex gap-4 flex-nowrap flex-col w-full
lg:flex-row lg:gap-2
"
>
<div class="lg:w-auto w-full">
<input
type="text"
name="name"
maxlength="256"
placeholder="Jméno"
id="id_name"
class="lg:w-auto w-full"
required
>
</div>
<div class="lg:w-auto w-full">
<input
type="text"
name="surname"
maxlength="256"
placeholder="Příjmení"
id="id_surname"
class="lg:w-auto w-full"
required
>
</div>
</section>
<section>
<div class="w-full">
<input
class="w-full"
type="email"
name="email"
maxlength="256"
id="id_email"
placeholder="E-mail"
required
>
</div>
</section>
<section>
<div class="w-full">
<input
class="w-full"
type="tel"
name="phone"
maxlength="19"
id="id_phone"
placeholder="Telefon"
required
>
</div>
</section>
<section>
<div class="w-full">
<textarea
class="w-full"
name="custom_text"
maxlength="65535"
id="id_custom_text"
placeholder="Vlastní text (nepovinný)"
></textarea>
</div>
</section>
<section class="flex flex-col gap-3 lg:items-center lg:flex-row">
<label
class="w-36"
for="cv"
id="cv_label"
>CV: </label>
<input
type="file"
id="cv"
name="cv"
aria-labelledby="cv_label"
class="max-w-64 mr-auto overflow-hidden break-words"
required
>
<small class="text-grey-300">(Povinné)</small>
</section>
<section class="flex flex-col gap-3 lg:items-center lg:flex-row">
<label
class="w-36"
id="cover_letter_label"
for="cover_letter"
>Mot. dopis: </label>
<input
type="file"
id="cover_letter"
name="cover_letter"
aria-labelledby="cover_letter_label"
class="max-w-64 mr-auto overflow-hidden break-words"
required
>
<small class="text-grey-300">(Povinný)</small>
</section>
<section class="flex flex-col gap-3 lg:items-center lg:flex-row">
<label
class="w-36"
id="other_files_label"
for="other_files"
>Ostatní soubory: </label>
<input
type="file"
id="other_files"
name="other_files"
aria-labelledby="other_files_label"
class="max-w-64 mr-auto overflow-hidden break-words"
multiple
>
</section>
<section class="flex flex-row gap-3 items-start leading-none">
<input
type="checkbox"
id="personal_data_agreement"
name="personal_data_agreement"
aria-labelledby="personal_data_agreement_label"
required
>
<label
for="personal_data_agreement"
>Souhlasím se zpracováním osobním údajů (povinné)</label>
</section>
</div>
</main>
<footer
class="
modal__footer flex gap-2 justify-end flex-col items-end
lg:items-start lg:gap-4 lg:flex-row
"
>
<div data-micromodal-close>
{% include "styleguide2/includes/atoms/buttons/round_button_form.html" with type="button" text="Zrušit" show_arrow_on_hover=True %}
</div>
<div>
{% include "styleguide2/includes/atoms/buttons/round_button_form.html" with type="submit" fill="#fff" classes="bg-pirati-yellow text-black" text="Odeslat přihlášku" %}
</div>
</footer>
</form>
</div>
</div>
{% endblock %}
...@@ -168,9 +168,12 @@ DATA_UPLOAD_MAX_NUMBER_FIELDS = None ...@@ -168,9 +168,12 @@ DATA_UPLOAD_MAX_NUMBER_FIELDS = None
# EMAIL # EMAIL
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
EMAIL_BACKEND = env( EMAIL_HOST = env.str("EMAIL_HOST", "")
"DJANGO_EMAIL_BACKEND", default="django.core.mail.backends.dummy.EmailBackend" EMAIL_HOST_USER = env.str("EMAIL_HOST_USER", "")
) EMAIL_HOST_PASSWORD = env.str("EMAIL_HOST_PASSWORD", "")
EMAIL_PORT = env.str("EMAIL_PORT", "")
EMAIL_SUBJECT_PREFIX = env.str("EMAIL_SUBJECT_PREFIX", "[Piráti] ")
# LOGGING # LOGGING
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
......
<{% block element_opener %}a{% endblock %} <{% block element_opener %}a{% endblock %}
{% block href %}href="{% if url %}{{ url }}{% else %}#{% endif %}"{% endblock %} {% block href %}href="{% if url %}{{ url }}{% else %}#{% endif %}"{% endblock %}
{% if type %}
type="{{ type }}"
{% endif %}
class=" class="
flex items-center group rounded-full font-condensed uppercase font-semibold tracking-normal flex items-center group rounded-full font-condensed uppercase font-semibold tracking-normal
hover:no-underline max-w-max hover:no-underline max-w-max
......
...@@ -2,23 +2,25 @@ ...@@ -2,23 +2,25 @@
class="p-6 bg-black text-white flex flex-col gap-2" class="p-6 bg-black text-white flex flex-col gap-2"
> >
<div class="flex justify-between"> <div class="flex justify-between">
<div class="text-xl font-bold">{{ career_offer.name }}</div> <div class="text-xl font-bold">{{ career.title }}</div>
<div class="text-xl font-bold">{{ career_offer.location }}</div> <div class="text-xl font-bold">{{ career.location }}</div>
</div> </div>
<div class="text-xl p-4"> <div class="text-xl p-4">
{{ career_offer.description|safe }} <strong>Časová náročnost</strong>: {{ career.time_cost }}<br>
<strong>Poměr</strong>: {{ career.employment_relationship }}<br>
<strong>Plat</strong>: {{ career.pay_rate }}<br>
</div> </div>
<div class="flex justify-between items-end"> <div class="flex justify-between items-end">
<div> <div>
<em> <em>
Prihlášky do: {{ career_offer.applications_until }}<br> Prihlášky do: {{ career.submission_end_date }}<br>
Zveřejněno: {{ career_offer.created_on }} Zveřejněno: {{ career.created_date }}
</em> </em>
</div> </div>
<div> <div>
{% include "patterns/atoms/buttons/round_button.html" with fill="#fff" classes="bg-pirati-yellow text-black" button_text="Více" url=career_offer.url %} {% include "styleguide2/includes/atoms/buttons/round_button.html" with fill="#fff" classes="bg-pirati-yellow text-black" text="Více" url=career.url show_arrow_on_hover=True %}
</div> </div>
</div> </div>
</div> </div>
\ No newline at end of file
{% extends 'styleguide2/includes/organisms/header/simple_header.html' %}
{% block before_heading %}
{% include 'styleguide2/includes/atoms/header/navigation.html' with classes='mb-6' first_text="Pracovní nabídky" first_link=page.root_page.careers_page.url second_text=page.created_date %}
{% endblock %}
{% block heading_classes %}head-8xl{% endblock %}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment