Posts

Showing posts from February, 2021

Monitor website insights on a django powered website

  django-tracking2 tracks the length of time visitors and registered users spend on your site. Although this will work for websites, this is more applicable to web   applications   with registered users. This does not replace (nor intend) to replace client-side analytics which is great for understanding aggregate flow of page views. Note: This is not a new version of  django-tracking . These apps have very different approaches and, ultimately, goals of tracking users. This app is about keeping a history of visitor sessions, rather than the current state of the visitor. Requirements Django's  session framework  installed Download pip install django-tracking2 Setup Add  tracking  to your project's  INSTALLED_APPS  setting: INSTALLED_APPS = ( ... ' tracking ', ... ) If you use Django 1.8+  tracking  app should follow the app with your user model Add  tracking.middleware.VisitorTrackingMiddleware  to your pr...

Using a slug in Django

Image
  Generating slugs automatically in Django without packages - Two easy and solid approaches Image: Slugs in Django (License: CC-BY-SA Marcelo Canina) Slug generation management Overview One important task when developing a Django website is to have pretty URL s , i.e.: human readable and SEO friendly URLs . A site's URL structure should be as simple as possible. Consider organizing your content so that URLs are constructed logically and in a manner that is most intelligible to humans (when possible, readable words rather than long ID numbers) Keep a simple URL structure Google Webmasters Options We will explore two approaches to have clean URLs , from having the typical Django’s URLs with the object/pk scheme, like /article/12345 to have one of these: pk and slugs : object/pk-slug like /article/12345-my-example-title where we add the object’s slug after the primary key. unique slug : generate a unique slugs with...

Uninstalling and removing an app or package from Ubuntu

Image
  This article describes removing software from your Ubuntu system that you do not need anymore. We are describing software removal both through the graphical user interface (Ubuntu Software Manager) and the command line-the (Terminal). Please note that you need administrative privileges in order to install/uninstall software from Ubuntu. We have run the commands and procedures mentioned in this article on Ubuntu 20.04 LTS. Uninstall Applications Through Ubuntu Software Manager One way to uninstall software from your computer is through the Ubuntu Software Manager. Click on the Ubuntu Software icon in the Activities toolbar; this will open the Ubuntu Software manager through which you can search for, install and uninstall software from your computer. Then click the Installed tab from the following view to list all the applications installed on your Ubuntu system: From the list of applications, look up for the one you want to uninstall and then click the Remove button against it. In...

How to become a great software developer

Image
  Starting a new career in software development is both exciting and frightening. There is a lot to learn, and it takes years of practice to become really good at it, like with other crafts. To make it a little bit easier, especially for beginners, I want to share some knowledge I've gained over the years in the form of actionable tips with you. Find a great mentor One of the best things you can do to become a great developer is to find an excellent mentor. A good mentor will provide sound advice on everything from architecture to design, and even how to improve your career path. A person who is not in the same company or location may be the best mentor for you. You can talk to them and get their advice on the phone, via email, or online. A mentor doesn't have to work at your company nor be an expert developer. Find someone who understands software development and has had success in their career that you respect. Learn to communicate well Being a great developer means that you ...