Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#4321 Update Links for Marketing #4341

Merged
merged 5 commits into from
May 12, 2019
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions app/retail/templates/bounties/contributor/story.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,16 @@
</div>
<div class="col-12 col-md-5 offset-md-2 my-auto mt-4 order-md-2 g-fadein" data-fade-duration=1000 data-fade-direction="right">
<p>
There are open issues in our Issues Explorer for all Python, JavaScript, Rust, Go, Solidity,
Node.js, and many more developers.
There are open issues & bug bounties in our <a href="/explorer">Issue Explorer</a> for
kuhnchris marked this conversation as resolved.
Show resolved Hide resolved
<a href="/contributor/python">Python</a>,
<a href="/contributor/javascript">JavaScript</a>,
<a href="/contributor/rust">Rust</a>,
<a href="/contributor/solidity">Solidity</a>,
<a href="/contributor/design">Design</a>,
<a href="/contributor/html">HTML</a>,
<a href="/contributor/ruby">Ruby</a>,
<a href="/contributor/css">CSS</a>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we pass this from the backend as an array and simply loop through it here ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In theory yes, I also thought of that, but we'd need to create a new either table or json in python.
What route do you prefer? Table for editing live, or json/hardcoded json to have a deploy cycle?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Harcoded Json for now would work 🙌

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kuhnchris You can just send it as part of the template params as an array of strings.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know, just wanting to make sure that's reaaaaaally what you want. But sure, i'll add it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This whole bounties/contributor stuff is a whole lot of 💩 .
we cannot use 'url' with that, since it's not a registered route but somehow dynamically generated.

django.urls.exceptions.NoReverseMatch: Reverse for 'bounties/contributor' not found. 'bounties/contributor' is not a valid view function or pattern name.
     {% for subject in contributor_list %}
          <a href="{% url 'bounties/contributor' %}"{=subject.link=}>{=subject.text=}</a>,  <- neither
        {% endfor %} 
        <a href="{% url 'contributor/python' %}">Python</a>,  <- nor this
        <a href="{% url 'contributor' %}/python">Python</a>,  <- nor this

Please advice.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not whole lot of 💩 , you are just writing it wrong. The code is supposed to be:

{% for subject in contributor_list %}
     <a href="{% url 'contributor_bounties' tech_stack=subject.link %}">{{ subject.text }}</a>,  <- neither
 {% endfor %} 

This is assuming that subject.link is /python and subject.text is Python

I am not sure where you got the above syntax from. I would really advice you to go through this documentation to learn django templating: https://docs.djangoproject.com/en/2.2/topics/templates/

Copy link
Contributor Author

@kuhnchris kuhnchris May 3, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SaptakS Thanks for the heads up, still thinking that contributor + tech_stack is 💩 (especially cause I need to comment views.py L567-568 just to make it work on a local dev environment, else those pages 404) , but I couldn't care less.
grafik

Also, thanks for relinking me to the template documentation, I tried to get the url '' part working so I tried working with various types of {= {% ... to ensure it wasn't me fucking this up.

Committed, please check, worked over here.
grafik

Just letting you know for some reason you dropped "Go" but it's on the infographics on the left, so I might reconsider dropping it. @PixelantDesign

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^ @PixelantDesign let us know if that needs to be updated

and much more.
</p>
</div>
</div>
Expand All @@ -57,4 +65,4 @@
</div>
</div>

</div>
</div>