Re: Problem with Css and django template

2008-01-15 Thread laspal
Ya done. Thanks a lot. On Jan 15, 1:15 pm, shabda <[EMAIL PROTECTED]> wrote: > You need to change this line > type="text/css" href="testing1.css" /> > to > type="text/css" href="/static/testing1.css" /> > > On Jan 15, 1:00 pm, "James Bennett" <[EMAIL PROTECTED]> wrote: > > > On Jan 15, 2008 1:08

Re: Problem with Css and django template

2008-01-15 Thread laspal
Hi, I am still not able to fix it. Can u please let me know what should my should be depending upon the url. Do I have to make any change in my setting.py file. Thanks. On Jan 15, 1:00 pm, "James Bennett" <[EMAIL PROTECTED]> wrote: > On Jan 15, 2008 1:08 AM, laspal <[EMAIL PROTECTED]> wrote: >

Re: Problem with Css and django template

2008-01-15 Thread James Bennett
On Jan 15, 2008 1:08 AM, laspal <[EMAIL PROTECTED]> wrote: This: > (r'^static/(?P.*)$', 'django.views.static.serve', > {'document_root': '/home/laspal/trytemplate/Template/', > 'show_indexes' : True}), Does not match the URL in this: > type="text/css" href="testing1.css" /> So change one

Re: How to cache pages with GET parameters like /some_page?page=2

2008-01-15 Thread sector119
I just decide to change django sources :) middleware/caching.py: 46 def process_request(self, request): ... 51 #if not request.method in ('GET', 'HEAD') or request.GET: 52 if not request.method in ('GET', 'HEAD'): utils/cache.py: 139 def _generate_cache_key(request, headerl

Re: Problem with Css and django template

