Re: Query Set to search for a combination of model fields?

2012-03-16 Thread Guillaume Chorn
Shawn, man thanks! I actually had no idea about the pipe vs. ampersand distinction. I went ahead and changed my code to the following: def search(request): query = request.GET.get('q','') querywords = query.split(' ') lname='' for word in querywords[1:-1]: lname += word+'

Re: How to change widgets for admin site?

2012-04-16 Thread Guillaume Chorn
Hi Marc, Thanks for your reply. Are you referring to the "max_length" element of my "text" CharField? If so, I don't think this is the issue; I've set the max length to 10,000 characters which is quite long. Also this setting does not change the size of the text input area relative to my other

Re: How to change widgets for admin site?

2012-04-16 Thread Guillaume Chorn
Shoot! I was thinking that might be the case originally, but I must have overlooked TextField in the model field docs. Thanks!!! I'm still curious though--how can I find out what all of the CSS classes are that are defined by the default admin style sheet (I guess I'm asking where this style sh

Re: Can't access database with normal Ubuntu Terminal user

2012-04-16 Thread Guillaume Chorn
Something more specific in case it helps: as an example, when I try to access my admin view while logged in as my regular user ("guillaume") instead of "postgres", I get the following error: OperationalError at /admin/ FATAL: Peer authentication failed for user "postgres" Request Method: GET

Re: Can't access database with normal Ubuntu Terminal user

2012-04-17 Thread Guillaume Chorn
ed instructions. On Tue, Apr 17, 2012 at 3:03 PM, kenneth gonsalves wrote: > On Tue, 2012-04-17 at 14:50 +0800, Guillaume Chorn wrote: > > FATAL: Peer authentication failed for user "postgres" > > suitably edit pg_hba.conf > -- > regards > Kenneth Gonsalves &

Re: How-to for static files?

2011-11-22 Thread Guillaume Chorn
Hm, this might be something. I never thought of viewing the source for my HTML page. Actually, what I get when I do that is the following: And then when I click on the "stylesheet.css" hyperlink, I get what looks like another source page, but this one is some kind of error page (just to clarif

Re: How-to for static files?

2011-11-22 Thread Guillaume Chorn
Thank you Ivo. Your suggestion makes a lot of sense so I tried it out. Unfortunately, after adding TEMPLATE_CONTEXT_PROCESSORS and its associated tuple into the settings.py file, I tried to restart the development server to see if it worked and it didn't. I checked the page source again and it's

Re: How-to for static files?

2011-11-22 Thread Guillaume Chorn
gt; something wrong. > > just paste these files into somthing like dpaste.com > > - settings.py > - myapp.views.homepage > - urls.py > > cheers > > > On Nov 23, 2011, at 0:29 , Guillaume Chorn wrote: > > Thank you Ivo. Your suggestion makes a lot of sense so

Re: How-to for static files?

2011-11-23 Thread Guillaume Chorn
you can also hardcode the STATIC_URL in the template to see if the > path: src=“/static/stylesheet.css” works. > > or simply open http://127.0.0.1:8000/static/stylesheet.css in your > browser. > > Again: Where is that CSS file on your disk? > > On Nov 23, 2011, at 2:46

Re: How-to for static files?

2011-11-23 Thread Guillaume Chorn
variables in it. > > use the render shortcut [1] instead of render_to_reponse > > BTW: It seems you are using the development version. You should change to > 1.3.1 > > Does this help? > > [1] https://docs.djangoproject.com/en/1.3/topics/http/shortcuts/#render > &g

Re: How-to for static files?

2011-11-23 Thread Guillaume Chorn
hon2.7/site-packages'] > > Did something happen to my context.py file? Here it is: > > http://dpaste.com/660778/ > > Also, as you can see from the error message above, I am currently using > Django 1.3.1. > > thanks, > Guillaume > > > > On Wed, Nov 23

Re: How-to for static files?

2011-11-23 Thread Guillaume Chorn
ango.core.context_processors.tz”, >> >> or just put: >> >> ("django.contrib.auth.context_processors.auth","django.core.context_processors.debug","django.core.context_processors.i18n","django.core.context_processors.media","django.c

Re: How-to for static files?

2011-11-23 Thread Guillaume Chorn
Oops, I guess maybe you meant since I've changed the views.py file since I last included it? Here is the newest version: http://dpaste.com/660808/ thanks, Guillaume On Wed, Nov 23, 2011 at 9:36 PM, Guillaume Chorn wrote: > Sorry, I thought I included my views.py earlier, but he

Re: How-to for static files?

2011-11-23 Thread Guillaume Chorn
; or put it to text/html which is the default. > > Your browser thinks it is a CSS file instead of HTML. > > cheers > Ivo > > > On Nov 23, 2011, at 14:40 , Guillaume Chorn wrote: > > Oops, I guess maybe you meant since I've changed the views.py file since I > las

Re: Django can't see my static files

2011-08-02 Thread Guillaume Chorn
Thomas and Lokesh, Thanks very much for your help. I've modified the link in my HTML file to be: where "stylesheet" is the name of the CSS file, and this file is located inside the directory listed under STATIC_DIRS in my settings.py file. As mentioned in my prior email, I also already have S

Re: Django can't see my static files

2011-08-02 Thread Guillaume Chorn
.1/static/ > Le 2 août 2011 12:01, "Thomas Orozco" a > écrit : > > > A little detail, but you never know: you should put some ' ' in your > link. > > Like this : > > > > > > > > > > If there are spaces in your path, this could

Re: Django can't see my static files

2011-08-04 Thread Guillaume Chorn
an include that info in each HTML file--but I need to be able to use some basic javascript for my site and right now, because of this issue, I can't even do that. Is there anyone who could help me troubleshoot this? Anyone?? thanks, Guillaume On Wed, Aug 3, 2011 at 12:20 PM, Guillaume Chorn wr