Tag: django

23 Feb, 17

Make Your Developer's Life Easier By Reducing Number Of Opened Tabs in Pycharm

When coding, I often find myself overwhelmed by a number of opened tabs in my editor. I just seem to have opened every single .py file of a Django project. And it's kinda hard to find a way in this evergrowing of tabs.

Given that, I was really happy to ...

Read now
22 Feb, 17

New in Django 1.11: Template-based widget rendering

There's a very interesting change coming with Django 1.11 - Template-based widget rendering.

To make customizing widgets easier, form widget rendering is now done using the template system. In older versions, widgets were rendered using Python.

You can get more details about it from the form rendering API docs page ...

Read now
10 Feb, 17

How To Export Django Model Data Along With Its Parent Model Data via dumpdata Command

Django dumpdata command lets us export model objects as fixtures and to store them in json / xml formats.

All is good and works fine until you need to export a model that is a child of a concrete model and shares two database tables (one for parent another is for the ...

Read now
02 Feb, 17

A little tip for 🐧 @WagtailCMS fans: How To Remove Snippets Menu Item From Wagtail CMS Admin Menu http://timonweb.com/posts/how-to-remove-snippets-menu-item-from-wagtail-cms-admin-menu/ #django

02 Feb, 17

How To Remove Snippets Menu Item From Wagtail CMS Admin Menu

Put this hook into wagtail_hooks.py file of your Wagtail CMS app.

1
2
3
4
5
  1. from wagtail.wagtailcore import hooks
  2. @hooks.register('construct_main_menu')
  3. def hide_snippets_menu_item(request, menu_items):
  4. menu_items[:] = [item for item in menu_items if item.name != 'snippets']

Restart your server and you're done!

Read now
18 Jan, 17

Override Field Widget Attributes in a Django Form or How To Add Placeholder Attribute to Django Form Input

Let's say we have a contact form and we want to add placeholders to this form inputs so our rendered form has these cool input labels. How do we do that?

My form is a child of ContactForm class provided by the django_contact_form module (https://github.com/ubernostrum/django-contact-form). The ...

Read now
17 Jan, 17

In case you didn't know, there’s #Wagtail CMS (🐧) admin styleguide available: http://timonweb.com/posts/theres-wagtail-cms-admin-styleguide-available/ #django

17 Jan, 17

🐍 django_managepy_anywhere package on PyPI: https://pypi.python.org/pypi/django_managepy_anywhere/ - it lets to run #django manage.py commands from any dir of your project

02 May, 16

ES6 For Django Lovers - https://www.caktusgroup.com/blog/2016/05/02/es6-django-lovers/ #js #python #django

12 Feb, 16

A lightweight package for handling menus and breadcrumbs in your #django project - https://github.com/EliotBerriot/django-navutils