dPoll bug fixes: Content editing fixes and table representation on Markdown

in utopian-io •  7 months ago  (edited)


Source code: github repository

What was the issues?

1-The expire_at field is incorrectly set when editing.

This information was sent from the discord channel.

  • Poll options include 1 week and 1 month. This is the time allowed to vote in the poll. A poll page is updated. It is automatically set to 1 month regardless of user preference.

2-Markdown type table data is not shown.

This information was sent from the discord channel. But it was advanced through github.


  • When you create a table with Markdown, it occurs smoothly by the editor. However, there is no table support in html conversion in backend codes.

What was the solution?

1 - Fixed : https://github.com/emre/dpoll.xyz/pull/58

def expire_at_humanized(self):
    diff_in_days = (self.expire_at - self.created_at).days
    if diff_in_days == 7:
        return "1_week"
        return "1_month"

The result of this value(diff_in_days) is generally around 6.95. The value of 6 is accepted because it is questioned as the day. I needed a proper check here. I updated the query as 7 days or less.

if diff_in_days <= 7:

  • I also removed an unnecessary variable.

2 - Fixed : https://github.com/emre/dpoll.xyz/pull/69

  • I've added table support at the backend.

md.markdown(value, extensions=['markdown.extensions.fenced_code', 'markdown.extensions.tables'])

  • I added the class to the table element for bootstrap framework.

$('table').addClass('table'); ( I love jquery.)

Related pull requests


Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Hello @tolgahanuzun!

Thanks for your contribution.

  • The first bug was weird, good catch.
  • Table representation on markdown was needed for sure.

A small note for Utopian compability:

  • We expect more volume in the contributions. But, I am kinda guilty for that, I know
    you have 2 more pull requests waiting for review.

  • You may work on the format and language for your next submissions.

Keep developing!

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.

Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.

I have to improve myself on language. Big deficiency for me. Thank you.

Thank you for your review, @emrebeyler! Keep up the good work!

Thanks for contributing to the dPoll content.

You have been upvoted from our community curation account (@dpoll.curation) in courtesy of This Guy... @bluerobo.

Come, join our community at dPoll discord server.

If you want to support dPoll curation, you can also delegate some steem power. Quick steem connect links to delegate:
50SP | 100SP | 250SP | 500SP


Hey @tolgahanuzun, not sure if you're aware of this, but, because you have a Steemit reputation of 60, you qualify for $80 in Byteball (GBYTE) just for verifying your Steem username. They're giving it away to all users with a reputation of 45 and more.

Byteball is listed on CoinMarketCap and is traded on Bittrex, so you can sell all the GBYTE you get RIGHT AWAY.

To get YOUR FREE $80 (it only takes a few minutes), follow the instructions here:

Tens of thousands of Steemit users have verified their accounts this year, and if you were not one of them, this is your shot!

Happy holidays:)

Hi @tolgahanuzun!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
Feel free to join our @steem-ua Discord server

Hey, @tolgahanuzun!

Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!