After setting up the base of our ember application we can start doing something more with it. For my tutorials I've picked AdminLTE template to make a admin panel alike application.
Ember.js applications are divided into multiple files and folders. All of which makes sense when we get to know what is where, so lets take a look on Ember application structure.
In a series of tutorials starting with this one I'll try to showcase ember.js framework for building fronted web applications. As a backend there will be Django Rest Frameowork and more.
The PyCon PL 2015 will be held in Hotel Ossa Congress & Spa located in Ossa on October 15th through October 18th. The conference is held in Poland but consists of two blocks of talks - English and Polish, so non-Polish speaking attendees can benefit from it too.
The agenda and other details can be found on the conference website.
With Django 1.7 we got built in migrations and a management command to squash a set of existing migrations into one optimized migration - for faster test database building and to remove some legacy code/history. Squashing works, but it still has some rough edges and requires some manual work to get the best of a squashed migration. Here are few tips for squashing and optimizing squashed migrations.
Creating Facebook applications or integrating websites with Facebook isn't complex or very time consuming. In case of Django there is for example very big django-facebook package that provides a lot of Facebook related features.
Pozytywnie.pl, a company I work with released a set of small applications that were used internally to make Facebook applications as well as Facebook authentication integrations. In this article I'll showcase those applications.
In this article I'll show you an example Django + Django Rest Framework + Ember.js application. Classical posts and categories done in Ember and in Django for comparison.
Docker is a platform for running applications in isolation. Using Linux containers makes the software layer isolated from the base system. The overhead needed for hardware virtualization used by for example Virtualbox is removed. Docker can help in development and deployment of web based applications and services - let us see how and when.
I've released a new version of django-ckeditor-updated covering all latest changes (full ckeditor 4.4.4 package and some inline editor fixes). The django-ckeditor-updated-4.4.4 can be installed from pypi. Note that there is now a new required configuration variable - CKEDITOR_JQUERY_URL.
All outstanding commits have been pushed to django-ckeditor repository (from which I forked) and released as django-ckeditor-4.4.4 (4.4.5 for updated readme). If you are using the "updated" version you can now switch to the django-ckeditor as I plan to make changes there as I now can push pypi releases for it. django-ckeditor-updated is closed.
Many Python web applications run on production with the help of gunicorn or uwsgi. There are however other solutions that may turn out to be even better than the currently popular solutions. One of alternatives is chaussette and circus. Chaussette is a WSGI server that can serve WSGI applications like your Django project. Circus is an application to control and monitor processes and sockets. It can manage chaussette, celery or other sockets and processes making it a manager of all project services.
Some time ago I wrote about profiling Django with hotshot with mod_python that is now dead. To profile execution time of Python scripts as well as Django views, tests, or management commands we use cProfile and its wrappers. There are also converters that provide data for KCachegrind. Let us see what we have available to use.
Some time ago I've released django-content-bbcode - a BBCode alike tag parser. In this article I'll show some example of usage for such parser - from simple search and replace to more complex using database to get the response.
App enlight, a Polish startup known as errormator in the past is a application-service that logs and aggregates you application health. Like for example Sentry can log exceptions and logs (like from logging module) then App Enlight does much more by hooking to the internals of the application - you will get executed SQLs, template rendering time, slow responses and more. So let us take a closer look on current app enlight features...
My tutorial about creating ember.js applications with Django got updated to the latest ember.js version and the source code got published on github.
I'm planning to write more about this framework soon, as now I'm spending a lot of time working with ember and Django, django-rest-framework and other interesting libraries. Aside of that I still have some topics on my ToDo list - Facebook apps related packages (future; when they get published), more Python + electronics tutorials, and Django/Python related (like checking Cherokee server or testing AppEnlight). What you find most interesting?
Since few days we have Django 1.7 beta, which brings many changes including built in migrations system. At the company we have one quite new project that is still in development so we decided to use it as a guinea pig and use Django 1.7b1 for it. The upgrade from 1.6 wasn't that problematic, but it required some search-and-fix actions...
Today I've released on Github one of my applications - django-content-bbcode. The parser code is used on my sites and I've decided to refactor it (it's quite old), add some new features (like the tag loader) and release it to the public. There is also pypi package for it.
In short django-content-bbcode allows you to replace BBCode alike tags in text (like in articles, news) with whatever you code in Python. I use it to highlight code snippets (with pygments), make nice links to articles by given slug (fetches title, description from database), insert image thumbnails (integrated with frontend image lightbox) and few more. Makes plain text quite dynamic. More detailed description is on Github.
I'm maintaining my django-ckeditor fork known on PyPi as django-ckeditor-updated. It works with latest Django versions, uses Django file storage, has some new features and fixes. Recently few people including me got write access to the original repository - shaunsephton/django-ckeditor and my commits were merged (not that the PyPi package is still old).
When/if the original package will get new and constant releases I'll close my fork, but until then django-ckeditor-update is alive. If you have any issues or pull requests made on the original django-ckeditor please check if they are still valid for current codebase.
Some may already know about this - on Kickstarter there is a fund raising for implementing improved PostgreSQL support in Django. Marc Tamlyn is in the lead and at this very moment there are 25 days to go and the project is already reaching extended goals. It looks like we will see another crowd-funding project successful, making Django better. First one - the Django migrations is on its way for a release with Django 1.7.
Python posiada virtualenvy ułatwiające pracę i hostowanie wielu aplikacji Pythona posiadających różne zależności. Czasami zachodzi jednak potrzeba posiadania podobnego rozwiązania w bardziej globalnym zakresie - np. tworzenie środowiska deweloperskiego zbliżonego do konfiguracji środowiska produkcyjnego. Rozwiązania takie jak Puppet do zarządzania konfiguracją (np. serwerów produkcyjnych) zbliżają się coraz bardziej do programistów dzięki rozwiązaniom takim jak Vagrant. Dzięki Vagrantowi jedno polecenie wygeneruje nam środowisko deweloperskie oparte o oddzielny system operacyjny działający na Virtualboksie. Konfiguracją systemu zajmuje się Puppet (albo inne podobne rozwiązanie), dzięki czemu możemy od razu uzyskać np. rozwijaną aplikację działającą z nginxem i innymi potrzebnymi usługami. Patrząc na to z drugiej strony - nie trzeba będzie np. tłumaczyć frontendowcowi jak skonfigurować sobie środowisko testowe - automat zrobi to za niego.
W tym artykule poruszę raczej tylko podstawy Puppeta i Vagranta. Jakieś fajne rozwiązania zostawiam na drugi artykuł, który powinien powstać za jakiś czas.