From 2dfed1604e6e5274ef731d5b4d7ee217bacc2b74 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 30 May 2024 12:54:17 +0000 Subject: [PATCH 1/9] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- funnel/assets/js/schedule_view.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/funnel/assets/js/schedule_view.js b/funnel/assets/js/schedule_view.js index 221203bfe..538b82d94 100644 --- a/funnel/assets/js/schedule_view.js +++ b/funnel/assets/js/schedule_view.js @@ -276,7 +276,8 @@ const Schedule = { this.config.slotInterval ); if (this.config.schedule[session.eventDay]) { - this.config.schedule[session.eventDay].sessions[session.startTime].showLabel = true; + this.config.schedule[session.eventDay].sessions[session.startTime].showLabel = + true; this.config.schedule[session.eventDay].sessions[session.startTime].rooms[ session.room_scoped_name ].talk = session; From 8af5a26e975cd78626dda15836c8f2c333e6528f Mon Sep 17 00:00:00 2001 From: Amogh M Aradhya Date: Fri, 31 May 2024 10:45:56 +0530 Subject: [PATCH 2/9] Added length validator --- funnel/forms/project.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/funnel/forms/project.py b/funnel/forms/project.py index 88aacf9f3..300dd44da 100644 --- a/funnel/forms/project.py +++ b/funnel/forms/project.py @@ -52,7 +52,7 @@ class ProjectForm(forms.Form): title = forms.StringField( __("Title"), - validators=[forms.validators.DataRequired()], + validators=[forms.validators.DataRequired(), forms.validators.Length(max=250)], filters=[forms.filters.strip()], ) tagline = forms.StringField( From 79fe12d587d614fb2adffdfa6f9a4d897ad6fe93 Mon Sep 17 00:00:00 2001 From: Kiran Jonnalagadda Date: Fri, 31 May 2024 11:06:16 +0530 Subject: [PATCH 3/9] Add title length validators --- funnel/forms/auth_client.py | 2 +- funnel/forms/project.py | 5 ++++- funnel/forms/session.py | 5 ++++- funnel/forms/update.py | 5 ++++- funnel/forms/venue.py | 10 ++++++++-- 5 files changed, 21 insertions(+), 6 deletions(-) diff --git a/funnel/forms/auth_client.py b/funnel/forms/auth_client.py index 82110f021..7b4dab649 100644 --- a/funnel/forms/auth_client.py +++ b/funnel/forms/auth_client.py @@ -33,7 +33,7 @@ class AuthClientForm(forms.Form): title = forms.StringField( __("Application title"), - validators=[forms.validators.DataRequired()], + validators=[forms.validators.DataRequired(), forms.validators.Length(max=250)], filters=[forms.filters.strip()], description=__("The name of your application"), ) diff --git a/funnel/forms/project.py b/funnel/forms/project.py index 300dd44da..e2f812d1e 100644 --- a/funnel/forms/project.py +++ b/funnel/forms/project.py @@ -52,7 +52,10 @@ class ProjectForm(forms.Form): title = forms.StringField( __("Title"), - validators=[forms.validators.DataRequired(), forms.validators.Length(max=250)], + validators=[ + forms.validators.DataRequired(), + forms.validators.Length(max=Project.__title_length__), + ], filters=[forms.filters.strip()], ) tagline = forms.StringField( diff --git a/funnel/forms/session.py b/funnel/forms/session.py index 2bec70d1e..f8796ce87 100644 --- a/funnel/forms/session.py +++ b/funnel/forms/session.py @@ -17,7 +17,10 @@ class SessionForm(forms.Form): title = forms.StringField( __("Title"), - validators=[forms.validators.DataRequired()], + validators=[ + forms.validators.DataRequired(), + forms.validators.Length(max=Session.__title_length__), + ], filters=[forms.filters.strip()], ) venue_room_id = forms.SelectField( diff --git a/funnel/forms/update.py b/funnel/forms/update.py index 6a299eaba..53b11613b 100644 --- a/funnel/forms/update.py +++ b/funnel/forms/update.py @@ -15,7 +15,10 @@ class UpdateForm(forms.Form): title = forms.StringField( __("Title"), - validators=[forms.validators.DataRequired()], + validators=[ + forms.validators.DataRequired(), + forms.validators.Length(max=Update.__title_length__), + ], filters=[forms.filters.strip()], ) body = forms.MarkdownField( diff --git a/funnel/forms/venue.py b/funnel/forms/venue.py index 8df27ce76..59efc719a 100644 --- a/funnel/forms/venue.py +++ b/funnel/forms/venue.py @@ -25,7 +25,10 @@ class VenueForm(forms.Form): title = forms.StringField( __("Name"), description=__("Name of the venue"), - validators=[forms.validators.DataRequired(), forms.validators.Length(max=250)], + validators=[ + forms.validators.DataRequired(), + forms.validators.Length(max=Venue.__title_length__), + ], filters=[forms.filters.strip()], ) description = forms.MarkdownField( @@ -88,7 +91,10 @@ class VenueRoomForm(forms.Form): title = forms.StringField( __("Name"), description=__("Name of the room"), - validators=[forms.validators.DataRequired(), forms.validators.Length(max=250)], + validators=[ + forms.validators.DataRequired(), + forms.validators.Length(max=VenueRoom.__title_length__), + ], filters=[forms.filters.strip()], ) description = forms.MarkdownField( From 2451937d3320b319d02b3faddbc87d5f0eaec1ac Mon Sep 17 00:00:00 2001 From: Kiran Jonnalagadda Date: Fri, 31 May 2024 11:08:30 +0530 Subject: [PATCH 4/9] Do cheaper test first --- funnel/templates/project.html.jinja2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/funnel/templates/project.html.jinja2 b/funnel/templates/project.html.jinja2 index 68dc22e5b..3e50a09d9 100644 --- a/funnel/templates/project.html.jinja2 +++ b/funnel/templates/project.html.jinja2 @@ -74,7 +74,7 @@ {%- endif %}{%- endwith %} - {% if project.view_for('edit').is_available() and project.state.DRAFT %} + {% if project.state.DRAFT and project.view_for('edit').is_available() %}
{% trans %}This project is not published. Visit settings to publish{% endtrans %} {{ faicon(icon='arrow-right') }} From 6c0e47cf6fc5fe954ee44ccb72cf8b9ee698fec5 Mon Sep 17 00:00:00 2001 From: Kiran Jonnalagadda Date: Fri, 31 May 2024 11:14:04 +0530 Subject: [PATCH 5/9] Spacing fixes --- funnel/templates/project_layout.html.jinja2 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/funnel/templates/project_layout.html.jinja2 b/funnel/templates/project_layout.html.jinja2 index a41586f88..1f1cd7690 100644 --- a/funnel/templates/project_layout.html.jinja2 +++ b/funnel/templates/project_layout.html.jinja2 @@ -137,7 +137,7 @@ {% endmacro %} {% macro buy_button(project, include_eyebrow_text=true) %} -
+
{% if include_eyebrow_text %} {{ project.views.buy_button_eyebrow_text() }} {% endif %} @@ -156,7 +156,7 @@ {% macro registerblock(project) %}
{%- if project.features.rsvp_registered %} - {% elif project.features.rsvp %} -
+
{%- if current_auth.is_anonymous %} {{ project.views.register_button_text() }} {% elif project.features.rsvp_unregistered -%} @@ -191,7 +191,7 @@ {%- endif %}
{% elif project.buy_tickets_url.url -%} -
+ {% elif project.features.rsvp_for_members -%} @@ -199,7 +199,7 @@
{% endif %} {% if project.current_roles.account_member %} -
+
{% elif project.features.show_tickets %} {{ buy_button(project) }} {%- endif %} @@ -338,7 +338,7 @@
{%- elif sponsorship.member.description %}
- {{ sponsorship.member.description.html|preview(min=200, max=300) }} + {{ sponsorship.member.description|preview(min=200, max=300) }} {%- if sponsor_public %} {% trans %}more{% endtrans %}{{ faicon(icon='caret-right-solid', baseline=false, css_class="mui--align-middle") }} {% endif %} From 4ebf326aa7f618ece4c217a685563d64615db42a Mon Sep 17 00:00:00 2001 From: Kiran Jonnalagadda Date: Fri, 31 May 2024 11:16:49 +0530 Subject: [PATCH 6/9] Correct view name --- funnel/templates/project.html.jinja2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/funnel/templates/project.html.jinja2 b/funnel/templates/project.html.jinja2 index 3e50a09d9..70a469e32 100644 --- a/funnel/templates/project.html.jinja2 +++ b/funnel/templates/project.html.jinja2 @@ -74,7 +74,7 @@ {%- endif %}{%- endwith %} - {% if project.state.DRAFT and project.view_for('edit').is_available() %} + {% if project.state.DRAFT and project.view_for('settings').is_available() %}
{% trans %}This project is not published. Visit settings to publish{% endtrans %} {{ faicon(icon='arrow-right') }} From cd3668e53609150c0bce1dd794c423f61f90fb01 Mon Sep 17 00:00:00 2001 From: Kiran Jonnalagadda Date: Fri, 31 May 2024 13:01:28 +0530 Subject: [PATCH 7/9] Better flask shell using ptpython (#2069) Also upgrade other Python dependencies and fix issues. --- .pre-commit-config.yaml | 2 +- funnel/devtest.py | 4 ++- funnel/utils/markdown/escape.py | 12 ++++++- pyproject.toml | 1 + requirements/base.in | 1 + requirements/base.txt | 15 +++++---- requirements/dev.in | 1 + requirements/dev.txt | 24 ++++++++++---- requirements/test.txt | 4 +-- tests/conftest.py | 31 +++++++++---------- .../views/idempotent_request_test.py | 1 + 11 files changed, 63 insertions(+), 33 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6ec7e3137..d54c51fbc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -55,7 +55,7 @@ repos: - id: pyupgrade args: ['--keep-runtime-typing', '--py311-plus'] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.4.5 + rev: v0.4.6 hooks: - id: ruff args: ['--fix', '--exit-non-zero-on-fix'] diff --git a/funnel/devtest.py b/funnel/devtest.py index 219056e49..a9576a2a0 100644 --- a/funnel/devtest.py +++ b/funnel/devtest.py @@ -29,6 +29,8 @@ from .typing import ReturnView if TYPE_CHECKING: + from multiprocessing.process import BaseProcess + from _typeshed.wsgi import StartResponse, WSGIEnvironment __all__ = ['AppByHostWsgi', 'BackgroundWorker', 'devtest_app'] @@ -338,7 +340,7 @@ def __init__( self.timeout = timeout self.clean_stop = clean_stop self.daemon = daemon - self._process: multiprocessing.process.BaseProcess | None = None + self._process: BaseProcess | None = None self.mock_transports = mock_transports manager = mpcontext.Manager() diff --git a/funnel/utils/markdown/escape.py b/funnel/utils/markdown/escape.py index 9d965e94a..eb90f121f 100644 --- a/funnel/utils/markdown/escape.py +++ b/funnel/utils/markdown/escape.py @@ -7,7 +7,16 @@ import string from collections.abc import Callable, Iterable, Mapping from functools import wraps -from typing import Any, Concatenate, ParamSpec, Self, SupportsIndex, TypeVar, cast +from typing import ( + Any, + Concatenate, + ParamSpec, + Self, + SupportsIndex, + TypeVar, + cast, + no_type_check, +) __all__ = ['MarkdownString', 'markdown_escape'] @@ -88,6 +97,7 @@ def _escape_argspec( return obj +@no_type_check # For TypeGuard, since this is used within class definition below def _simple_escaping_wrapper( func: Callable[Concatenate[Any, _P], str], ) -> Callable[Concatenate[Any, _P], MarkdownString]: diff --git a/pyproject.toml b/pyproject.toml index 3107a9ddb..b03175dde 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,6 +31,7 @@ deps-file = "requirements/base.in" exclude-deps = [ "argon2-cffi", # Optional dep for passlib "bcrypt", # Optional dep for passlib + "flask-moreshell", # Auto-imported by Flask "greenlet", # Optional dep for SQLAlchemy's asyncio support "gunicorn", # Not imported, used as server "linkify-it-py", # Optional dep for markdown-it-py diff --git a/requirements/base.in b/requirements/base.in index 098c6c4b1..2f3ff33e4 100644 --- a/requirements/base.in +++ b/requirements/base.in @@ -17,6 +17,7 @@ Flask-Executor Flask-FlatPages flask-mailman Flask-Migrate +flask-moreshell Flask-Redis Flask-RQ2 Flask-SQLAlchemy diff --git a/requirements/base.txt b/requirements/base.txt index b8cc91b85..3594e2915 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -1,4 +1,4 @@ -# SHA1:3e7db2aee0e485905a49d991d7372a8f2a35b5ae +# SHA1:5f90855f3a570ce53e6e6a8535075ec897910b30 # # This file is autogenerated by pip-compile-multi # To update, run: @@ -27,7 +27,7 @@ alembic==1.13.1 # flask-migrate aniso8601==9.0.1 # via coaster -anyio==4.3.0 +anyio==4.4.0 # via httpx argon2-cffi==23.1.0 # via -r requirements/base.in @@ -84,6 +84,7 @@ click==8.1.7 # via # -r requirements/base.in # flask + # flask-moreshell # rq crontab==1.0.1 # via rq-scheduler @@ -143,6 +144,8 @@ flask-migrate==4.0.7 # via # -r requirements/base.in # coaster +flask-moreshell==0.1.5 + # via -r requirements/base.in flask-redis==0.4.0 # via -r requirements/base.in flask-rq2==18.3 @@ -365,7 +368,7 @@ redis==5.0.4 # rq-dashboard redis-sentinel-url==1.0.1 # via rq-dashboard -requests==2.32.2 +requests==2.32.3 # via # -r requirements/base.in # baseframe @@ -401,7 +404,7 @@ semantic-version==2.10.0 # via # baseframe # coaster -sentry-sdk==2.2.1 +sentry-sdk==2.3.1 # via baseframe six==1.16.0 # via @@ -444,11 +447,11 @@ tuspy==1.0.3 # via pyvimeo tweepy==4.14.0 # via -r requirements/base.in -twilio==9.0.5 +twilio==9.1.0 # via -r requirements/base.in types-python-dateutil==2.9.0.20240316 # via arrow -typing-extensions==4.11.0 +typing-extensions==4.12.0 # via # -r requirements/base.in # alembic diff --git a/requirements/dev.in b/requirements/dev.in index 5998aac52..19a4e8f2d 100644 --- a/requirements/dev.in +++ b/requirements/dev.in @@ -6,6 +6,7 @@ mypy-json-report pip-compile-multi po2json pre-commit +ptpython pylint pyupgrade reformat-gherkin diff --git a/requirements/dev.txt b/requirements/dev.txt index 52520e89f..85049edf2 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -1,4 +1,4 @@ -# SHA1:8dcd7551d6ce635f4c126eaa1b7ad8cc661dc4ee +# SHA1:207fc32547b0dca4f38f3f6edbc1d2721d8dc120 # # This file is autogenerated by pip-compile-multi # To update, run: @@ -12,6 +12,8 @@ # via # -r requirements/base.in # baseframe +appdirs==1.4.4 + # via ptpython astroid==3.2.2 # via pylint build==1.2.1 @@ -32,6 +34,8 @@ identify==2.5.36 # via pre-commit isort==5.13.2 # via pylint +jedi==0.19.1 + # via ptpython mccabe==0.7.0 # via pylint mkinit==1.1.0 @@ -40,8 +44,10 @@ mypy==1.10.0 # via -r requirements/dev.in mypy-json-report==1.2.0 # via -r requirements/dev.in -nodeenv==1.8.0 +nodeenv==1.9.0 # via pre-commit +parso==0.8.4 + # via jedi pip-compile-multi==2.6.3 # via -r requirements/dev.in pip-tools==7.4.1 @@ -54,6 +60,10 @@ po2json==0.2.2 # via -r requirements/dev.in pre-commit==3.7.1 # via -r requirements/dev.in +prompt-toolkit==3.0.45 + # via ptpython +ptpython==3.0.27 + # via -r requirements/dev.in pylint==3.2.2 # via -r requirements/dev.in pyproject-hooks==1.1.0 @@ -64,7 +74,7 @@ pyupgrade==3.15.2 # via -r requirements/dev.in reformat-gherkin==3.0.1 # via -r requirements/dev.in -ruff==0.4.4 +ruff==0.4.6 # via -r requirements/dev.in tokenize-rt==5.2.0 # via pyupgrade @@ -110,9 +120,9 @@ types-pyyaml==6.0.12.20240311 # via -r requirements/dev.in types-redis==4.6.0.20240425 # via -r requirements/dev.in -types-requests==2.32.0.20240521 +types-requests==2.32.0.20240523 # via -r requirements/dev.in -types-setuptools==69.5.0.20240522 +types-setuptools==70.0.0.20240524 # via types-cffi types-zxcvbn==4.4.1.20240106 # via -r requirements/dev.in @@ -121,7 +131,9 @@ ubelt==1.3.5 virtualenv==20.26.2 # via pre-commit wcwidth==0.2.13 - # via reformat-gherkin + # via + # prompt-toolkit + # reformat-gherkin wheel==0.43.0 # via pip-tools diff --git a/requirements/test.txt b/requirements/test.txt index 41ed26706..fcbebb1aa 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -14,7 +14,7 @@ # baseframe beautifulsoup4==4.12.3 # via -r requirements/test.in -coverage[toml]==7.5.1 +coverage[toml]==7.5.3 # via # -r requirements/test.in # coveralls @@ -77,7 +77,7 @@ text-unidecode==1.3 # via python-slugify tomlkit==0.12.5 # via -r requirements/test.in -typeguard==4.2.1 +typeguard==4.3.0 # via -r requirements/test.in # The following packages are considered to be unsafe in a requirements file: diff --git a/tests/conftest.py b/tests/conftest.py index 3e1b3ae91..09f3ded48 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -20,15 +20,7 @@ from pprint import saferepr from textwrap import indent from types import MethodType, ModuleType, SimpleNamespace -from typing import ( - TYPE_CHECKING, - Any, - NamedTuple, - Protocol, - cast, - get_type_hints, - runtime_checkable, -) +from typing import TYPE_CHECKING, Any, NamedTuple, Protocol, Self, cast, get_type_hints from unittest.mock import patch import flask @@ -134,7 +126,7 @@ def pytest_runtest_call(item: pytest.Function) -> None: ) for attr, type_ in annotations.items(): - if attr in item.funcargs: + if attr in item.funcargs and not getattr(type_, '_is_protocol', False): typeguard.check_type(item.funcargs[attr], type_) @@ -349,7 +341,6 @@ def rich_console() -> Console: return Console(highlight=False) -@runtime_checkable class PrintStackProtocol(Protocol): def __call__(self, skip: int = 0, limit: int | None = None) -> None: ... @@ -1170,8 +1161,20 @@ def commit_before_open(*args: Any, **kwargs: Any) -> TestResponse: return client -@runtime_checkable +class BackgroundWorkerProtocol(Protocol): + """Background worker for typeguard.""" + + def start(self) -> None: ... + def stop(self) -> None: ... + def __enter__(self) -> Self: ... + def __exit__( + self, exc_type: object, exc_value: object, traceback: object + ) -> None: ... + + class LiveServerProtocol(Protocol): + """Live server for typeguard.""" + background_worker: BackgroundWorker transport_calls: CapturedCalls url: str @@ -1247,7 +1250,6 @@ def csrf_token(app: Flask, client: TestClient) -> str: return token -@runtime_checkable class LoginFixtureProtocol(Protocol): def as_(self, user: funnel_models.User) -> None: ... @@ -1287,7 +1289,6 @@ def logout() -> None: # MARK: Users -@runtime_checkable class GetUserProtocol(Protocol): usermap: dict[str, str] @@ -1766,7 +1767,6 @@ def client_hex( Owned by UU (owner) and administered by Ponder Stibbons (no corresponding role). """ - # TODO: AuthClient needs to move to account (nee profile) as the parent model auth_client = models.AuthClient( title="Hex", account=org_uu, @@ -1778,7 +1778,6 @@ def client_hex( return auth_client -@runtime_checkable class CredProtocol(Protocol): cred: funnel_models.AuthClientCredential secret: str diff --git a/tests/integration/views/idempotent_request_test.py b/tests/integration/views/idempotent_request_test.py index 658828d4b..5829e2514 100644 --- a/tests/integration/views/idempotent_request_test.py +++ b/tests/integration/views/idempotent_request_test.py @@ -99,6 +99,7 @@ def worker(num: int) -> None: f'http://localhost:3003/{path}', params={'id': num}, data={'data': num}, + timeout=10, ) ) From 1bdd2c53c6666368b3d67618b9e63ca8cd8ff93c Mon Sep 17 00:00:00 2001 From: anishTP <119032387+anishTP@users.noreply.github.com> Date: Fri, 31 May 2024 13:59:53 +0530 Subject: [PATCH 8/9] Remove UI for bookmarking a project in a project card (#2044) * Removed the bookmark icon from projeccard macro * Removed bookmark from featured_section * Remove add_bookmark parameter * Remove obsoleted save_form_id_prefix * Remove unused import of saveprojectform --------- Co-authored-by: Kiran Jonnalagadda --- funnel/templates/index.html.jinja2 | 2 +- funnel/templates/macros.html.jinja2 | 8 ++------ funnel/templates/profile.html.jinja2 | 8 ++++---- funnel/templates/profile_calendar.html.jinja2 | 2 +- funnel/templates/profile_layout.html.jinja2 | 14 +++----------- funnel/templates/project_spa_layout.html.jinja2 | 2 +- funnel/templates/search.html.jinja2 | 2 +- 7 files changed, 13 insertions(+), 25 deletions(-) diff --git a/funnel/templates/index.html.jinja2 b/funnel/templates/index.html.jinja2 index 3d99757ec..ab8edf543 100644 --- a/funnel/templates/index.html.jinja2 +++ b/funnel/templates/index.html.jinja2 @@ -1,6 +1,6 @@ {% extends "profile_layout.html.jinja2" %} {% block title %}{{ config['SITE_TITLE'] }}{% endblock title %} -{%- from "macros.html.jinja2" import faicon, calendarwidget, saveprojectform, profilecard %} +{%- from "macros.html.jinja2" import faicon, calendarwidget, profilecard %} {%- block pageheaders %} diff --git a/funnel/templates/macros.html.jinja2 b/funnel/templates/macros.html.jinja2 index c6793e2e3..db7b08f0d 100644 --- a/funnel/templates/macros.html.jinja2 +++ b/funnel/templates/macros.html.jinja2 @@ -144,17 +144,13 @@
{% endmacro %} -{% macro projectcard(project, include_calendar=true, calendarwidget_compact=true, include_profile=true, include_details=true, save_form_id_prefix='spf_', add_bookmark=true, snippet_html=none) %} +{% macro projectcard(project, include_calendar=true, calendarwidget_compact=true, include_profile=true, include_details=true, snippet_html=none) %} {%- if include_profile %}
- {{ profileavatar(project.account, add_profile_link=false, css_class='flex-item-align-end margin-right') }} + {{ profileavatar(project.account, add_profile_link=false, css_class='flex-item-align-end') }}
- {%- if not current_auth.is_anonymous and add_bookmark %} - {% set save_form_id = save_form_id_prefix + project.uuid_b58 %} -
{{ saveprojectform(project, formid=save_form_id) }}
- {% endif %}
{% endif %}
diff --git a/funnel/templates/profile.html.jinja2 b/funnel/templates/profile.html.jinja2 index bcb78a825..203a916a8 100644 --- a/funnel/templates/profile.html.jinja2 +++ b/funnel/templates/profile.html.jinja2 @@ -1,5 +1,5 @@ {% extends "profile_layout.html.jinja2" %} -{%- from "macros.html.jinja2" import faicon, calendarwidget, saveprojectform, useravatar, proposal_card %} +{%- from "macros.html.jinja2" import faicon, calendarwidget, useravatar, proposal_card %} {%- block pageheaders %} @@ -128,7 +128,7 @@ {% endif %} {% for project in draft_projects %}
  • - {{ projectcard(project, include_calendar=false, save_form_id_prefix='draft_spf_') }} + {{ projectcard(project, include_calendar=false) }}
  • {%- endfor -%} @@ -152,7 +152,7 @@
      {% for project in unscheduled_projects %}
    • - {{ projectcard(project, save_form_id_prefix='unsched_spf_') }} + {{ projectcard(project) }}
    • {% endfor %}
    @@ -189,7 +189,7 @@
      {% for project in sponsored_projects %}
    • - {{ projectcard(project, save_form_id_prefix='support_pro_') }} + {{ projectcard(project) }}
    • {% endfor %}
    diff --git a/funnel/templates/profile_calendar.html.jinja2 b/funnel/templates/profile_calendar.html.jinja2 index 31c457b60..fddaef83d 100644 --- a/funnel/templates/profile_calendar.html.jinja2 +++ b/funnel/templates/profile_calendar.html.jinja2 @@ -1,5 +1,5 @@ {% extends "profile_layout.html.jinja2" %} -{%- from "macros.html.jinja2" import faicon, calendarwidget, saveprojectform, useravatar, proposal_card %} +{%- from "macros.html.jinja2" import faicon, calendarwidget, useravatar, proposal_card %} {%- block pageheaders %} diff --git a/funnel/templates/profile_layout.html.jinja2 b/funnel/templates/profile_layout.html.jinja2 index 754d7cc1c..a189068dd 100644 --- a/funnel/templates/profile_layout.html.jinja2 +++ b/funnel/templates/profile_layout.html.jinja2 @@ -1,5 +1,5 @@ {% extends "layout.html.jinja2" %} -{%- from "macros.html.jinja2" import faicon, img_size, saveprojectform, calendarwidget, projectcard, video_thumbnail, profileavatar %} +{%- from "macros.html.jinja2" import faicon, img_size, calendarwidget, projectcard, video_thumbnail, profileavatar %} {%- from "js/schedule.js.jinja2" import schedule_template %} {% block title %}{{ profile.title }}{% endblock title %} @@ -77,10 +77,6 @@
    {{ profileavatar(featured_project.account, css_class='margin-left') }}
    - {%- if not current_auth.is_anonymous %} - {% set save_form_id = "spotlight_spfm_desktop_" + featured_project.uuid_b58 %} -
    {{ saveprojectform(featured_project, formid=save_form_id) }}
    - {% endif %}

    {{ featured_project.title }}

    {{ featured_project.tagline }}

    @@ -102,10 +98,6 @@ {{ featured_project.account.title }}
    - {%- if not current_auth.is_anonymous %} - {% set save_form_id = "spotlight_spfm_mobile_" + featured_project.uuid_b58 %} -
    {{ saveprojectform(featured_project, formid=save_form_id) }}
    - {% endif %}