Skip to content

I was doing well with my website until I thought, what if bad language hits my wall? I needed a profanity blocker asap.

Notifications You must be signed in to change notification settings

sdempsey123/sdempsey123.github.io

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Why you need a profane blocker

I was doing well with my website until I thought, what if bad language hits my wall?

My first blog post -- profanity.censor

image

When I tackled my first website, I decided to play it conservative. I was just trying to survive Coding Dojo, a rough boot camp dedicated to web development, and I wanted to stay within my skill level. A few other students were knocking out some cool websites while others began somethng big and wound up finding themselves drowning in code. I did not want to be the latter, but I knew I couldn't compete with the former. I was somewhere in the middle.

So, I went to my bread-and-butter and that's golf. I have been golfing for several years and I thought this might make a cool subject for a website. The question was what can I do based on golf and my lack of skill level? I've played on a dozen or so courses in Northern California, but I didn't feel like I was qualified to rate the best courses in our region. And, god forbid, I am not qualified to give tips. I only took one lesson myself and it definitely shows in my game.

Still, I wanted to do something golf related. Then I thought, why does this have to be serious? So I came up with the off-beat idea to show bad golfers that they can play on good golf courses. I took my best advice and turned it into a website, basically telling golfers to just focus on keeping the ball on the fairway and, when (not if) something goes wrong, just punch the ball back on the fairway and move on. Who cares about your score? If you have to eat a stroke or two, so be it.

Essentially, leave the instructional websites to the experts.

As far as coding, I used HTML, CSS, Java, Django, and Python. Pretty much, my go-to for building websites. Also, I seem to be getting pretty good at using code from other sources. Thanks to those who contributed to my cause (and you didn't know you were contributing).

My website was vulnerable to attack

The idea for this website was basic and my goal was to just get it to function and worry about other things later. The plan was to do an introductory video on the home page along with login/registration form. That took users to the second page where I created a list of golf courses users can be challenged but still have a good time. It contained a short write-up of each course with links to each course.

From there, users were directed to a wall where they can leave messages and make comments. This page was make or break for my site. My purpose was to involve users on the site and hear their opinions. I thought this is a fantastic way to involve users. So I put everything together, but I got to thinking, what if some jerk got on the site and started spilling all kinds of nasty words on the wall. Don't think that wouldn't happen? Think again. I was like, this great element (the wall) could destroy my website. I was in too deep to give up.

There are profanity blockers out there, but I was having trouble finding the right code that would fit. I started to get discouraged but I wouldn't give up. With the help of a teacher's assistant at Coding Dojo, we found an element called profanity.censor that would adapt to Python from geeks-for-geeks. In my views section of the website, the profanity.censor code was put into the post_message and post_comment sections as demonstrated in the lead image.

image

What happens is if someone tries to write some profanity, stars would appear. Some words have all stars with them. I was hoping that when someone sees that, it would discourage them from further vulgarity.

My suggestion here is if you plan on inviting discussion among users, you should put in some sort of profanity blocker. It beats having to monitor the website 24/7 to make sure everything is clean and you have peace of mind.

About

I was doing well with my website until I thought, what if bad language hits my wall? I needed a profanity blocker asap.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published