As far as I know, you should implement the file deletion by yourself. You
should code it on the Models delete function. preserving the default
behaviour.
here is a link to some read:
http://docs.djangoproject.com/en/dev/topics/db/models/#overriding-model-methods
How you do the file deletion is jus
Models:
class Technology(models.Model):
name = models.CharField(max_length=100, unique=True)
slug = models.SlugField(max_length=100, unique=True)
class Site(models.Model):
name = models.CharField(max_length=100, unique=True)
slug = models.SlugField(max_length=100, unique=True)
Borislav is right, although it seems to me that overriding the model's save
method would be more appropriate in Your case.
On the other hand, You really should think twice before doing so. There's
actually a good reason for django orm not to delete the actual file after
the corresponding FileField
Please help me, why do I get such a form of admin home page (after
autentification):
http://www.google.com/url?sa=D&q=https://docs.google.com/leaf%3Fid%3D0B5W4njXO9ND_YmY0ZGQ4NTktZWZiZC00MzU3LWI5ZWEtYTFmM2JkODY5YmEy%26hl%3Den%26authkey%3DCMCK6uQG
--
You received this message because you are subs
error # 1 I can't understand at all,
error # 2 is because of errors in urls.py files (project level and/or
application level), but I cannot find them exactly. Please help
On 26 фев, 21:58, vladimir wrote:
> 1. Studying example in "The Definite Guide to Django. 2nd ed.
> A.Holovaty, J.Kaplan-Moss
error #1: seems that the browser is not able to load static resources
( css ). If you had firebug try to check the "net->All" panel for
errors
Stefano
2011/2/27 veva...@yandex.ru :
> error # 1 I can't understand at all,
> error # 2 is because of errors in urls.py files (project level and/or
>
Take a look to :
http://docs.djangoproject.com/en/1.2/ref/models/querysets/#select-related and
http://docs.djangoproject.com/en/dev/ref/templates/builtins/?from=olddocs#regroup
Stefano
2011/2/27 galago :
> Models:
> class Technology(models.Model):
> name = models.CharField(max_length=100, uni
I use select_related().
How to apply it with regroup? I haven't use it before.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to
dja
1) firebug shows nothing in "net->all" panel, 2) the same result is in
Firefox 3.6.13, Internet Explorer 8, Google Chrome
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsu
In template in main loop I want to display all technologies assigned to the
each site. Technologies are assigned by m2m relation. So I run subloop as
You can see in code above. I want to reduce the number of queries executed
by those subqueries. I want to know, if there is a better way to do thi
nothing ? is it enabled ?
Please indicate:
- django version
- the value of MEDIA_ROOT, MEDIA_URL, ADMIN_MEDIA_PREFIX
- urls.py
2011/2/27 Vladimir :
> 1) firebug shows nothing in "net->all" panel, 2) the same result is in
> Firefox 3.6.13, Internet Explorer 8, Google Chrome
>
> --
> You received
Django 1.2.3,
in settings.py I have not edit this values:
MEDIA_ROOT = ''
MEDIA_URL = ''
ADMIN_MEDIA_PREFIX = '/media/'
urls.py:
from django.conf.urls.defaults import *
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patter
Actually, select_related won't help You with m2m fields. As it's written in
docs linked by s.apostolico, it only works with ForeignKeys...
As far as I know, there's no way to avoid the extra query using django's
orm.
2011/2/27 galago
> In template in main loop I want to display all technologies
On Feb 27, 1:01 am, Borislav Petrović wrote:
> Hello,
>
> Is there an app, or a suggestion on how to browse through media
> files on a remote machine?
>
> I have a setup that would include two separate machines one from a web
> hosting for my django site and another that would host media
Artur is right, I did not see that you use m2m.
S.
2011/2/27 galago :
> In template in main loop I want to display all technologies assigned to the
> each site. Technologies are assigned by m2m relation. So I run subloop as
> You can see in code above. I want to reduce the number of queries execu
seems that django is not able to decode the .css files
try to open /contrib/admin/media/css/base.css with
notepad and check it's content
S.
2011/2/27 Vladimir :
> Django 1.2.3,
>
> in settings.py I have not edit this values:
> MEDIA_ROOT = ''
> MEDIA_URL = ''
> ADMIN_MEDIA_PREFIX = '/media/'
>
>
/*
DJANGO Admin styles
*/
body {
margin: 0;
padding: 0;
font-size: 12px;
font-family: "Lucida Grande","DejaVu Sans","Bitstream Vera
Sans",Verdana,Arial,sans-serif;
color: #333;
background: #fff;
}
/* LINKS */
a:link, a:visited {
color: #5b80b2;
text-decoration
is it a good idea to delete Django from Python27/Lib/site-packages and
install Django-1.2.5 ?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, sen
Could you do a ManyToMany relationship through an intermediary model,
and then query the intermediary using select related?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To un
I use virtualenv so can test my app with multiple django version easy.
http://pypi.python.org/pypi/virtualenv
S.
2011/2/27 Vladimir :
> is it a good idea to delete Django from Python27/Lib/site-packages and
> install Django-1.2.5 ?
>
> --
> You received this message because you are subscribed t
I have installed Django-1.2.5. No effect.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.co
On Sun, Feb 27, 2011 at 5:46 AM, vladimir wrote:
> Please help me, why do I get such a form of admin home page (after
> autentification):
>
> http://www.google.com/url?sa=D&q=https://docs.google.com/leaf%3Fid%3D0B5W4njXO9ND_YmY0ZGQ4NTktZWZiZC00MzU3LWI5ZWEtYTFmM2JkODY5YmEy%26hl%3Den%26authkey%3DCMC
On Sat, Feb 26, 2011 at 12:39 PM, Pascal Germroth wrote:
> It seems the query builder forgets annotations when dealing with joins:
>
>
Not in my experience.
>
> I have this model with Postgresql, Django 1.3 alpha 1 (SVN rev. 15659):
>
I don't quite understand that Django rev spec. r15659 is qui
Hi,
>> It seems the query builder forgets annotations when dealing with joins:
> Not in my experience.
Yeah I experimented further and it wasn't actually a problem with /that/
part of the query (well, it changed when I added/removed the order_by,
but the actual cause was some interference once it
1. I'm wondering if I can delete a cached content made in template cache. I
want to delete it from my view. I have in my template {% cache 500
cache_name sites.number %}
Is it possible to delete all "cache_name" cached content within the view,
for example when some action is made?
2. I want to
Hebrew is within the unicode range 0x590 to 0x5ff.
I tried
if lang_string[0] >= u'0x590' and lang_string[0] <= u'0x5ff':
but it does not seem to work.
How do I check if lang_string is in Hebrew or not. Using Python 2.5,
Django 1.2
--
You received this message because you are subscribed to the
I've successfully setup django.auth.openid to do to the login through
google, and I see that it will prompt the user for releasing their e-
mail. However, I don't see anything available that let's me query the
e-mail. Where is that information stored? request.user somewhere?
--
You received th
Ah yes, that is *much* better. Thank you! Sorry for the delay,
forgot to check back on this thread till now.
Margie
On Feb 17, 2:28 pm, Daniel Roseman wrote:
> On Thursday, February 17, 2011 10:06:40 PM UTC, Margie Roginski wrote:
>
> > Thanks for your reply, Daniel. I didn't give my example
To Lee Hinde:
Thank You. You answered me:
Your browser's not finding the admin media location to load the css.
Look at the docs for ADMIN_MEDIA_PREFIX. (I think that's the one...)
I have looked:
ADMIN_MEDIA_PREFIX
Default: '/media/'
The URL prefix for admin media -- CSS, JavaScript and images used
On Sun, Feb 27, 2011 at 6:01 PM, ydjango wrote:
> Hebrew is within the unicode range 0x590 to 0x5ff.
>
> I tried
> if lang_string[0] >= u'0x590' and lang_string[0] <= u'0x5ff':
>
> but it does not seem to work.
>
> How do I check if lang_string is in Hebrew or not. Using Python 2.5,
> Django 1.2
2. Studying example (CMS) in "Python Web Development with Django.
J.Forcier, P.Bissex, W.Chun" I have got an error:
https://docs.google.com/leaf?id=0B5W4njXO9ND_Mzg1M2U0ZGItYzZiMS00Y2Qx...
adding detailes. I study CMS project in Chapter 8 in that book.
Following authors I wrote:
1) project level c
Hi all,
I want to add a language switcher below the breadcrumb to all my django
admin pages.
Therefore I created templates/admin/base.html in my project. However I don't
want to copy the whole original base.html and add my changes - this would
defeat the DRY principle and it would be a mainten
On Monday, 28 February 2011, Martin Brochhaus
wrote:
> Hi all,
> I want to add a language switcher below the breadcrumb to all my django admin
> pages.
> Therefore I created templates/admin/base.html in my project. However I don't
> want to copy the whole original base.html and add my changes -
Hi Alex,
many thanks for your suggestion but I think {{ block.super }} will not help.
In order to have a parent template I would first have to write something
like {% extends "admin/base.html" %} but this already is not possible
because it would mean inheriting itself.
Best regards,
Martin
On Mo
Thx, i'll give it a shot ;-)
. . . . . . . . . . . . . . . . . . . . . . . . . .
Patrick Szabo
XSLT-Entwickler
LexisNexis
Marxergasse 25, 1030 Wien
mailto:patrick.sz...@lexisnexis.at
Tel.: +43 (1) 534 52 - 1573
Fax: +43 (1) 534 52 - 146
-Ursprüngliche Nachricht-
Von: django-users@
35 matches
Mail list logo