No bother, I have found the solution. Simply use the ContextProcessor.
On May 7, 10:27 pm, Stephen Cheng wrote:
> I have got a case like this: I have a drop down list of value of 8
> cities which requires a db query every time when every page loads. The
> problem is when the url is diverted to d
On 5/7/2009 9:23 PM, Shadow wrote:
> If i get a model object with Model.objects.get()
>
> Is their a way to turn that into a dictionary?
Why not just filter for it and use values()?
--
George
--~--~-~--~~~---~--~~
You received this message because you are subsc
On 5/7/2009 9:19 PM, Margie wrote:
> Thanks much George, that was a big help. I have some "proof of
> concept code below" that simply limits choices to the first four
> users, and I have verified that that works.
>
> class TaskAdmin(admin.ModelAdmin):
>
> def formfield_for_dbfield(self, db_
Hi,
I was trying to host 2 site in the one domain, the following was done
by me I coudn't get the two site.
NameVirtualHost domani
ServerName domain/site
DocumentRoot /home/somePath/
ServerPath /path/
SetHandler python-program
PythonHandler django.core.handlers
On Thu, May 07, 2009 at 10:16:44PM -0700, online wrote:
> Thanks, i tried changing
>
>
> to
> or
Your third attempt is not even valid syntax. Doesn't it seem a
little strange that in the other cases you had quotes enclosing a
string but then in the third, you did not?
Your problem is compl
If you look at the example i pointed at on django page, then then you
notice that it says path/to/project in pythonpath.
your pythonpath is : PythonPath "['C:/depot/projects/web/'] +
sys.path"
Which seems to me is like path/with/project and should be /depot/
projects as far as i can tell.
I
Thanks, i tried changing
to
or
still no luck
On May 4, 7:49 am, zayatzz wrote:
> Posting because i just set up httpd.conf on linux computer few days
> ago and it took me a while to get it working as i wanted to.
>
> If i just compare the way how i set it up and how you did it Then the
>
Several people answered to your question here:
http://groups.google.com/group/django-users/browse_thread/thread/2f98dfb324b86747/884e9a5477deb6ca?q=#884e9a5477deb6ca
Alan
On May 8, 7:54 am, online wrote:
> forgot to mention the error message:
>
>
forgot to mention the error message:
---
ImportError: Settings cannot be imported, because environment variable
DJANGO_SETTINGS_MODULE is undefined
django is realy cool. But it is so frustrated to get django work on my
windows machine.
here is my setting/configures
python setting at httpd.conf:
--
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
al
Hi,
If i get a model object with Model.objects.get()
Is their a way to turn that into a dictionary?
Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to
Thanks much George, that was a big help. I have some "proof of
concept code below" that simply limits choices to the first four
users, and I have verified that that works.
class TaskAdmin(admin.ModelAdmin):
def formfield_for_dbfield(self, db_field, **kwargs):
if db_field.name == "ow
GUCCI bags ( paypal payment )( www.315store.com )
CHLOE bags
CHANEL bags
CLOTHES
COACH bags ( paypal payment )( www.315store.com )
DOLCE&GABBANA bags
FENDI bags
GUESS bags
JIMMY CHOO bags ( paypal payment )( www.315store.com )
JUICY bags
LV bags
PRADA bags ( paypal payment )( www.315store.com
cheap GHD (www.518store.com)
hot sale CHD(www.518store.com)
wholesale CHD(www.518store.com)
good CHD(www.518store.com)
new style CHD(www.518store.com
cheap GHD (www.518store.com)
hot sale CHD(www.518store.com)
wholesale CHD(www.518store.com)
good CHD(www.518store.com)
new style C
cheap GHD Straightener,(www.518store.com)
Cheap GHD Iron,(www.518store.com)
Cheap GHD iv styler(www.518store.com)
,Cheap ghd stylers,(www.518store.com)
Cheap pink ghd,(www.518store.com)
Cheap ghd ceramic iron,(www.518store.com)
Cheap ghd flat iron,Cheap ghd (www.518store.com)
mk5,cheap ghd
( paypal payment )( www.315store.com )Air Jordans Air Jordans 1 Air
Jordans 2 Air Jordans 3 Air Jordans 3.5 Air Jordans 4 Air Jordans 4.5
Air Jordans 5 Air Jordans 6 ( paypal payment )( www.315store.com )Air
Jordans 7 Air Jordans 8 Air Jordans 9 Air Jordans 10 Air Jordans 11
Air Jordans 12 Air Jor
For anyone that finds this:
I had the following in my apache config:
PythonOption django.root /
which stripped the initial slash.
:P
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to
Hi,
I'm having a problem with admin pages hanging when running the dev
server on an off-port that seems to be similar to the one described
here:
http://groups.google.com/group/django-users/browse_thread/thread/3450e2c2585a8e82/c04d9a6d4c803bd7?lnk=gst&q=admin+server+hangs#c04d9a6d4c803bd7
I'm r
On 5/7/2009 4:28 PM, Andy Lei wrote:
> I have 3 models. Something like this:
>
> Writer:
> content = ManyToMany(Content)
> Content
> tags = ManyToMany(Tag)
> Tag
>
> Now suppose I have a Tag, call it "tag1". The idea of the query is
> that I want the Writers that have the most pieces
"""
Background:
As described on the "User Authentication in Django" manual, I am using
an additional model to store extra information about users. This
additional model (J2User) model uses a ForeignKey to the User model
and is specified below.
Problems (all related):
1) Accessing the J2User mod
On 5/7/2009 6:29 PM, Margie wrote:
> I know this question has been pondered in a bunch of posts, and I'm
> sorry to repeat it, but I just can't figure out what is the right
> direction to take.
>
> Let's say I have a model for a Task:
>
> class Task(models.Model):
> owner = models.ForeignKey
I know this question has been pondered in a bunch of posts, and I'm
sorry to repeat it, but I just can't figure out what is the right
direction to take.
Let's say I have a model for a Task:
class Task(models.Model):
owner = models.ForeignKey('auth.User')
resources = models.ManyToManyFiel
On 5/7/2009 5:00 PM, Graham Dumpleton wrote:
>
>
> On May 7, 2:41 am, George Song wrote:
>> On 5/6/2009 4:02 AM, Graham Dumpleton wrote:
>>
>>
>>
>>
>>
>>> On May 6, 4:38 am, George Song wrote:
On 5/5/2009 6:48 AM, Michel Thadeu Sabchuk wrote:
> Hi guys,
> I'm having a weird probl
On May 7, 2:41 am, George Song wrote:
> On 5/6/2009 4:02 AM, Graham Dumpleton wrote:
>
>
>
>
>
> > On May 6, 4:38 am, George Song wrote:
> >> On 5/5/2009 6:48 AM, Michel Thadeu Sabchuk wrote:
>
> >>> Hi guys,
> >>> I'm having a weird problem with TIME_ZONE settings. Some view list
> >>> object
I have 3 models. Something like this:
Writer:
content = ManyToMany(Content)
Content
tags = ManyToMany(Tag)
Tag
Now suppose I have a Tag, call it "tag1". The idea of the query is
that I want the Writers that have the most pieces of Content tagged
with tag1.
Theoretically, it'd be som
Hi,
I'm wondering what the best/canonical way is to gather the set of
related objects for each of a number of objects, going across a
Many-to-Many relationship. Here's an example, since that probably
didn't make sense by itself:
class Label(Model):
name = CharField(...)
class Email(Model):
On May 7, 11:23 am, Phil Mocek
wrote:
> On Thu, May 07, 2009 at 12:49:28PM -0500, Tim Chase wrote:
> > > was searching for "interface" or "IP address" but the tutorial
> > > says -- incorrectly or colloqially, depending on how you see
> > > things -- "So to listen on all public IPs (useful if y
On May 7, 5:56 pm, Eric Chamberlain wrote:
> Our view is taking too long to render, can anyone offer suggestions to
> improve its speed?
>
> There are 5830 profiles.
>
> Total query count: 23809
> Total duplicate query count: 493
> Total SQL execution time: 66.003
> Total Request execution time
I am trying to figure out how to do isnull lookups with the admin
change list filter. I am using the django master branch (off of
github), updated to 4/28.
I have a couple models with a simple relation:
from django.db import models
class ModelOne(models.Model):
pass
class ModelTwo(models.Mo
On May 6, 11:23 am, joshuamckenty wrote:
> I'm using Fabric for deployment of my django apps, and I quite like
> it. It's still probably not as feature-rich as capistrano, but it's
> written in python, has a *very* active community right now, and solves
> the problems that I have, anyway. YMMV.
On May 6, 9:30 am, djangomax wrote:
> Thanks! So I just need to replace "forms" with "models and it'll work?
Are you defining a model or are you creating a form? To really be able
to answer that, the code around that one line would be helpful.
The easy answer (but not necessarily correct answ
On 5/7/2009 8:05 AM, Lee Hinde wrote:
> On Wed, May 6, 2009 at 11:37 PM, George Song wrote:
>> On 5/6/2009 11:18 PM, Lee Hinde wrote:
>>> On Wed, May 6, 2009 at 11:15 PM, Lee Hinde wrote:
On Wed, May 6, 2009 at 10:54 PM, George Song wrote:
> On 5/6/2009 10:34 PM, Lee Hinde wrote:
>
On 5/7/2009 1:01 PM, Jamie Pittock wrote:
> Basically, am I doing things right, and if so which is the best
> solution from the above?
Yup, you are doing things correctly as far as I can tell.
As for creating a custom method or not, it's up to you, it's just a
convenience wrapper, after all. I
Hi all -
As the subject suggests, I've wrapped the generic view
date_based.object_detail in another view, and while my solution seem
to be working, as I'm still new to Django, I'd like to check I'm doing
things right with the experts (you!).
I'm creating a blog that has multiple authors. The ur
On Thu, 2009-05-07 at 07:55 -0700, Wouter van der Graaf wrote:
> Hi there,
>
> Spent hours trying to find the solution, but no luck. So here goes...
>
> Please consider simplified code below:
>
> {{{
> class Country(models.Model):
> ...
> label_en = models.CharField(max_length = 128, bl
Hello,
The thread link didn't go through.
On May 7, 12:25 pm, branesks wrote:
> Follow this thread.
>
> Sent from my iPhone
>
> On May 7, 2009, at 12:09, Jesse wrote:
>
>
>
> > Hello,
>
> > I've implemented both django-cms and flatpages, but can not get
> > tiny_mce to display in either. My
>
Follow this thread.
Sent from my iPhone
On May 7, 2009, at 12:09, Jesse wrote:
>
> Hello,
>
> I've implemented both django-cms and flatpages, but can not get
> tiny_mce to display in either. My
>
> URLs.py file:
>(r'^tinymce/', include('tinymce.urls')),
>
> from django.conf import setting
I, also, am receiving inexplicable "Please correct the errors below"
messages within templates with inlines that contain fields with
'blank=True' and / or 'null=True'.
The messages appear about every third or fourth save attempt that
involves empty strings. But I'm unsure. The bug is difficult
I am trying to override the admin sites' change_list.html, following
the example at:
http://docs.djangoproject.com/en/dev/ref/contrib/admin/#overriding-admin-templates
If I create templates/admin/myapp/change_list.html and just put this
in it (and nothing else):
{% extends "admin/change_list.ht
On 5/7/2009 11:23 AM, Phil Mocek wrote:
> On Thu, May 07, 2009 at 12:49:28PM -0500, Tim Chase wrote:
>>> was searching for "interface" or "IP address" but the tutorial
>>> says -- incorrectly or colloqially, depending on how you see
>>> things -- "So to listen on all public IPs (useful if you want
On 5/7/2009 11:16 AM, Eric Chamberlain wrote:
>
> On May 7, 2009, at 10:36 AM, George Song wrote:
>
>> On 5/7/2009 8:56 AM, Eric Chamberlain wrote:
>>> Our view is taking too long to render, can anyone offer suggestions
>>> to
>>> improve its speed?
>>>
>>> There are 5830 profiles.
>>>
>>> /To
On Thu, May 07, 2009 at 12:49:28PM -0500, Tim Chase wrote:
> > was searching for "interface" or "IP address" but the tutorial
> > says -- incorrectly or colloqially, depending on how you see
> > things -- "So to listen on all public IPs (useful if you want
> > to show off your work on other comput
On May 7, 2009, at 10:36 AM, George Song wrote:
>
> On 5/7/2009 8:56 AM, Eric Chamberlain wrote:
>> Our view is taking too long to render, can anyone offer suggestions
>> to
>> improve its speed?
>>
>> There are 5830 profiles.
>>
>> /Total query count:/ 23809
>> /Total duplicate query count:/
Hello,
I've implemented both django-cms and flatpages, but can not get
tiny_mce to display in either. My
URLs.py file:
(r'^tinymce/', include('tinymce.urls')),
from django.conf import settings
if settings.DEBUG:
urlpatterns += patterns('',
(r'^site_media/(?P.*)$', 'django.views
On 5/7/2009 10:42 AM, overgroove wrote:
> I have the following models:
>
> Customer
> Order
> Lineitem
>
> Customers have orders and orders have lineitems. In lineitems there's
> a product price and a product quantity. I would like to be able to,
> using django querysets and whatever magic I h
On Thu, May 7, 2009 at 2:13 AM, 83nini <83n...@gmail.com> wrote:
>
> Hi guys,
>
> I have a template.surf which i'm trying to style with CSS external
> file, but it's not working! any idea how to deal with .surf templates?
> and how to style them with the CSS external files?
> internally working, e
> was searching for "interface" or "IP address" but the tutorial
> says -- incorrectly or colloqially, depending on how you see
> things -- "So to listen on all public IPs (useful if you want
> to show off your work on other computers), use:". There's no
> such thing as a "public IP".
I suspect
I have the following models:
Customer
Order
Lineitem
Customers have orders and orders have lineitems. In lineitems there's
a product price and a product quantity. I would like to be able to,
using django querysets and whatever magic I have to do, to annotate
the multiplication of price and qua
On 5/7/2009 8:56 AM, Eric Chamberlain wrote:
> Our view is taking too long to render, can anyone offer suggestions to
> improve its speed?
>
> There are 5830 profiles.
>
> /Total query count:/ 23809
> /Total duplicate query count:/ 493
> /Total SQL execution time:/ 66.003
> /Total Request execu
On Thu, May 07, 2009 at 09:01:01AM -0700, donarb wrote:
> On May 7, 8:43 am, Phil Mocek wrote:
> > This, unfortunately, is not explained in the runserver
> > documentation [1] or the admin utility's built-in help. The
> > only place I've found it documented is in chapter two of The
> > Django Boo
Hi, I'm not sure what I've done wrong but I get the following error if
I visit any url but "/".
Environment:
Request Method: GET
Request URL: http://fusion-gospel/test
Django Version: 1.1 beta 1 SVN-10658
Python Version: 2.5.2
Inst
I've got django running fine and my app/project. I'm testing out a
deploy on a fresh machine and wanted to use django as a egg. Did the
following,and per the link on the django site, pulled out django-
admin.py (although won't need to run that on the deployed machines)
export PYTHONPATH=~/egg/Dja
For anyone else trying to figure this out, I think I found the
answer.
See InlineModelAdmin:
http://docs.djangoproject.com/en/dev/ref/contrib/admin/#inlinemodeladmin-objects
To translate into my example...
class PersonPositionInline(admin.TabularInline):
model = PersonPosition
class Person
On May 7, 8:43 am, Phil Mocek
wrote:
> This, unfortunately, is not explained in the
> runserver documentation [1] or the admin utility's built-in help.
> The only place I've found it documented is in chapter two of The
> Django Book [2].
It is also documented in the tutorial:
http://docs.django
Our view is taking too long to render, can anyone offer suggestions to
improve its speed?
There are 5830 profiles.
Total query count: 23809
Total duplicate query count: 493
Total SQL execution time: 66.003
Total Request execution time: 142.931
class Profile(Model):
id = UUIDField(primary_
Is the initial querySet availble in a template rendering a formset? I
would like to display values from the querySet, along with the form.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post
On Thu, May 07, 2009 at 07:17:08AM -0700, John Crawford wrote:
> I'm not sure why your address is all zeros, did you give a
> specific host number parameter to runserver?
That causes the development server to listen on all available
network interfaces. This, unfortunately, is not explained in th
Hi there,
Spent hours trying to find the solution, but no luck. So here goes...
Please consider simplified code below:
{{{
class Country(models.Model):
...
label_en = models.CharField(max_length = 128, blank=True,
null=True)
label_nl = models.CharField(max_length = 128, blank=True,
On 5/3/2009 12:59 AM, notcourage wrote:
> I'm interested in hearing how you cope w/ the problem of specifying
> ManyToMany relationships in an object creation view. Consider two
> models M1 & M2 and a creation view/form for M1. A technique I'm using
> is to specify M2 values as an unbound field in
pubu...@pubuntu:~/django-trunk/build/lib/django/bin/myapp1
export DJANGO_SETTINGS_MODULE=myapp1.settings
export PYTHONPATH=/usr/lib/python2.5/site-packages
django-admin.py dumpdata
Error: Could not import settings 'myapp1.settings' (Is it on sys.path?
Does it h
ave syntax errors?): No module name
On Wed, May 6, 2009 at 11:37 PM, George Song wrote:
>
> On 5/6/2009 11:18 PM, Lee Hinde wrote:
>> On Wed, May 6, 2009 at 11:15 PM, Lee Hinde wrote:
>>> On Wed, May 6, 2009 at 10:54 PM, George Song wrote:
On 5/6/2009 10:34 PM, Lee Hinde wrote:
> On Wed, May 6, 2009 at 10:22 PM, George S
duh, i forgot to say that i had 477 registered domain in the database
and 0 hosts before i run this code :-)
On 7 Mai, 15:40, Riccardo Pelizzi wrote:
> Sorry for the delay. hosts__isnull works!
> But i can confirm exclude doesn't:
>
> h = Host.objects.create(ip="0.0.0.0")
> d = RegisteredDomain.
Hi,
On 07.05.2009, at 16:02, bconnors wrote:
>
> I saw this chat related to DJANGO_SETTINGS_MODULE is undefined.
> Hello I am new to Django.
> I am trying to exercise "templates" through the interactive shell,
> however I end up getting this error. Can anyone help?
> here is the exact steps I fo
On 5/7/2009 1:43 AM, Chris Dew wrote:
> Do other developers consider it vital to support non-javascript
> browsers for accessibility reasons? Or are people largely using ajax
> regardless of accessibility, to make their apps look shiny?
It depends on who the app is for. If it's in a corporate en
Arg - I meant 127.0.0.1:8000
Is there a way to edit messages that I dont see here? :)
John C>
On May 7, 10:17 am, John Crawford wrote:
> I'm not sure why your address is all zeros, did you give a specific
> host number parameter to runserver?
>
> Generally 127.0.0.0:8000 would be your localhos
I'm not sure why your address is all zeros, did you give a specific
host number parameter to runserver?
Generally 127.0.0.0:8000 would be your localhost, and that is the
default for runserver. Use that instead (or don't give it any
parameters), see what happens.
John C>
--~--~-~--~~-
Hello,
I have a problem for a quite simple model.
I would like to model a person marriage relation.
example :
class Person(models.Model):
name=models.CharField(max_length=100)
married_to=models.OneToOneField('self',symmetrical=True) #
symmetrical not allowed
married_to=m
When LANG = C, os.stat(u'中文.txt') will make a error.
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-5:
ordinal not in range(128)
os.environ['LANG']='utf8'
os.stat(u'中文.txt') also makes that error.
In my program, I tried SetEnv, adding export LANG='utf8' in envvars, but
t
I saw this chat related to DJANGO_SETTINGS_MODULE is undefined.
Hello I am new to Django.
I am trying to exercise "templates" through the interactive shell,
however I end up getting this error. Can anyone help?
here is the exact steps I follow:
1) cd C:\Django\mysite
2) set DJANGO_SETTINGS_MODULE=
Sorry for the delay. hosts__isnull works!
But i can confirm exclude doesn't:
h = Host.objects.create(ip="0.0.0.0")
d = RegisteredDomain.objects.all()[0]
d.hosts.add(h)
RegisteredDomain.objects.count()
--> 477L (total)
RegisteredDomain.objects.filter(hosts=None).count()
--> 476L (good!)
Registered
Hi Stephen;
On Thu, May 7, 2009 at 8:36 AM, Stephen Cheng wrote:
>
> I have thought this for quite a while and no idea so far. I like the
> forms/pages auto generated by Admin engine, but I also want to
> incorporate some of the forms/pages into my site with following
> expectations:
>
> 1. I can
Are you using a custom authentication backend?
Admin calls get_all_permissions() method on the logged-in user, which
tries to call get_all_permissions() method of each authentication
backend used.
The back-ends used should implement this method and definetely
http://docs.djangoproject.com/en/dev
Solved - was a custom authentication backend issue.
Looking into the get_all_permissions() method, I realized that it
calls the authentication backend's get_all_permissions() method.
I have been using a custom authentication back-end, developed
according to:
http://docs.djangoproject.com/en/dev/
I have thought this for quite a while and no idea so far. I like the
forms/pages auto generated by Admin engine, but I also want to
incorporate some of the forms/pages into my site with following
expectations:
1. I can use my own template.
2. use my own template and also use the context variables
Hi,
> I've set up my Media class for a widget as such:
>
> class InternationalSlugWidget(forms.TextInput):
> class Media:
> js = ('js/international_slug.js')
Your js here is a string, you want a tuple:
js = ('js/international_slug.js',)
>>> type(('foo'))
>>> type(('foo',))
--
For some reason I can't reply to this thread about Many to One (http://
groups.google.com/group/django-users/browse_thread/thread/
180feab07df9dfe6/17301e3fcaa92a33?lnk=gst&q=many+to
+one#17301e3fcaa92a33) so I will re-open here.
I am looking for an answer to Puneet's question: "but if there's
s
I have got a case like this: I have a drop down list of value of 8
cities which requires a db query every time when every page loads. The
problem is when the url is diverted to django-registration module,
then I don't know how to properly pass the citylist as a context value
to django-registration
While trying to track down the problem, I encountered this strange
behavior that the permissions of the user are not returned with
get_all_permissions():
>>> u = User.objects.get(username='demo')
>>> u.user_permissions.all()
[, , ]
>>> u.get_all_permissions()
set([])
Am I missing something bas
I guess we won't find the answer, wait and see if other face the same
thing
Because my firefox install is new, shipped with the last ubuntu in a
fresh install
In plugins i have 'ubuntu firefox modification' and 'flashblock'. Of
course some others for video
Add to that the fact that it worked som
Hello Pierre.
I recently came across the exact same problem (and for the exact same
reason)
I don't think my solution was any less ugly that yours. I modified
fieldset.html to look for a specific fieldset name. Anything in that
fieldset is displayed in a manner which honors the hidden field
prop
Sure, otherwise I won't be able to login to admin with that user at
first place.
Best,
oMat
On May 7, 1:04 pm, Kenneth Gonsalves wrote:
> On Thursday 07 May 2009 15:32:08 omat wrote:
>
> > "You don't have permission to edit anything."
>
> you have set is_staff?
> --
> regards
> kghttp://lawgo
On Thursday 07 May 2009 15:32:08 omat wrote:
> "You don't have permission to edit anything."
you have set is_staff?
--
regards
kg
http://lawgon.livejournal.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Djang
Hi,
I have set up the admin, and works as expected when logged in as a
super user.
When I log in with a user that have limited permissions (either when
permissions were assigned directly to the user or through a group
membership), the admin site says:
"You don't have permission to edit anything
On Thu, May 7, 2009 at 4:49 PM, Russell Keith-Magee
wrote:
> On Thu, May 7, 2009 at 11:31 AM, Steve R wrote:
>>
>> I’m looking to create an Admin so that when a user from one Site logs
>> into the admin they will not be able to see or modify entries for
>> other sites.
> ...
>> Do I need to subc
On Thu, May 7, 2009 at 5:38 PM, modelmike wrote:
>
> Hi,
>
> How do I instantiate AdminSite for my app and then subclass
> ModelAdmin?
Like I said in my original email, if you interested in this problem,
you're going to need to do a little digging of your own. This
particular problem wasn't a sp
Hi,
How do I instantiate AdminSite for my app and then subclass
ModelAdmin?
my_site.py...
from django.contrib.admin import sites
class my_admin_instance(sites.AdminSite)
pass
admin.py...
from my_django_project.my_django_app.my_site import
my_admin_instance
class
Hi,
How do I instantiate AdminSite for my app and then subclass
ModelAdmin?
my_site.py...
from django.contrib.admin import sites
class my_admin_instance(sites.AdminSite)
pass
admin.py...
from my_django_project.my_django_dpp.my_site import
my_admin_instance
class
Problem solved, my fault - just noticed it was expecting to traverse a
tuple;
js = ('js/international_slug.js',) fixed the problem
On May 7, 10:16 am, kRON wrote:
> Sorry for the repost, somehow I've submitted the form.
>
> I just wanted to add that my media url looks as MEDIA_URL = '/media/'
>
Hi guys,
I have a template.surf which i'm trying to style with CSS external
file, but it's not working! any idea how to deal with .surf templates?
and how to style them with the CSS external files?
internally working, externally...NOT!
cheers.
--~--~-~--~~~---~--~
Thanks for your reply.
My intention is to use this field as a version/timestamp to implement
a form of optimistic locking. I need to receive it back from the user
through a form and check it against the current version/timestamp of
the updated record.
I don't think "exclude" will work for me.
On Thu, May 7, 2009 at 11:31 AM, Steve R wrote:
>
> I’m looking to create an Admin so that when a user from one Site logs
> into the admin they will not be able to see or modify entries for
> other sites.
...
> Do I need to subclass AdminSite in contrib.admin.sites.py? Or modify
> the Admin view
Thanks for the advice, that's very useful.
Do other developers consider it vital to support non-javascript
browsers for accessibility reasons? Or are people largely using ajax
regardless of accessibility, to make their apps look shiny?
Regards,
Chris.
On 6 May, 16:07, Matthias Kestenholz
wro
On May 7, 9:23 am, PierreR wrote:
> That is what I do !
> (another way is to define a custom model field and override the
> "formfield" method).
>
> But ... I cannot get rid off the label in the admin console. That is
> my problem.
>
> Any easy way to remove the label of an hidden field in the ad
Well so far the only "not so ugly way" (in the sense that it is only
one line of code) I have found to do this is to change the css
directly (in my case admin.css):
/* Hacky way to remove hidden field lavel in the Admin console */
div.form-row.last_modified { display: none;}
On 7 mai, 09:23, Pier
Sorry for the repost, somehow I've submitted the form.
I just wanted to add that my media url looks as MEDIA_URL = '/media/'
Can anyone steer me the right way for fixing this?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
I've set up my Media class for a widget as such:
class InternationalSlugWidget(forms.TextInput):
class Media:
js = ('js/international_slug.js')
The problem is Django keeps pumping out the following import
statements:
...etc
My media root string looks
--~--~-~--~~-
I am new to Django.
When I try to execute: python manage.py runserver, I get the following
error
Error: [Errno 10104] getaddrinfo failed
What is going on and what should I do?
I have tried with 0.0.0.0:8000.
I am running Django Version 1.0.2-final and Python 2.6
--~--~-~--~~-
That is what I do !
(another way is to define a custom model field and override the
"formfield" method).
But ... I cannot get rid off the label in the admin console. That is
my problem.
Any easy way to remove the label of an hidden field in the admin
console ?
Thanks.
On 6 mai, 17:24, Daniel R
On Thu, May 7, 2009 at 2:44 AM, Jani Tiainen wrote:
> How you do that? Everywhere I look, documentation states that view is a
> "function" (well there is few places where is mentioned "callable").
You may want to consult some Python documentation; writing a class
whose instances are callable is
99 matches
Mail list logo