Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #105105

Re: WP-A: A New URL Shortener

From Chris Warrick <kwpolska@gmail.com>
Newsgroups comp.lang.python
Subject Re: WP-A: A New URL Shortener
Date 2016-03-17 17:05 +0100
Message-ID <mailman.275.1458230754.12893.python-list@python.org> (permalink)
References <1537bd9e261.12a0e5b4a204345.4468160629979098801@vmesel.com> <CAMw+j7KDE_qBq_htXRO8i3RPbZcX5A_+CROoLaVSbg4qRwkW9Q@mail.gmail.com> <9727BC5A-67B2-49A6-9AFF-8C244A53300C@vmesel.com>

Show all headers | View raw


Please use reply-all in the future so that the list sees your message.

On 17 March 2016 at 11:38, Vinicius <me@vmesel.com> wrote:
> Thanks for replying Chris,
>
> Enviado do meu iPad
>
>> Em 16 de mar de 2016, às 1:18 PM, Chris Warrick <kwpolska@gmail.com> escreveu:
>>
>>> On 15 March 2016 at 20:56, Vinicius Mesel <me@vmesel.com> wrote:
>>> Hey guys,
>>>
>>> I'm a 16 year old Python Programmer that wanted to do something different.
>>> But, like we know, ideas are quite difficult to find.
>>> So I decided to develop a URL Shortener to help the Python community out and share my coding knowledge, and today the project was launched with its first stable version.
>>> So if you want to see the software working, go check it out at: http://wp-a.co/
>>> Or if you want to see the source code to contribute and help the project: https://github.com/vmesel/WP-A.CO
>>>
>>>
>>> Hugs,
>>> Vinicius Mesel
>>> Brazilian and Portuguese Speaker
>>> http://www.vmesel.com
>>>
>>>
>>>
>>> --
>>> https://mail.python.org/mailman/listinfo/python-list
>>
>> This is a great exercise — however, your code is bad. You use string
>> formatting to create SQL, which leads to SQL injection
>> vulnerabilities. Please educate yourself on what those mean and how to
>> avoid that in Python (hint: prepared statements). Also, you should not
>> commit your sqlite database to git.
>>
> Thanks for checking out my code and answering me, I will do the corrections for the SQL Injection vulnerabilities with prepared statements like you said.
>
> The database in the git is to show to everyone how the URL is stored.

You can show people a schema and write a small script that imports it.
You may add some demo URLs if you insist.

>> That said, an URL shortener can be written in Django in less than an
>> hour, and it will be even neater.
>>
>
> I did not make it in Django because I was in need to learn flask for other projects.
>
>
>> (PS. the page’s really ugly. Consider using Bootstrap or some other
>> existing framework if you’re not good at designing pretty things.)
>
> I'll consider it.
>
>> --
>> Chris Warrick <https://chriswarrick.com/>
>> PGP: 5EAAEA16
>
> @vmesel



-- 
Chris Warrick <https://chriswarrick.com/>
PGP: 5EAAEA16

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: WP-A: A New URL Shortener Chris Warrick <kwpolska@gmail.com> - 2016-03-17 17:05 +0100

csiph-web