Re: create objects from custom SQL

2008-10-24 Thread DULMANDAKH Sukhbaatar
http://docs.djangoproject.com/en/dev/howto/legacy-databases/#howto-legacy-databases Here is a guide that will help you to build model from current database structure. maybe you need to do some optimizations on it. -- Regards Dulmandakh --~--~-~--~~~---~--~~ You

why not django's default server?

2008-10-24 Thread gniquil
I am deploying something for my immediate group in my company, which has about 30 or so people. My app (report) would be viewed at most a few thousand times day (which would already be more than most of the current php apps out there in my group). I would like to know if it's ok to break all the r

Re: Ordering M2M field?

2008-10-24 Thread Russell Keith-Magee
On Fri, Oct 24, 2008 at 10:16 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > OK, I have a model with a many to many relationship.. pretty > straightforward pre-1.0 code: > > class SpecialEvent(models.Model): >sponsors = models.ManyToManyField(Advertiser, related_name="event > sponsors",

Hi guys. I'm having problem with new-forms admin site.

2008-10-24 Thread astray
% settings.py % MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', ) INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes',

Hi guys, I'm having trouble with newform-admin interface

2008-10-24 Thread astray
% settings.py % MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', ) INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes',

Attribute Error when doing a syncdb.

2008-10-24 Thread Jared
Hello, I'm doing a little blog app and I'm going to be using tagging in it. So I wen to the google code page and downloaded it, named it tagging (instead of tagging-0.2.1), and then ran the install. Once I did that I made sure both my blog app and the tagging was included in the installed apps. I

Re: Django on Apache (mod_python) administration cookie problem

2008-10-24 Thread Graham Dumpleton
On Oct 25, 11:59 am, "M.Ganesh" <[EMAIL PROTECTED]> wrote: > Graham, > Option 3: I use other utilities like wordpress and phpMyAdmin, so I cannot > afford to disable php completely > Option 2: I use Linux Mint (Ubuntu variant) for developement and Debian Etch > for production. So for option 2,

Re: Cannot get user profile working.

2008-10-24 Thread kylewild
here's the model: from django.db import models from django.contrib.auth.models import User # this will set us up to use user.get_gender_display, thanks to django's get_FOO_display GENDER_CHOICES = ( ('M', 'Male'), ('F', 'Female'), ) # defining the model for UserProfile, which extends

create objects from custom SQL

2008-10-24 Thread rory
Hello, is there a way to execute a custom SQL query (as per below link) but then generate actual Model objects instead of just raw rows? http://docs.djangoproject.com/en/dev/topics/db/sql/#topics-db-sql thanks, rory --~--~-~--~~~---~--~~ You received this messag

Re: Django on Apache (mod_python) administration cookie problem

2008-10-24 Thread M.Ganesh
Graham, Option 3: I use other utilities like wordpress and phpMyAdmin, so I cannot afford to disable php completely Option 2: I use Linux Mint (Ubuntu variant) for developement and Debian Etch for production. So for option 2, I will require two sets of instructions, which means more trouble fo

Re: wrong redirect from admins "View on site" link

2008-10-24 Thread je
using proto-coltrane code from _Practical Django Projects_, i get the same error on trunk/apache/mod_python. i assume something around contrib.sites is misconfigured, but it could also be bad urls.py statements. any advice anyone? On Oct 24, 2:15 pm, Adi Jörg Sieker <[EMAIL PROTECTED]> wrote: > H

Re: Django Apps

2008-10-24 Thread Ian Maurer
You should probably start by looking at these 2 projects for CMS and eCommerce: http://django-cms.org/ http://www.satchmoproject.com/ Good luck and welcome to Django! regards, Ian http://itmaurer.com/ --~--~-~--~~~---~--~~ You received this message because you a

Re: order of apps in the admin panel

2008-10-24 Thread shacker
> On Oct 13, 11:00 am, Vokial <[EMAIL PROTECTED]> wrote: > > > Hello! > > > Is there a way to change the order of the applications shown in the > > admin page? If i'm not wrong it used to be the order in which the > > applications were written in the INSTALLED_APPS but now it seems to > > follow t

ANN: Initial release timelines for Django 1.0.1 and Django 1.1

2008-10-24 Thread James Bennett
(putting on release manager hat...) We've just put up an entry over at the official Django project blog with details of the timelines for Django 1.0.1 and Django 1.1: http://www.djangoproject.com/weblog/2008/oct/24/upcoming-releases/ Please bear in mind the immediate consequences of these timel

Re: Cannot get user profile working.

2008-10-24 Thread Brian Neal
On Oct 24, 3:01 pm, kylewild <[EMAIL PROTECTED]> wrote: > thanks brian, good call > > I had read that and somehow not parsed it! > > However, I'm still having the issue after changing it to: > > AUTH_PROFILE_MODULE = 'chat.userprofile' > > (i tried myproject.userprofile as well) > > 'NoneType' obj

Django Apps

2008-10-24 Thread Mike Hart
Hey all, I am the CEO of Artigrafx LLC and we are trying to create a few Django apps. We would appreciate any help with any of these projects, due to Django being new to us. Current Projects: A Django CMS A Django eCommerce system Links: http://www.agfxsite.com/ http://www.agfxsite.com/board Th

Re: profiles not saving....just not seeing problem

2008-10-24 Thread Lar
nevermindserves me right for coding when tired. On Oct 24, 2:23 pm, Lar <[EMAIL PROTECTED]> wrote: > Hi, > > I've been beating my head against this for a couple of days.  I am > creating a User with additional information stored in a profile > model.  I create the user, then create the prof

Re: GeoDjango problem -- server hangs on GEOSGeometry calls

2008-10-24 Thread Info Cascade
I've got it set on Permissive... I checked that before... Damn! Just checked the audit log and it's denying when I access the app. Even in Permissive mode. WTF? Okay, then. I'll disable it completely. I am so sick of selinux! ... Okay, disabled in /etc/selinux/config, rebooted and now... no me

Re: GeoDjango problem -- server hangs on GEOSGeometry calls

2008-10-24 Thread Justin Bronn
> Also, it's on CentOS 5.2 > Just want to be complete. > Turn off SELinux. I'm almost positive that's your problem. -Justin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this grou

wrong redirect from admins "View on site" link

2008-10-24 Thread Adi Jörg Sieker
Hi, I just noticed that the "View on site" link on the Admin change entry page redirects to localhost/. The dev server is running on localhost:8000 though. The model being used is the Entry model from coltrane_blog[1] which has a get_absolut_url method that looks like: from django.db impo

Re: Cannot get user profile working.

2008-10-24 Thread kylewild
thanks brian, good call I had read that and somehow not parsed it! However, I'm still having the issue after changing it to: AUTH_PROFILE_MODULE = 'chat.userprofile' (i tried myproject.userprofile as well) 'NoneType' object has no attribute '_default_manager' /home/mochat/webapps/django/li

database API from external tools?

2008-10-24 Thread Andrew Chapman
Hi everyone, Very much a Django newbie here, I'm trying to evaluate a few things before diving right in. I was all set to write something in Ruby Rails, but the reason for looking at Django is because I also need python access to all the same data that the web app is dealing with. The Django

Re: Cannot get user profile working.

2008-10-24 Thread Brian Neal
On Oct 24, 2:23 pm, kylewild <[EMAIL PROTECTED]> wrote: > I'm having this same issue and the fix here, as best I can attempt to > apply it, didn't work for me > > I had AUTH_PROFILE_MODULE set to "myproject.UserProfile" > > After reading this thread, I changed it to "chat.UserProfile" -- to no > a

Re: GeoDjango problem -- server hangs on GEOSGeometry calls

2008-10-24 Thread Liam
Also, it's on CentOS 5.2 Just want to be complete. On Oct 24, 9:22 am, Info Cascade <[EMAIL PROTECTED]> wrote: > Hi, Justin, > > Thanks SO much for responding! > We met at the WhereCamp meeting, you probably don't remember... > Thanks for looking at this. > > Liam > > Here's the info... > > Serve

Re: What do you use for design interface / mockup

2008-10-24 Thread Dana
Personally, I find paper to be an amazingly useful (and sometimes under-rated media). It seems unsophisticated to some, but it gives you many options to change things around, rework ideas, emphasis certain elements or workflow. If you need to share you can scan or take a photo of it. Once you've g

Re: Cannot get user profile working.

2008-10-24 Thread kylewild
I'm having this same issue and the fix here, as best I can attempt to apply it, didn't work for me I had AUTH_PROFILE_MODULE set to "myproject.UserProfile" After reading this thread, I changed it to "chat.UserProfile" -- to no avail In my "chat" directory, I have the model "UserProfile" define

Re: profiles not saving....just not seeing problem

2008-10-24 Thread Matias
Hello, ModelMultipleChoiceField fields cleaned data are lists, so you are trying to create an object with a list of ids as id. Also I think you want to retrive the object, in that case you have to use the get function of the model manager (e.g. Object.objects.get(id=someid). ) If you need to get

Re: Default values/prepopulate fields in ModelAdmin add view

2008-10-24 Thread Delta20
In case anyone else is trying to figure out how to do this, the solution I came up with was to put a dictionary of the values into the request and pass it to the ModelAdmin add_view function def some_view(request, ... ): ... values = { 'title': t, 'author': a } # make QueryDict mutabl

profiles not saving....just not seeing problem

2008-10-24 Thread Lar
Hi, I've been beating my head against this for a couple of days. I am creating a User with additional information stored in a profile model. I create the user, then create the profile object. I get the form information and if it is valid, I just want to save the information and do a bit more pr

Anyone have any good solutions for site navigation?

2008-10-24 Thread Matt Wilson
My site has a global-navigation header, with links to 5 sections of the site. I highlight the section that the viewer is currently viewing in the global header. Other than the highlighting, the header is the same on every page of the site. Then I also have a "local" navigation that shows differ

Reset trac account password

2008-10-24 Thread Matias
Hello everyone, Is there a way to reset the password of the trac account? I didnt find even an email address to do this request. Thanks in advance, Matias. -- :wq --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "

Multi-Table Inheritance

2008-10-24 Thread [EMAIL PROTECTED]
Does anyone have any suggestions on how to use mutli-table inheritance with model forms or some other way of creating it. For example if I have a model setup like this: class MetaData(models.Model): date = models.DateField() subject = models.CharField() class Body(MetaData): body = models

Re: Creating a system with multiple types of users

2008-10-24 Thread itsnotvalid
Is there any posts related to the permission system? I didn't looked into that part yet, but seems interesting. Of course groups also seems to solve the problem as well. However I also saw @user_passes_test in the doc. What is the difference or use cases from @user_passes_test and @permission_req

Re: Comments in reversed order

2008-10-24 Thread jrivero
yes! but the previous solution was useful to paginate the result with a another templatetag {% get_comment_list for entry as comment_list reversed %} {% paginate comment_list 10 as page using comment_list_page %} {% for comment in comment_list_page %} comment.comment {% endfor %} what method u

Model design solution

2008-10-24 Thread aiko
I am creating shop, but need advise on model/db design on product part: class Product(models.Model): name = models.CharField(max_length=250) typeid = models.IntegerField() pdata = models.IntegerField() price = ... visible = ... typeid and pdata is for extending product inform

Re: aggregation filter?

2008-10-24 Thread kbs
I can confirm it worked. Thanks guys! --~--~-~--~~~---~--~~ 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 emai

Re: GeoDjango problem -- server hangs on GEOSGeometry calls

2008-10-24 Thread Info Cascade
Hi, Justin, Thanks SO much for responding! We met at the WhereCamp meeting, you probably don't remember... Thanks for looking at this. Liam Here's the info... Server version: Apache/2.2.3 Server built: Jan 15 2008 20:33:41 With mod_python Python 2.4.3 ServerName rocket.domain.com Se

Re: Apache2 + mod_python --> not working

2008-10-24 Thread Karen Tracey
On Fri, Oct 24, 2008 at 11:51 AM, tsmets <[EMAIL PROTECTED]> wrote: > > I installed mod_python & apache2. > mod_python is OK > http://ubuntuforums.org/showthread.php?t=91101 > > I then a adapted the http.conf to > [EMAIL PROTECTED]:/etc/apache2$ cat httpd.conf > >SetHandler python-program >

django.contrib.auth Password Reset Form

2008-10-24 Thread mccomas . chris
I posted this on the IRC channel and didn't get a definite answer, but I'm trying to use the django.contrib.auth Password Reset Form. Here's the code in the django/contrib/auth/forms.py http://dpaste.com/86595/ In the default templates the template attempts to display the new password by using {

Re: max_length for TextField is not respected

2008-10-24 Thread Karen Tracey
On Fri, Oct 24, 2008 at 11:26 AM, omat <[EMAIL PROTECTED]> wrote: > > Thanks for the reply Karen. > > Accepted but not used? Neither in the model nor in the forms? This is > not how I would expect it to be. Yes, that's the way it is. max_length is specified as a possible keyword argument in dja

Re: Apache2 + mod_python --> not working

2008-10-24 Thread tsmets
Forgot to add that I adapted the /etc/apache2/sites-available/default /// NameVirtualHost * ServerAdmin [EMAIL PROTECTED] PythonPath "['/home/me/Documents/django'] + sys.path" SetEnv DJANGO_SETTINGS_MODULE

Re: max_length for TextField is not respected

2008-10-24 Thread Matías Costa
Any reason? Seems pretty basic and easy to limit TextField length. On code and db level. On Fri, Oct 24, 2008 at 5:09 PM, Karen Tracey <[EMAIL PROTECTED]> wrote: > On Fri, Oct 24, 2008 at 10:24 AM, omat <[EMAIL PROTECTED]> wrote: > >> >> Hi, >> >> I have a form class derived from a model using Mo

Apache2 + mod_python --> not working

2008-10-24 Thread tsmets
I installed mod_python & apache2. mod_python is OK http://ubuntuforums.org/showthread.php?t=91101 I then a adapted the http.conf to [EMAIL PROTECTED]:/etc/apache2$ cat httpd.conf SetHandler python-program PythonHandler django.core.handler.modpython SetEnv DJANGO_SETTINGS_MODULES de_p

Re: GeoDjango problem -- server hangs on GEOSGeometry calls

2008-10-24 Thread Justin Bronn
> However, if I access the application over http, the server hangs at > exactly that spot.  No error logged. > If I comment out the line, everything runs fine. You're going to have to provide more details on exactly what "http" means here. How are you deploying, e.g., mod_wsgi, mod_python, fast

Re: aggregation filter?

2008-10-24 Thread Matías Costa
Sure exists a better way. Get the tags (using django-tagging) used by more than 3 items: Tag.objects.extra(where=["id in (select tag_id from tagging_taggeditem group by tag_id having count(tag_id)>3)"] On Fri, Oct 24, 2008 at 4:37 PM, kbs <[EMAIL PROTECTED]> wrote: > > Hello all, > > is it possi

Re: aggregation filter?

2008-10-24 Thread gordyt
Forgot to say that I did that test in a sample app called "filters". Hence the table name "filters_member". --g --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Re: aggregation filter?

2008-10-24 Thread gordyt
Hi kbs, Given this: class Group(models.Model): name = models.CharField(max_length=64) class Member(models.Model): name = models.CharField(max_length=64) group = models.ForeignKey(Group) This will return what you want: Group.objects.extra(where=['id in (select group_id from filt

Re: max_length for TextField is not respected

2008-10-24 Thread omat
Thanks for the reply Karen. Accepted but not used? Neither in the model nor in the forms? This is not how I would expect it to be. Then, how can I limit a, say comment field to 500 chars in a djangoic way? Thanks... -- omat On Oct 24, 6:09 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On

Re: where is the error ?? dictionary update sequence element #0 has length 1; 2 is required

2008-10-24 Thread Net_Boy
Thank you for your help ,, --~--~-~--~~~---~--~~ 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 [EMAIL

Re: admin DATE_FORMAT not working?

2008-10-24 Thread Lars Stavholm
Low Kian Seong wrote: > Maybe this would shed some light: > http://code.djangoproject.com/ticket/2203 Yup, that explains it, thanks. /L > On Fri, Oct 24, 2008 at 4:57 PM, Lars Stavholm <[EMAIL PROTECTED] > > wrote: > > I've got... > > TIME_ZONE = 'Europe/Stock

Re: max_length for TextField is not respected

2008-10-24 Thread Karen Tracey
On Fri, Oct 24, 2008 at 10:24 AM, omat <[EMAIL PROTECTED]> wrote: > > Hi, > > I have a form class derived from a model using ModelForm. > > The model has a TextField(max_length=300) field, but length limit is > not taken into account and the form passes validation when texts > 300 > char are submi

aggregation filter?

2008-10-24 Thread kbs
Hello all, is it possible to filter based on an aggregate value? like count using django orm? for example: class Group(model): name = CharField() class Member(model): name = charfield() group = ForeignKey(Group) How can I filter the groups that have 10+ members using the django o

max_length for TextField is not respected

2008-10-24 Thread omat
Hi, I have a form class derived from a model using ModelForm. The model has a TextField(max_length=300) field, but length limit is not taken into account and the form passes validation when texts > 300 char are submitted. Same when submitting through admin. Is max_length not used for TextField?

Re: from mysite.polls.models import Poll, Choice

2008-10-24 Thread Carl Meyer
On Oct 24, 9:30 am, Carl Meyer <[EMAIL PROTECTED]> wrote: > manage.py puts both the project dir itself and its parent dir > onto the Python path. Sorry, this is not accurate. manage.py only adds the project's parent dir explicitly. Importing by app name works because generally you'd run manage.

GeoDjango problem -- server hangs on GEOSGeometry calls

2008-10-24 Thread Liam
Hi -- I could really use some help with this one! In my application I have a call to get_coords(). It works fine if I call the function containing it from 'manage.py shell'. It works fine if I call it from a short command line test program. However, if I access the application over http, the s

Re: Foreign Key Problem

2008-10-24 Thread cwurld
> > ALTER TABLE ENGINE=INNODB; > I changed all my tables to InnoDB. That seems to have solved the problem. Thanks for the suggestion. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Ordering M2M field?

2008-10-24 Thread [EMAIL PROTECTED]
OK, I have a model with a many to many relationship.. pretty straightforward pre-1.0 code: class SpecialEvent(models.Model): sponsors = models.ManyToManyField(Advertiser, related_name="event sponsors", null=True, blank=True) Problem is, the Powers That Be want those sponsors in a certain ord

Re: Problems with unicode characters in templates

2008-10-24 Thread Karen Tracey
On Fri, Oct 24, 2008 at 10:04 AM, MrMuffin <[EMAIL PROTECTED]> wrote: > > When I use norwegian characters in templates django spews out errors > about encoding. What encoding ( UTF-8, iso-8859-1 ) should I use and > where do I put it to avoid these errors? > UTF-8 is what is assumed by default, b

Problems with unicode characters in templates

2008-10-24 Thread MrMuffin
When I use norwegian characters in templates django spews out errors about encoding. What encoding ( UTF-8, iso-8859-1 ) should I use and where do I put it to avoid these errors? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Googl

Re: Adding a custom permission to the User model

2008-10-24 Thread Benedict Verheyen
Benedict Verheyen wrote: > Hi, > > I'm trying to specify a custom permission on the User model. > I would use it to delegate control to users over certain models. > > I have an admin.py file where i add this: > > from django.contrib.auth.models import User > ... > class UserAdmin(admin.ModelAdm

Re: ignore url

2008-10-24 Thread Karen Tracey
On Fri, Oct 24, 2008 at 6:56 AM, Niall Mccormack < [EMAIL PROTECTED]> wrote: > > Is it possible to tell Django to ignore certain url's so that it > resorts to showing what is on the server at that url. > > i.e. if I have a file at the url > http://www.mywebsite.com/myfiles/image.jpg > > Can I inst

Re: from mysite.polls.models import Poll, Choice

2008-10-24 Thread Carl Meyer
On Oct 23, 3:30 pm, "James Bennett" <[EMAIL PROTECTED]> wrote: > It's documented that way because it means we can have a tutorial that > doesn't immediately dump import-path configuration issues onto people > who are brand-new to Python; doing things the way the tutorial does > them, everything au

Re: variable tag / filter

2008-10-24 Thread Jeff FW
Write one base template, and have as many as you need extend from it, overriding whatever blocks you need. The "child" templates could be as simple as one or two lines. There's no harm in having more, smaller templates--in fact, it makes it more flexible and easier to change in the future. -Jef

Re: Django 1.0: XML documents in database, view as HTML, download as RTF

2008-10-24 Thread Horst Gutmann
You might get some ideas from Andrew West's and Zeth Green's Pixelise project which basically uses Django as a frontend application with a DB XML backend for document management: http://pixelise.org/ The transformation itself shouldn't be a big problem with some nice cronjobs + Python's zip-modu

Re: CSS link problem(how to call css)

2008-10-24 Thread srini
Thank you so much Low Kian for your help. now i got the answer here is the solution (r'^media/(?P.*)$', 'django.views.static.serve', {'document_root': 'media'}), Thank On Oct 24, 5:00 pm, "Dj Gilcrease" <[EMAIL PROTECTED]> wrote: > {% block stylesheet %}{{ MEDIA_URL }}/css/gaslog.css{% endblock

Re: css

2008-10-24 Thread srini
Thank you so much Low Kian for your help. now i got the answer here is the solution (r'^media/(?P.*)$', 'django.views.static.serve', {'document_root': 'media'}), Thanks On Oct 24, 12:23 pm, "Low Kian Seong" <[EMAIL PROTECTED]> wrote: > Read up on serving static files from django. The documentat

Re: where is the error ?? dictionary update sequence element #0 has length 1; 2 is required

2008-10-24 Thread Dj Gilcrease
url(r'^auction/(?P\d+)/bid_history/$', 'assignment3.auction.views.bid_history' , {}, name='bid_history'), try that Dj Gilcrease OpenRPG Developer ~~http://www.openrpg.com On Fri, Oct 24, 2008 at 5:38 AM, Net_Boy <[EMAIL PROTECTED]> wrote: > > I change it to : (r'^auction/(?P\d+)/bid_hist

Re: CSS link problem(how to call css)

2008-10-24 Thread Dj Gilcrease
{% block stylesheet %}{{ MEDIA_URL }}/css/gaslog.css{% endblock %} Should work Dj Gilcrease OpenRPG Developer ~~http://www.openrpg.com On Fri, Oct 24, 2008 at 1:10 AM, srini <[EMAIL PROTECTED]> wrote: > > Hi All, > i created one page template where i am trying to use my css and i am > callin

Re: where is the error ?? dictionary update sequence element #0 has length 1; 2 is required

2008-10-24 Thread Net_Boy
I change it to : (r'^auction/(?P\d+)/bid_history/$', 'assignment3.auction.views.bid_history' , 'bid_history'), but I get error msg: Caught an exception while rendering: Reverse for 'assignment3.bid_history' with arguments '(2,)' and keyword arguments '{}' not found. it should say 'assignmen

Re: where is the error ?? dictionary update sequence element #0 has length 1; 2 is required

2008-10-24 Thread Net_Boy
it is an honor to get a reply from you sir , I saw your presentation in DjangoCon 2008 and I loved it :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to dj

ignore url

2008-10-24 Thread Niall Mccormack
Is it possible to tell Django to ignore certain url's so that it resorts to showing what is on the server at that url. i.e. if I have a file at the url http://www.mywebsite.com/myfiles/image.jpg Can I instruct Django to ignore the /myfiles/ url so I can link directly to that file? Cheers Ni

Re: Custom include tag to parse locale into filename

2008-10-24 Thread Jarek Zgoda
Wiadomość napisana w dniu 2008-10-23, o godz. 22:26, przez Gerard Petersen: > I have an include tag to a file with context help information. My > app is fully i18n-ed, but I don't want to handle the bigger the > helptext via i18n because of its size. I want to end up with > something like

Wholesale sony ps3 ...ipod...wii....NOKIA Website: http://www.sonyecvv.com

2008-10-24 Thread 008
hi We are the most professional with the biggest wholesale electronics merchandise supply merchandise ..We have a lot of very nice quality merchandises with the very special price They are all brand new with full accessories and 1 year international warranty, unlocked, work effectively w

CSS link problem(how to call css)

2008-10-24 Thread srini
Hi All, i created one page template where i am trying to use my css and i am calling that css in this fashion {% block stylesheet %}/css/gaslog.css{% endblock %} but its not calling my css file. i think i attempted some silly thing or do not know exact way how to call my css. could any one sugg

Re: css

2008-10-24 Thread srini
i did the same way i.e but still its not calling the css.. On Oct 24, 12:10 pm, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > On Friday 24 October 2008 12:16:50 pm srini wrote: > > >Well, i do not know the right way to link css to my > > template in django, Please help me it's

Re: Different settings.py files for server and development

2008-10-24 Thread Ross Dakin
I do it like this: # settings.py [ ... ] try: from settings_dev import * except ImportError: pass # settings_dev.py import os DEBUG = True DATABASE_ENGINE = 'sqlite3' DATABASE_NAME = 'dev.db' MEDIA_ROOT = os.path.abspath('../') + '/public/media/' MEDIA_URL = 'http://127.0.0.1:8000/med

[solved] Custom include tag to parse locale into filename

2008-10-24 Thread Gerard Petersen
Should anybody need this, I customised the include tag (and copied it into templatetags). The code: from django.template.loader_tags import IncludeNode,ConstantIncludeNode def do_i18n_include(parser, token): bits = token.contents.split() if len(bits) != 2: raise TemplateSyntaxE

Re: Problem with contrib.comments and signals: instance is not defined

2008-10-24 Thread Eric Abrahamsen
On Oct 24, 2008, at 12:23 PM, Brandon Taylor wrote: > > Hi everyone, > > I'm using Django 1.0, and attempting to do some comment moderation > with Akismet. When I try to wire up a pre_save signal, I'm getting an > error saying 'instance' is not defined. Here is my code: You might also consider

Multiple selects for ForeignKey in admin

2008-10-24 Thread Nick Sandford
Just wondering how easy it would be to implement something like this: class Foo(models.Model): name = models.CharField(max_length=200) bar = models.ForeignKey(Bar) class Bar(models.Model): name = models.CharField(max_length=200) category = models.CharField(max_length=200) de

Re: admin DATE_FORMAT not working?

2008-10-24 Thread Low Kian Seong
Maybe this would shed some light: http://code.djangoproject.com/ticket/2203 On Fri, Oct 24, 2008 at 4:57 PM, Lars Stavholm <[EMAIL PROTECTED]> wrote: > > I've got... > > TIME_ZONE = 'Europe/Stockholm' > DATE_FORMAT = "Y-m-d" > TIME_FORMAT = "H:i" > DATETIME_FORMAT = DATE_FORMAT + " " + TIME_FORM

admin DATE_FORMAT not working?

2008-10-24 Thread Lars Stavholm
I've got... TIME_ZONE = 'Europe/Stockholm' DATE_FORMAT = "Y-m-d" TIME_FORMAT = "H:i" DATETIME_FORMAT = DATE_FORMAT + " " + TIME_FORMAT ...in my settings.py file, but no joy, these definitions are not used in the admin interface when running the development server. Instead I get the US format or

Re: Date Format in Admin

2008-10-24 Thread Matias Surdi
http://docs.djangoproject.com/en/dev/ref/settings/#date-format Botolph escribió: > I would like to change the formatting of dates in the admin from - > MM-DD to DD-MM-. I have set "DATE_FORMAT" in the settings file, > but that only changes list_display and not the DateField input. In a >

Re: css

2008-10-24 Thread Low Kian Seong
Read up on serving static files from django. The documentation is quite complete and you should be up and on your way in no time by just adapting examples from there. On Fri, Oct 24, 2008 at 2:46 PM, srini <[EMAIL PROTECTED]> wrote: > > Dear users, > >I am beginner in Djago, Well i ha

Re: where is the error ?? dictionary update sequence element #0 has length 1; 2 is required

2008-10-24 Thread Malcolm Tredinnick
On Thu, 2008-10-23 at 23:59 -0700, Net_Boy wrote: [...] > --- > views.py: > def bid_history(request, object_id):item = get_object_or_404(Item, > item_id=object_id) > bid_history = Bid.objects.filter(bid_item=item).order_by('- > bid_price') > return render_to_response("bid_list

Re: css

2008-10-24 Thread Kenneth Gonsalves
On Friday 24 October 2008 12:16:50 pm srini wrote: >   Well, i do not know the right way to link css to my > template in django, Please help me it's urgent without that i cannot > move ahead in my project. a template is just html - so attach the css just as you would in an ordinary html file. U

where is the error ?? dictionary update sequence element #0 has length 1; 2 is required

2008-10-24 Thread Net_Boy
I made a function for the bid_history and when I click on the Bid link in the item's details it gets the id of the item and got to the views.bidd_history it shows me an error : dictionary update sequence element #0 has length 1; 2 is required Why? --- views.py: def bid_history(req