Django community: RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
Integration of 2checkout with django
Integration of payment gateways is an important part of developing an e-commerce application which includes communication with several banks with different ways online banking/debit credit cards. and also providing security is the most important feature for all payment gateways integration. We are having payment gateways like paypal,braintree,payumoney,2checkout... In this post,we will see how to integrate 2checkout with our django application. To integrate it to the application,it offers 3 different integration methods. 1.inline checkout In inline chekout,we displays a secure payment form as an overlay on your checkout page. .It collects the buyers's billing/shipping address and finalize the cart total sum the function of inline checkout is same as standard checkout, but when the required parameter is missing(buyer's name,email address and billing address),it willredirect to the standard checkout. To know about request parameters, and response please refer to https://www.2checkout.com/documentation/checkout/inline-checkout 2.standard checkout It can handle every part of the buyer’s checkout process on a single page. You can customize the whole checkout process to your needs by passing user billing/shipping information details, currency details, language and checkout steps. To know about request parameters, and response please refer to https://www.2checkout.com/documentation/checkout/standard-checkout 3.Payment Api In payment api,we are taking the credit card information … -
Django Custom Template Tags And Filters
Django Template Tags are simple Python functions which accepts a 1 or more value, an optional argument, process those values and return a value to be displayed on the page. First, In your application folder, create a "templatetags" directory at the same level as the models and views. You want this directory to be recognized as a Python package, so make sure you create an empty "__init__.py" file. Next, create the Python file that will hold your tags and name it something like app_tags.py. Here is the folder structure should look like: Django Project -> my_app ---> models.py ---> views.py ---> templatetags -----> __init__.py -----> app_tags.py Tags: Tags look like this: {% tag %}. Tags can be used to create text in the output, control flow by performing loops or logic, and to load external information into the template. Tags require beginning and ending tags (i.e. {% tag %} ... tag contents ... {% endtag %}). Django provides about twenty built-in template tags. Here are some of the more commonly used tags for - Loop over each item in an array. if, elif, and else - Evaluates … -
How to customize Django Oscar Models, Views and URL's
In order to customize models, views and urls, you need to fork an Oscar core app in which model/view resides. Then you should be able to override any model/view classes. Steps to fork/customize an app: 1. If you are forking an Oscar app for the first time, then you have to create a root apps-folder in which all your forked apps will exists: $ mkdir yourappsfolder $ touch yourappsfolder/__init__.py 2. Create a python module with the same 'app-label' as the Oscar app: Ex: Customising oscar.apps.catalogue app $ mkdir yourappsfolder/catalogue $ touch yourappsfolder/catalogue/__init__.py 3. If the Oscar app has a models.py, then you have to create a models.py file in your local app. # your custom models go here from oscar.apps.catalogue.models import * NOTE: To customise Oscar’s models, you must add your custom one before importing Oscar’s models. Then, your models file will have two models with the same name within an app, Django will only use the first one. Ex: To add a active field to the product model: # yourappsfolder/catalogue/models.py from django.db import models from oscar.apps.catalogue.abstract_models import AbstractProduct class Product(AbstractProduct): active … -
Mercurial Mirror For Django 1.9 branch
I forgot to mention it, but I’ve created the 1.9 “production” mirror at the usual location: As a reminder, those mirrors have two purposes: be a lightweight read-only repository to clone from for production servers hide the ugly git stuff behind a great mercurial interface The clone is at the usual location at bitbucket, from which […] -
Django + Celery & Rabbit - part one
Hello, today post is first one in series about Celery in Django application and how to use it. What you gain after reading such series? How to integrate celery + rabbitmq in basic Django application. So what will be our basic application? It is planned to be web service where you can upload mp3 file and then have them transcoded into ogg, wav and ac3 files. I wanted to make easy and in the same time sophisticated project. Recently I started reading an excellent book called Two Scoops of Django: Best Practices for Django 1.8. The book is about what to do and what not to do for your Django project. I feel some opportunity to try advice from the book in real project. I will start from project layout: normally you have something like this: $ tree trancoder trancoder ├── audiotranscoder │ ├── admin.py │ ├── apps.py │ ├── __init__.py │ ├── migrations │ │ └── __init__.py │ ├── models.py │ ├── tests.py │ └── views.py └── trancoder ├── manage.py └── trancoder ├── __init__.py ├── settings.py ├── urls.py └── wsgi.py But in the book authors suggest that it can be changed to something like this: $ tree transcoder transcoder … -
Django + Celery & Rabbit - part one
Hello, today post is first one in series about Celery in Django application and how to use it. What you gain after reading such series? How to integrate celery + rabbitmq in basic Django application. So what will be our basic application? It is planned to be web service where you can upload mp3 file and then have them transcoded into ogg, wav and ac3 files. I wanted to make easy and in the same time sophisticated project. Recently I started reading an excellent book called Two Scoops of Django: Best Practices for Django 1.8. The book is about what to do and what not to do for your Django project. I feel some opportunity to try advice from the book in real project. I will start from project layout: normally you have something like this: $ tree trancoder trancoder ├── audiotranscoder │ ├── admin.py │ ├── apps.py │ ├── __init__.py │ ├── migrations │ │ └── __init__.py │ ├── models.py │ ├── tests.py │ └── views.py └── trancoder ├── manage.py └── trancoder ├── __init__.py ├── settings.py ├── urls.py └── wsgi.py But in the book authors suggest that it can be changed to something like this: $ tree transcoder transcoder … -
Django + Celery & Rabbit - part one
First part of series about Django application with Celery and RabbitMQ. -
Dutch django meetup (feb 2016) summaries
Dutch django meetup revival - Erik Romijn Sponsored by http://byte.nl, organized by the Dutch django association (django vereniging). The association was founded to organize the 2011 Django Europ conference. They're also behind the "django under the hood" conferences. They're also supporting django girls workshops and even Python Namibia 2015. If you want to become a member, mail bestuur@djangovereniging.nl If you want to help with future meetups, contact him! Migrating nu.nl to Django - Besma Mcharek-Boussif Besma works for Sanoma, the company behind http://www.nu.nl/, a very big news site in the Netherlands. The real title of the talk is "nu.nl performance and our journey in the django realm". She's a django backend developer. She's also a co-organizer of the django girls meetings. Nu.nl is the biggest Dutch news platform. 10^9 pageviews per day. They specialize on getting the news online fastest. Mobile and desktop web sites plus mobile apps (ios, android and windows) for tablets, phones and smart watches. There's now an ios team, an android team and a web/API and a CMS team. The API is also used by the mobile apps, btw. Regarding development: they try to use a devops mind set. It is almost continuous integration. About 10 … -
Django cookiecutter
Have you ever wanted to automate all these boring things that you have to do while setting up new django project? Like writing proper settings, setting up whole folder structure, adding docs, readmes, setup.py etc? There is app that can do these mundane actions for you: Cookiecutter Django. Q: What you get after reading this post? A: Basic understanding how you can automate boring tasks and get exciting ones done! Let's start with cookiecutter. What exactly is it? It's CLI tool for automatically generating projects from given template. What do I mean by that? Suppose that when you make new python project you want certain things to be setup the same way every time. For instance: setup.py or docs folders. Thanks to cookiecutter it's possible to automate these things so every time you make the new project the boring stuff is already made for you. Django Cookiecutter is made especially for django applications. Based on GitHub README it provides: For Django 1.9 Renders Django projects with 100% test coverage Twitter Bootstrap v4.0.0 - alpha End-to-end via Hitch AngularJS 12-Factor based settings via django-environ Optimized development and production settings Registration via django-allauth Comes with custom user model ready to go. Grunt … -
Django cookiecutter
Automate everything. -
Django cookiecutter
Have you ever wanted to automate all these boring things that you have to do while setting up new django project? Like writing proper settings, setting up whole folder structure, adding docs, readmes, setup.py etc? There is app that can do these mundane actions for you: Cookiecutter Django. Q: What you get after reading this post? A: Basic understanding how you can automate boring tasks and get exciting ones done! Let's start with cookiecutter. What exactly is it? It's CLI tool for automatically generating projects from given template. What do I mean by that? Suppose that when you make new python project you want certain things to be setup the same way every time. For instance: setup.py or docs folders. Thanks to cookiecutter it's possible to automate these things so every time you make the new project the boring stuff is already made for you. Django Cookiecutter is made especially for django applications. Based on GitHub README it provides: For Django 1.9 Renders Django projects with 100% test coverage Twitter Bootstrap v4.0.0 - alpha End-to-end via Hitch AngularJS 12-Factor based settings via django-environ Optimized development and production settings Registration via django-allauth Comes with custom user model ready to go. Grunt … -
Python 3 in 2016
My completely anecdotal view on the state of Python 3 in 2016. Based on my own recent experience, observations, and exchanges with other members of the Python community. -
Python 3 in 2016
My completely anecdotal view on the state of Python 3 in 2016. Based on my own recent experience, observations, and exchanges with other members of the Python community. -
Wagtail: 2 Steps for Adding Pages Outside of the CMS
My first Caktus project went live late in the summer of 2015. It's a community portal for users of an SMS-based product called RapidPro. The portal was built in the Wagtail CMS framework which has a lovely, intuitive admin interface and excellent documentation for developers and content editors. The code for our Wagtail-based project is all open sourced on GitHub. -
Django-minipub: a minimal publication control mixin
Django-minipub is a minimal publication control system for Django. I wrote this app in 2013/2014 and I've used it on several websites... However, I've never had the time to talk about it! Time to fix that oversight. -
Climbing up Branches
Today I pushed the latest Evennia development branch "wclient". This has a bunch of updates to how Evennia's webclient infrastructure works, by making all exchanged data be treated equal (instead of treating text separately from other types of client instructions).It also reworks the javascript client into a library that should be a lot easier to expand on and customize. The actual client GUI is still pretty rudimentary though, so I hope a user with more web development experience can take upon themselves to look it over for best practices. A much more detailed description of what is currently going on (including how to check out the latest for yourself) is found in this mailing list post. Enjoy! -
Using mysql load data infile with django
Using mysql load data infile with django -
Using Fabric to update a remote svn checkout with ssh public key authentication
Using Fabric to update a remote svn checkout with ssh public key authentication -
Allow squid/mod_wsgi to pass the HTTP_AUTHORIZATION header to Apache
Allow squid/mod_wsgi to pass the HTTP_AUTHORIZATION header to Apache -
Django "view-permissions" for related objects
Django "view-permissions" for related objects -
Nested resources in Tastypie
Nested resources in Tastypie -
Custom choices in Django admin
Custom choices in Django admin -
RestORM - The client side of REST
RestORM - The client side of REST -
Customizing Django startproject with templates
Customizing Django startproject with templates -
Django redirects with regular expressions
Django redirects with regular expressions