background preloader

Django

Facebook Twitter

Sublime Text 2 & Django. Django Forgot Password. In a previous post Customizing the Django admin - Branding I discuss a few simple tips to provide custom branding in the admin.

Django Forgot Password

It's a basic customization that takes a few minutes to implement but provides the essential concepts behind getting personal. This time, getting your hands dirty will ask a little bit more from us. The plumbing is documented in a post I stumbled upon titled Password Reset Django 1.0. This is the often requested, and more often neglected, forgot password functionality that leaves developers and system admins searching through internal email chains, sharing plain text passwords over IM, etc.

You've all been received these before - "hey forgot my password can you create a new one for me? " Quick refresh Just to refresh our memories, since we're all forgetting our passwords, here are a few websites I visit every day and their login forms with "forgot password" calls to action. Bitbucket Bitbucket asks users if they "Lost your password? " Twitter And that's it! Conclusion. Python - How do I get multiple values from checkboxes in Django.

Django - SQL Server

Crucialfelix/django-ajax-selects. Django, Todo lo que quieres saber y algo mas. Instalación. jQuery Autocomplete + Django + AJAX. Ahora voy a explicar algo técnico pero estético, como utilizar la plugin de jQuery Autocomplete con Django+AJAX, con ella se pueden conseguir efectos como este; jQuery Autocomplete Trataré de hacer una consulta por AJAX a una URL cuando tipee 3 o más letras, el código puede ser el siguiente; Donde: input: Será el selector del campo de texto al que queremos aplicarle el plugin.minLength: La longitud mínima para hacer la consulta.

jQuery Autocomplete + Django + AJAX

‘/ajax/url/’: La URL donde haremos la consulta.start: Va a ser el valor actual del campo de texto, el texto que hemos tipeado y por el que queremos buscar. La vista podría estar definida como sigue: También se pueden utilizar serializadores para pasar la información a JSON, pero en este caso he preferido hacerlo a mano. Para más información visita la página de jQuery. Here is the attachments of this Post.

Utilizando Django para hacer la migración - Menudo Problema. Apuntes y tutoriales de desarrollo – Guardar y cargar datos del modelo en django. Www.yaco.es/media/community/oswc_django.pdf. Starting a Django Project the Right Way. Check out the new, updated version of this post with Django 1.6 specific changes and updates.

Starting a Django Project the Right Way

One of the things I wish I had known when starting my Django project for IllestRhyme was "How do I start a real Django project". As in, one that's actually going to be used and developed more, not the toy project from the (admittedly excellent) Django documentation. Having just gone through this process again for my new site, I wanted to share the knowledge I've gained about how to properly start a project in Django. By the end of this post, you will have 1. None of these steps, except for perhaps the first, are covered in the official tutorial.

Depuración

Optimización. Django performance tips. Django handles lots of traffic with ease; Django sites have survived slashdottings, farkings, and more.

Django performance tips

Here are some notes on how we tweak our servers to get that type of high performance. Use a separate database server If you can afford it, stick your database server on a separate machine, too. All too often Apache and PostgreSQL (or MySQL or whatever) compete for system resources in a bad way. A separate DB server — ideally one with lots of RAM and fast (10k or better) drives — will seriously improve the number of hits you can dish out. Use PostgreSQL I’ll probably get lots of push-back from the MySQL community about this one, but in my experience PostgreSQL is much faster than MySQL in nearly every case. There’s no such thing as too much RAM Even really expensive RAM costs only about $200 per gigabyte.

Faster processors really won’t improve performance all that much; most web servers spend up to 90% of their time waiting on IO! Next max out the RAM on your web server. Turn off KeepAlive. Www.maestrosdelweb.com/images/2012/06/django-1.4-cheatsheet-maestros-del-web.pdf. We.Developers 007 – Python & Django. En este programa repasamos con Ramón (@m3drano) la historia y características de Python, un lenguaje de programación que ha ido ganando popularidad, particularmente en el entorno de las aplicaciones web.

We.Developers 007 – Python & Django

TinyMCE Texto enriquecido

Django admin site: access, filtering and restricting. Tags: django I’m going to show you how to filter what’s shown in django’s admin based on the current request, so for instance limiting the list of objects to what the current user has permission to see.

Django admin site: access, filtering and restricting

Django’s build-in admin site is pretty great. It is easy to get a quick edit/add/delete interface for your database objects. The only basic action you have to take is to register your model: from django.contrib import admin from django.db import models class YourModel(models.Model): # Couple of fields admin.register(YourModel) # ^^^ Can be right in your models.py. If you want something more, you can tweak by coupling your model with an “Admin” and giving that some attributes. I’ll leave the specifics of those list_filter objects to your own google skills. Admin access First things first: if you’re The Real Admin of Your Django Site, you can see and do all, of course. The add/change/delete permissions have different effects on the admin interface: Filtering objects in the admin. Django Packages : Django Packages reusable apps, sites and tools directory.

SSL/Django

Settings. Here’s a full list of all available settings, in alphabetical order, and their default values.

Settings

Default: {} (Empty dictionary) A dictionary mapping "app_label.model_name" strings to functions that take a model object and return its URL. This is a way of overriding get_absolute_url() methods on a per-installation basis. Example: Note that the model name used in this setting should be all lower-case, regardless of the case of the actual model class name. Próximo curso: Django, el web framework para perfeccionistas. El crecimiento de Python es cada vez mayor y esto se ha hecho más notorio en los últimos años, con la aparición de herramientas que hacen el trabajo más simple y eficiente con este lenguaje de programación.

Próximo curso: Django, el web framework para perfeccionistas

Añadir Botones submit_row

Gkuhn1/django-admin-templates-twitter-bootstrap. Generar Documentación.