Solution:
def clean(self):
if any(self.errors):
# Don't bother validating the formset unless each form is
valid on its own
return
for i in range(0, self.total_form_count()):
form = self.forms[i]
cleaned_data = form.clean()
displa
Check the structure of project:
Here I use Eclipse, and my project have this structure:
myproject>myproject>app
In your case:
djangotest2>djangotest2>books
Or:
djangotest2>books
And in installed_apps:
INSTALLED_APPS = (
'books',
)
2012/6/16 Sabbineni Navneet
> project name is django
The problem now is the database configuration:
raise ImproperlyConfigured("
settings.DATABASES is improperly configured. "
django.core.exceptions.ImproperlyConfigured: settings.DATABASES is
improperly configured. Please supply the ENGINE value. Check settings
documentation for more details.
DATAB
In GAE only using django-norel, a fork of django with no join's queryset.
https://developers.google.com/appengine/articles/django-nonrel
Or using in Google Cloud SQL:
https://developers.google.com/appengine/docs/python/cloud-sql/django
But is a paying service.
2012/6/17 Gebriel Abebe
> Plea
"Do we have to create a database with that name before."
Yes, you need create the database "xam" (from mysql query browser) before
running syncb.
2012/6/17 Sabbineni Navneet
> I have Mysqldb installed.
> It still shows the same error.
>
>
>
> --
> You received this message because you are subs
Hi!
Try {% load name_of_custom_tag %} after the extends tag in template.
2012/6/18 upmauro
> Hello, sorry my english !
>
> I have one question, i create one custom tag and this works fine.
>
> But i have a situation :
>
> *site.html*
> *
> *
> {% include "header.html" %}
>
> Django looks the b
Hi!
I have this old code here.
# forms.py
class UploadFileForm(ModelForm):
title = forms.CharField(max_length=250 ,label="Nome:")
original_image = forms.ImageField(label="Imagem:")
class Meta:
model = Photo
# models.py
from django.dispatch import receiver
from django.db.mo
Hi!
I prefer using OnetoOne with a pre_delete signal to remove user from a
pirncipal object instance:
from django.contrib.auth.models import User
from django.db.models.signals import pre_delete
from django.dispatch import receiver
class Customer(User):
user = models.OneToOneField(User)
@rec
Try this:
from datetime import datetime, time, date
current_date = datetime.now()
today = datetime.combine(date.today(), time(19,30))
Look:
>>> from datetime import datetime, time, date
>>> print datetime.now()
2012-07-14 14:14:17.897023
>>> print datetime.combine(date.today(),time(19,30))
201
Or you can delete database and execute again syncdb. The aplication ask
again the password, warning for capslock. =)
2011/4/19 pfc
> I'm new to Django and am following the tutorials, specifically:
> http://docs.djangoproject.com/en/dev/intro/tutorial02/
> I followed the instructions on adding ad
Hello Brian!
This right, in fact that word "import" I inadvertently pasted, but the
import does not work.
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
The problem was that when doing the import, it does not appear available by
pressing ctrl + backspace in Eclipse, that is,
I still having a little problem using OneToOne relationship and Edit form.
The forms are created with combobox and get all address in database, i need
the address of the specific Employee only.
Anybody know fix this problem?
Thanks!
2011/4/23 Guevara
> I got put in the form of employee the for
Hello!
You need create a "static" folder in your project and inside in this folder
you create a "css" folder.
I use this configuration and works.
settings.py
import os.path
STATIC_ROOT = ''
# URL prefix for static files.
STATIC_URL = '/static/'
ADMIN_MEDIA_PREFIX = '/static/admin/'
TEMPLATE_D
I find for download "Beginning Django E-Commerce" in webmasterresourceskit
site. Look that.
Regards.
2011/4/25 Shant Parseghian
> Hi all, I'm aware of the choices out there for Django ecommerce apps but im
> confused about which to use. I need a simple shop that will do delivery only
> so no sh
In the repository of ubuntu 10.04.2 the version 1.1.1 is available, better
download version 1.3 of the Django site and install. Is very easy.
Regards!
2011/4/29 Korobase
> Does django 1.3 has a ubuntu deb package released !
> I have googled but get none,Any one have done this?
> Thanks.
>
> --
Thanks for the clarification, I put in the ForeignKey in employee class and is
working.
Regards!
2011/4/27 Tom Evans
> On Sun, Apr 17, 2011 at 9:21 PM, W Craig Trader
> wrote:
> > If your goal is to have an employee object that has direct access to all
> of
> > its related person object, and wh
Very good, I edited here.
Thank You!
2011/5/13 Shawn Milochik
> On 05/13/2011 04:22 PM, Guevara wrote:
>
>> Thank you shaw!
>>
>> You're welcome. Note that there's no reason to add 'commit = True' when
> saving the address -- that's the default.
>
>
> Shawn
>
> --
> You received this message b
Hello!
Open your pdAdminIII and create a database using UTF-8.
For aplication this is setting for your settings.py:
DEFAULT_CHARSET = 'utf-8'
FILE_CHARSET = 'utf-8'
Regards!
2011/5/18 Thin Rhino
> Hello,
>
> I am wondering if it is possible for me to specify the encoding to use for
> a postgre
I need change the FK id value in raw_id to
Thanks!
2011/5/25 epic2005
> who have the raw_id_fields patch url.. or some sugguest for modify
> raw_id_fields pop id back in the textbox , please give me , thanks a
> lot.
>
> --
> You received this message because you are subscribed to the Goog
In Ubuntu 10.04 repository stlll 1.1 version. =/
2011/5/31 Tobias Quinn
> You can always install the debian package from:
>
> http://packages.debian.org/wheezy/python-django
>
> which seems to work fine...
>
> On Apr 30, 3:29 am, Korobase wrote:
> > Does django 1.3 has a ubuntu deb package rele
Hello!
I think you need something like this in your admin.py:
class SystemAdmin(admin.ModelAdmin):
list_display = ("generation", "system", "cog_E")
ordering = ["-cog_E"]
search_fields = ("system")
list_filter = ("generation")
list_per_page = 10
admin.site.register(System, Syst
21 matches
Mail list logo