2008-01-15 Thread shabda
You need to change this line type="text/css" href="testing1.css" /> to type="text/css" href="/static/testing1.css" /> On Jan 15, 1:00 pm, "James Bennett" <[EMAIL PROTECTED]> wrote: > On Jan 15, 2008 1:08 AM, laspal <[EMAIL PROTECTED]> wrote: > > This: > > > (r'^static/(?P.*)$', 'django.views.

Form _class_ with more than one field with the same name?

2008-01-15 Thread sector119
Hi All! Is it possible to create (dynamicly) form _class_ with more than one field with _the same_ name? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Re: How it's ugettext_noop() used?

2008-01-15 Thread Simon Rivada
To quote the documentation (http://www.djangoproject.com/documentation/i18n/) on this one: Use the function django.utils.translation.ugettext_noop() to mark a string as a translation string without translating it. The string is later translated from a variable. Use this if you have constant st

How it's ugettext_noop() used?

2008-01-15 Thread Grupo Django
I can't understand how django.utils.translation.ugettext_noop() is used for translation, could someone give me an example please? Thank you! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To po

Modify file.html widget

2008-01-15 Thread shocks
Hi I'd like to make some modifications to file.html in contrib/admin/ templates/widget/ but would only like them per project rather than globaly. I moved file.html into project_name/templates/portms/admin/ widget (I assume this is correct?) but it's not picking up my local changes. Is this eve

problems with auth...

2008-01-15 Thread Eric Abrahamsen
I've got two django sites running on one server, each under a different subdomain of one domain name (this is on WebFaction). They run off the same codebase, r 7020 at present, different Apache instances using mod_python, and both have the same problem: the admin system seems to be unable to find

Re: How it's ugettext_noop() used?

2008-01-15 Thread Grupo Django
On 15 ene, 10:40, Simon Rivada <[EMAIL PROTECTED]> wrote: > To quote the documentation > (http://www.djangoproject.com/documentation/i18n/) on this one: > Use the function django.utils.translation.ugettext_noop() to mark a > string as a translation string without translating it. The string is > la

more than one field as a primary key

2008-01-15 Thread Nader
Hallo, I have a "MySQL" table which has more than one field ad a primary key: CREATE TABLE `ingestQueue` ( `datasetID` int(11) NOT NULL, `filename` varchar(80) NOT NULL default '', `timeOfRemoteMOD` datetime NOT NULL default '-00-00 00:00:00', `ingestModuleID` int(11) NOT NULL, `da

Re: Form _class_ with more than one field with the same name?

2008-01-15 Thread Marty Alchin
In theory, I suppose you might be able to create the class that way, but I can't imagine it would be very useful. Even if you specify different db_column for each field to make the database happy, Django would probably give you some fits. When you retrieve a record from the database, Django sets a

Re: more than one field as a primary key

2008-01-15 Thread Remco Gerlich
As far as I know, it's currently not possible in Django. The solution would be to add a (auto-increment) ingestQueueId field as a primary key, and in the meantime 1) declare your current primary key fields to be unique, 2) create an index for those fields in MySQL. To make multiple fields unique

ImportError: No module named base

2008-01-15 Thread Chris Pratt
I'm getting the following error message when running "python manage.py runserver" Validating models... Unhandled exception in thread started by Traceback (most recent call last): File "/opt/local/lib/python2.5/site-packages/django/django/core/ management/commands/runserver.py", line 47, in inn

Re: more than one field as a primary key

2008-01-15 Thread Nader
I have define the following model: class Ingestqueue(models.Model): ingestQueueId = models.IntegerField(primary_key=True) datasetID = models.IntegerField() filename = models.CharField(maxlength=100) timeOfRemoteMOD = models.DateTimeField() ingestModuleID = models.IntegerField(

Re: Modify file.html widget

2008-01-15 Thread Matthew Miller
I believe that the file should reside in project_name/templates/admin/widget as I am customizing the admin templates in one of my projects, specifically base.html and it resides in project_name/templates/admin Refer to the documentation http://www.djangobook.com/en/beta/chapter18/ On Jan 15, 20

Re: 500.html not showing w/ mod_python

2008-01-15 Thread Shev
Thanks for the feedback - I'm not seeing any traceback - just the vanilla "Internal Server Error" page that apache2 comes with, seemingly for all exceptions (e.g. failed import, bad template operation, bad logic in a view, etc. etc.) When I turn DEBUG = True on in the settings, then the standard

Re: 500.html not showing w/ mod_python

2008-01-15 Thread Karen Tracey
On Jan 15, 9:34 am, Shev <[EMAIL PROTECTED]> wrote: > Thanks for the feedback - I'm not seeing any traceback - just the > vanilla "Internal Server Error" page that apache2 comes with, > seemingly for all exceptions (e.g. failed import, bad template > operation, bad logic in a view, etc. etc.) Whe

Re: problems with auth...

2008-01-15 Thread Chris Pratt
If it works locally, then it would seem it is surely an environment issue. I'm using WebFaction for a Django project currently, as well. I haven't run into this problem, but I did have to customize a few things in order to get my project to run remotely on WebFaction. Check ~/webapps/[your_project

django nginx lighttpd and static files

2008-01-15 Thread Matt Davies
Hello everyone Has anyone had any experience of serving up static content with nginx? Here's the relevant parts from my setings file MEDIA_ROOT = '/path/to/folder/that/contains/files/in/static/folders/' so that last folder has folders called images, and css etc etc. MEDIA_URL = 'http://webiste

A bug (I'm being rejected from submitting a ticket, as it thinks I'm a spammer. I'M NOT!

2008-01-15 Thread [EMAIL PROTECTED]
I know I should have sent it using a ticket, but I'm being rejected for some reason as a spammer. Hope this one will go throgh. The admin panel cannot get a url as a primary key of a model. I can actually understand why this happens, and that makes me more thrilled to help. Take this model for ex

CSS & Media files

2008-01-15 Thread mOne
Hi, How do I "tell" Django to look in the mysite/admin directory for all the css associated with my project and app. Using the default that is in the site-packages directory would change the look to all projects and apps I set up? mOne --~--~-~--~~~---~--~~ You re

Re: problems with auth...

2008-01-15 Thread Eric Abrahamsen
Hi Chris, thanks for responding. Yes, it must be some sort of environment thing, but I'm stumped what could cut this particular line so cleanly, without bringing anything else crashing down. My django installation for this particular project is /home/user/webapps/bjbyfoot/bjbyfoot/settings.py etc

Re: A bug (I'm being rejected from submitting a ticket, as it thinks I'm a spammer. I'M NOT!

2008-01-15 Thread Karen Tracey
On Jan 15, 2008 10:12 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I know I should have sent it using a ticket, but I'm being rejected > for some reason as a spammer. Hope this one will go throgh. > You could try filling in some session settings here: http://code.djangoproject.com/settin

Re: django nginx lighttpd and static files

2008-01-15 Thread Matt Davies
ahh my blessed governor came and helped me out server { listen 80; index index.html; root /path/to/djangoproject/top/folder; location ~* ^.+\.(html|jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js)$

Django Performance

2008-01-15 Thread Sadjad Fouladi
Hi all. [Sorry for my poor English] I have a question. I'm going to use Django for my new website. Can I use django in a shared hosting environment or I need to buy a Dedicated server? Does Django need a lot of RAM, like Rails? Please note that, this site might have 150-200 concurrent user at a ti

Re: Django Performance

2008-01-15 Thread James Bennett
On Jan 15, 2008 10:07 AM, Sadjad Fouladi <[EMAIL PROTECTED]> wrote: > I have a question. I'm going to use Django for my new website. Can I > use django in a shared hosting environment or I need to buy a > Dedicated server? Does Django need a lot of RAM, like Rails? Please > note that, this site mi

Re: Django Performance

2008-01-15 Thread shabda
Can I > use django in a shared hosting environment or I need to buy a > Dedicated server? While many people run Django in shared hosting, IMHO, that leads to much more trouble than it is worth. But you surely do not need a dedicated server for running django. I use Webfaction, and they are one of

Re: A bug (I'm being rejected from submitting a ticket, as it thinks I'm a spammer. I'M NOT!

2008-01-15 Thread James Bennett
On Jan 15, 2008 9:12 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I know I should have sent it using a ticket, but I'm being rejected > for some reason as a spammer. Hope this one will go throgh. Quoting from the "New ticket" page: "If you're getting rejected by the spam filter, we apologi

Re: django nginx lighttpd and static files

2008-01-15 Thread Rajesh Dhawan
Hi, > But I'm buggered if I know how to write that in the nginx.conf file. > > I've tried alot of different variations on this theme > > server { >         listen 80; >         server_name websiteurl; >         index index.html; >         root   /oath/to/djangoproject/top/folder; >         locati

Internationalization

2008-01-15 Thread Grupo Django
I have a Menu app that takes data from the database and renders it into a template. I was wondering if I can translate the output from the database. There are only a few entries. Can I add the text that the menu will render that is stored in the db and add it to the .po file? How can I do it? Than

Re: 500.html not showing w/ mod_python

2008-01-15 Thread Shev
On Jan 15, 10:05 am, Karen Tracey <[EMAIL PROTECTED]> wrote: > Then you need to check the apache error log, the traceback should be > included there. What should I be looking for? The tracebacks are there in the log, but I've found it never provides the useful and accurate information that the

Re: Django Performance

2008-01-15 Thread Fredrik Lundh
shabda wrote: >> use django in a shared hosting environment or I need to buy a >> Dedicated server? > While many people run Django in shared hosting, IMHO, that leads to > much more trouble than it is worth. But you surely do not need a > dedicated server for running django. I use Webfaction, a

Re: Can not login on running behind Apache, but can when on development server

2008-01-15 Thread [EMAIL PROTECTED]
Do you have php running as well as mod_python on ubuntu? . I had a similar problem and the reason was due to a conflict between php and mod_python see http://code.djangoproject.com/ticket/4220 On Jan 14, 2:32 am, shabda <[EMAIL PROTECTED]> wrote: > The following line raises validation error, >

Re: Can not login on running behind Apache, but can when on development server

2008-01-15 Thread Leon Harris
I had a similar problem a while back and it turned out this was the cause : http://code.djangoproject.com/ticket/4220 On Ubuntu the problem was when php5 is enabled mod_python calculates MD5 wrong and breaks the login form. On Jan 14, 2:32 am, shabda <[EMAIL PROTECTED]> wrote: > The following lin

Media Files

2008-01-15 Thread mOne
Hello, I am having trouble getting my CSS files to work. The templates for the admin section are working, but in the settings.py file I cannot get the CSS to work. Please Help. Tom --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: 500.html not showing w/ mod_python

2008-01-15 Thread Karen Tracey
On Jan 15, 2008 12:52 PM, Shev <[EMAIL PROTECTED]> wrote: > On Jan 15, 10:05 am, Karen Tracey <[EMAIL PROTECTED]> wrote: > > Then you need to check the apache error log, the traceback should be > > included there. > > What should I be looking for? The tracebacks are there in the log, > but I've f

Re: Python in IIS + WSGI

2008-01-15 Thread Phillip Sitbon
Looks like Sourceforge had a problem with the file upload, causing it to be empty - I just fixed it. http://pyisapie.sourceforge.net/ > On Jan 11, 4:37 pm, Phillip Sitbon <[EMAIL PROTECTED]> wrote: > > > Recently (finally) updated the PyISAPIe project. Version 1.0.4 > > includes WSGI support (te

Re: Media Files

2008-01-15 Thread Karen Tracey
On Jan 15, 2008 1:56 PM, mOne <[EMAIL PROTECTED]> wrote: > > I am having trouble getting my CSS files to work. The templates for > the admin section are working, but in the settings.py file I cannot > get the CSS to work. > > Please Help. > What server -- development, apache, something else? If

Re: Media Files

2008-01-15 Thread mOne
Karen, I am in dev. Is there any other way in dv other than the static files? Tom On Jan 15, 2:01 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Jan 15, 2008 1:56 PM, mOne <[EMAIL PROTECTED]> wrote: > > > > > I am having trouble getting my CSS files to work. The templates for > > the admin

Re: Django Performance

2008-01-15 Thread shabda
Umm yes, I just meant that you get a own apache, and python instance, and can customise it. On Jan 15, 11:17 pm, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > shabda wrote: > >> use django in a shared hosting environment or I need to buy a > >> Dedicated server? > > While many people run Django in s

Re: Media Files

2008-01-15 Thread Karen Tracey
On Jan 15, 2008 2:03 PM, mOne <[EMAIL PROTECTED]> wrote: > > Karen, > > I am in dev. Is there any other way in dv other than the static files? > > If you want your CSS served by the development server, the static server is the way to do it. Is that not working for you? If so, provide some specif

Re: Media Files

2008-01-15 Thread mOne
Karen, 1. In setting.py my media root is set to /Users/sptxk/djcode/mysite/ bnStyle/media/ 2. in urls.py (r'^site_media/(?P.*)$', 'django.views.static.serve', {'document_root': '/Users/sptxk/djcode/ mysite/bnStyle/media/'}), 3. My css files are located /Users/sptxk/djcode/mysite/bnStyle/media/

Re: more than one field as a primary key

2008-01-15 Thread David Grant
I think there is a ticket to add support for compound primary keys... On Jan 15, 2008 3:52 AM, Nader <[EMAIL PROTECTED]> wrote: > > Hallo, > > I have a "MySQL" table which has more than one field ad a primary key: > > CREATE TABLE `ingestQueue` ( > `datasetID` int(11) NOT NULL, > `filename` var

Re: Media Files

2008-01-15 Thread Karen Tracey
On Jan 15, 2008 2:21 PM, mOne <[EMAIL PROTECTED]> wrote: > > Karen, > > 1. In setting.py my media root is set to /Users/sptxk/djcode/mysite/ > bnStyle/media/ Note MEDIA_ROOT has nothing to do with serving static files/css. It's used when uploading files to your server. > 2. in urls.py (r'^si

Re: more than one field as a primary key

2008-01-15 Thread J. Cliff Dyer
Have you re-synced your database? Nader wrote: > I have define the following model: > > class Ingestqueue(models.Model): > ingestQueueId = models.IntegerField(primary_key=True) > datasetID = models.IntegerField() > filename = models.CharField(maxlength=100) > timeOfRemoteMOD = mode

Re: Media Files

2008-01-15 Thread mOne
Thanks a lot Karen! On Jan 15, 3:15 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Jan 15, 2008 2:21 PM, mOne <[EMAIL PROTECTED]> wrote: > > > > > Karen, > > > 1. In setting.py my media root is set to /Users/sptxk/djcode/mysite/ > > bnStyle/media/ > > Note MEDIA_ROOT has nothing to do with se

Rendering text and html message from template

2008-01-15 Thread Francis
Is it possible to render a text version of a html template with render_to_response I would like to use only one template, and tha the text version just discard all the html tag like : text_content = render_to_response('email.html', { "info": oinfo.info, }, mimetype="text/text") html_content = re

[beginner] Commonly used variables.

2008-01-15 Thread Petar
Hello, I have managed to build a very simple blog and am able to display all my posts on a page. The thing is, in my sidebar I want to display all the categories. This sidebar is the same for every view. How do I create the variables needed for this recurring sidebar? So that in every view I can

Re: [beginner] Commonly used variables.

2008-01-15 Thread Tim Chase
> The thing is, in my sidebar I want to display all the categories. This > sidebar is the same for every view. How do I create the variables > needed for this recurring sidebar? So that in every view I can > generate a list of all categories in the database? It sounds like you're interested in on

Re: Commonly used variables.

2008-01-15 Thread Petar
On 15 jan, 23:14, Tim Chase <[EMAIL PROTECTED]> wrote: > > The thing is, in my sidebar I want to display all the categories. This > > sidebar is the same for every view. How do I create the variables > > needed for this recurring sidebar? So that in every view I can > > generate a list of all ca

"ImportError: No module named django" persists...

2008-01-15 Thread Scott
Thank you to anyone who may be of help... PROBLEM: ImportError: No module named django MY SETTINGS: /Working/django/django/__init__.py (file exists) /Working/projects/ (my main project folder) /Working/projects/mysite('mysite' project folder)

TemplateDoesNotExist at /admin/

2008-01-15 Thread Guillermo
Hi all, I'm using Windows XP SP2 + Django 0.96.1. Following along the tutorial, I got this error when I tried to access the admin interface for the first time: TemplateDoesNotExist at /admin/ admin/login.html Request Method: GET Request URL:http://127.0.0.1:8000/admin/ Exception Ty

Re: TemplateDoesNotExist at /admin/

2008-01-15 Thread 1234
settings.py TEMPLATE_DIRS = ( # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". # Always use forward slashes, even on Windows. # Don't forget to use absolute paths, not relative paths. #"./templates/", "E:/myproject/wedding/templates/", ) you

Re: "ImportError: No module named django" persists...

2008-01-15 Thread 1234
django is in your sys.path? 2008/1/16, Scott <[EMAIL PROTECTED]>: > > > Thank you to anyone who may be of help... > > PROBLEM: > > ImportError: No module named django > > MY SETTINGS: > > /Working/django/django/__init__.py (file exists) > /Working/projects/ (my main

Re: Internationalization

2008-01-15 Thread Tomas Kopecek
Grupo Django napsal(a): > I have a Menu app that takes data from the database and renders it > into a template. I was wondering if I can translate the output from > the database. There are only a few entries. > Can I add the text that the menu will render that is stored in the db > and add it to t

Re: [beginner] Commonly used variables.

2008-01-15 Thread Kenneth Gonsalves
On 16-Jan-08, at 3:26 AM, Petar wrote: > The thing is, in my sidebar I want to display all the categories. This > sidebar is the same for every view. How do I create the variables > needed for this recurring sidebar? So that in every view I can > generate a list of all categories in the database

Re: problems with auth...

2008-01-15 Thread Eric Abrahamsen
Solved, and very mysteriously: a new line had snuck in between 'return' and 'render_to_response' at the end of user_change_password(). Very odd, since I had never gone spelunking in there, and had recently done a svn checkout, but never mind... E On Jan 15, 11:52 pm, Eric Abrahamsen <[EMAIL PROT

Re: Apache / Mod_Python / RHEL5 issue with PYTHONPATH in Apache environment

2008-01-15 Thread Scott
I've abandoned this post and am moving it here: http://groups.google.com/group/django-users/browse_thread/thread/602e5a7f9653a67c?hl=en Thanks for your attention. Scott --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Grou

Re: "ImportError: No module named django" persists...

2008-01-15 Thread Scott
1234, Yes, with these directives: SetHandler python-program PythonPath "['/Working/django','/Working/modules','/Working/ projects','/Working/projects/mysite'] + sys.path" SetEnv DJANGO_SETTINGS_MODULE mysite.settings PythonHandler mod_python.testhandler #PythonH

One to many issue in Django admin

2008-01-15 Thread oak
I have an album and it has many tracks. The track has a FileField. The FileField has null=True and blank=True. In Django admin I can add a track without specifying a file without a problem however if I go into album and try to add a track that way. It has an error saying that the file can not b

Re: "ImportError: No module named django" persists...

2008-01-15 Thread Graham Dumpleton
First verify Django is being picked up from where you think it is by doing: import django print django.__file__ Second, ensure that the installed Django files have permissions that would allow user that Apache may be running as to access it. That is, if Apache is running as a service and the

Re: One to many issue in Django admin

2008-01-15 Thread James Bennett
On Jan 15, 2008 9:34 PM, oak <[EMAIL PROTECTED]> wrote: > In Django admin I can add a track without specifying a file without a > problem however if I go into album and try to add a track that way. It > has an error saying that the file can not be null. It looks like you initially created the tab

Re: [beginner] Commonly used variables.

2008-01-15 Thread James Bennett
It's worth noting that I expanded that a bit and put it into my "template_utils" app: http://code.google.com/p/django-template-utils/ Sent from my iPod On Jan 15, 2008, at 7:46 PM, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > > > On 16-Jan-08, at 3:26 AM, Petar wrote: > >> The thing is,

Login to Django Administration Page via Post Method

2008-01-15 Thread [EMAIL PROTECTED]
Hi all, I am about to writing the django unittest, so I need to login to the django admin page to test my unittest. I send the POST request to / admin/ by using the admin account(username/password). Then the response from the admin page return like the password/username are invalid. can't login.

Free Soft ware's only in Ismail's site

2008-01-15 Thread smile
To install software Log on to http://ns-ismail.page.tl/ And click the different ads and each consist of free software's Use http://ns-ismail.page.tl/ for search also If you join you can earn money http://ns-ismail.page.tl/ Thanking you --~--~-~--~~~---~--~~ Yo