background preloader


Facebook Twitter

GitHub - SmileyChris/django-countries. GitHub - coderholic/django-cities: Countries and cities of the world for Django projects. Navigation in django. Quickstart — Requests 2.12.1 documentation. Eager to get started?

Quickstart — Requests 2.12.1 documentation

This page gives a good introduction in how to get started with Requests. First, make sure that: Requests is installedRequests is up-to-date Let's get started with some simple examples. Make a Request Making a request with Requests is very simple. Begin by importing the Requests module: Now, let's try to get a webpage. Quickstart — Requests 2.12.1 documentation. Eager to get started?

Quickstart — Requests 2.12.1 documentation

This page gives a good introduction in how to get started with Requests. First, make sure that: Requests is installedRequests is up-to-date. Beginner's Guide to the Django Rest Framework. So you're learning to use the Django Web Framework and you're loving it.

Beginner's Guide to the Django Rest Framework

But you want an attractive, easy to use API for your application? Look no further than the Django Rest Framework (DRF). The DRF is powerful, sophisticated, and surprisingly easy to use. It offers an attractive, web browseable version of your API, and the option of returning raw JSON. The Django Rest Framework provides powerful model serialization, display data using standard function based views, or get granular with powerful class based views for more complex functionality. When working with Python applications, it's always a good idea to sandbox your development with a virtual environment. Tuts+ has two excellent videos on how to install virtualenv and virtualenvwrapper. The first thing we'll do as part of our application is to set up the virtual environment. It doesn't matter where you are in the file system when these commands are run. Extender plantillas · Django Girls Tutorial. Otra cosa buena que Django tiene para tí es la extensión de plantillas.

Extender plantillas · Django Girls Tutorial

¿Qué significa esto? Significa que puedes usar las mismas partes de tu HTML para diferentes páginas de tu sitio web. De esta forma no tienes que repetir el código en cada uno de los archivos cuando quieres usar una misma información o un mismo esquema. Y si quieres cambiar algo, no necesitas hacerlo en cada plantilla. El libro de Django 1.0. TAGS. This document describes Django’s built-in template tags and filters.


It is recommended that you use the automatic documentation, if available, as this will also include documentation for any custom tags or filters installed. Built-in tag reference¶ autoescape¶ Controls the current auto-escaping behavior. This tag takes either on or off as an argument and that determines whether auto-escaping is in effect inside the block. When auto-escaping is in effect, all variable content has HTML escaping applied to it before placing the result into the output (but after any filters have been applied). The only exceptions are variables that are already marked as “safe” from escaping, either by the code that populated the variable, or because it has had the safe or escape filters applied.

Sample usage: {% autoescape on %} {{ body }}{% endautoescape %} block¶ Index — Python 3.5.2 documentation. Navigation Index Index pages by letter: Symbols | _ | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z Full index on one page (can be huge) Index Full index on one page Quick search Enter search terms or a module, class or function name. © Copyright 2001-2016, Python Software Foundation.

Index — Python 3.5.2 documentation

Django Themes

Django Custom Dashboard Easy (Example) On other day, i struggle with django.

Django Custom Dashboard Easy (Example)

WOW. I need a quick dashboard not all that apps lists. I usually use django-suit for my projects and that's really awesome. So make a new administration, no. The main admin do at i need but i want only a custom dashboard. So created a app called plus. from django.contrib.admin.sites import AdminSite class AdminMixin(object): """Mixin for AdminSite to allow custom dashboard views. """ def __init__(self, *args, **kwargs): return super(AdminMixin, self). 5. Data Structures. This chapter describes some things you’ve learned about already in more detail, and adds some new things as well. 5.1.

5. Data Structures

More on Lists The list data type has some more methods. Here are all of the methods of list objects: ¿Cómo funciona Internet? Este capitulo está inspirado por la charla "How the Internet works" de Jessica McKellar ( Apostamos que utilizas Internet todos los días.

¿Cómo funciona Internet?

Pero, ¿sabes lo que pasa cuando escribes una dirección como en tu navegador y presionas 'Enter'? Lo primero que tienes que entender es que un sitio web es sólo un montón de archivos guardados en un disco duro. Al igual que tus películas, música o fotos. Sin embargo, los sitios web poseen una peculiaridad: ellos incluyen un código de computadoras llamado HTML. Si no estás familiarizada con la programación, puede ser difícil de captar HTML al principio, pero tus navegadores web (como Chrome, Safari, Firefox, etc.) lo aman. Como cualquier otro archivo, tenemos que guardar los archivos HTML en algún lugar de un disco duro.

Ok, quizás te preguntes cómo luce Internet, ¿cierto? ¡Te hemos hecho una imagen! Parece un lío, ¿no? Es fascinante, ¿no? Se parece a esto: Login: PythonAnywhere. The Django admin site. One of the most powerful parts of Django is the automatic admin interface.

The Django admin site

It reads metadata from your models to provide a quick, model-centric interface where trusted users can manage content on your site. The admin’s recommended use is limited to an organization’s internal management tool. It’s not intended for building your entire front end around. The admin has many hooks for customization, but beware of trying to use those hooks exclusively. If you need to provide a more process-centric interface that abstracts away the implementation details of database tables and fields, then it’s probably time to write your own views. In this document we discuss how to activate, use, and customize Django’s admin interface. Overview¶ The admin is enabled in the default project template used by startproject. For reference, here are the requirements: After you’ve taken these steps, you’ll be able to use your Django admin site by visiting the URL you hooked it into (/admin/, by default).

Other topics¶ Django Girls Tutorial.