Query problem

2007-11-02 Thread Goutham D L
Hi,
Iam having a problem in querying.

i have a string called search_by which stores the name of one of my models.
I want to call search_by.objects.all()
But it is giving an error since search_by is a string and cannot be directly
concatenated.
Can someone help me get the query right?

Goutham

--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: CSS problem

2007-11-01 Thread Goutham D L
Solved:)

Really stupid mistake. I was using backslashes when i should have been using
forward slashes.(Iam on windows btw).
Thanks a lot for ur help.

Goutham

On 11/1/07, dunia <[EMAIL PROTECTED]> wrote:
>
>
> Goutham DL wrote:
> > Can some one please help me out here?
> >
> > On Nov 1, 7:03 pm, Goutham DL <[EMAIL PROTECTED]> wrote:
> >
> >> hi,
> >> Its still not working. Iam actually using django 0.96.The code that
> >> antoni gave is giving errors.
> >> Can someone please explain why i need to configure media_urls ?
> >> (media_root has been configured to the appropriate directory). I just
> >> want to link the css file with the html one.how will using
> >> django.views.static.serve help??
> >>
> >> On Nov 1, 3:26 pm, Gonzalo Delgado <[EMAIL PROTECTED]>
> >> wrote:
> >>
> >>
> >>> El Thu, 01 Nov 2007 10:13:13 -
> >>> Goutham DL <[EMAIL PROTECTED]> escribió:
> >>>
>  Hi,
> 
>  Iam new to django. Iam having problems loading css files (and images)
>  using the development server. Is it possible to load css files in the
>  development server or should i use mod_python?
>  (since iam a newbie to mod_python also i prefer using the development
>  server for sometime)
> 
>  Goutham
> 
> >>> http://www.djangoproject.com/documentation/0.96/static_files/
> >>>
> >>> --
> >>> Gonzalo Delgado <[EMAIL PROTECTED]>
> >>>
> >>>  application_pgp-signature_part
> >>> 1KDownload
> >>>
> >
> >
> > >
> >
> >
> in the file urls.py, put this:
>
> from django.conf import settings
> ...
> if settings.DEBUG:
> urlpatterns += patterns('', (r'^media/(?P.*)$',
> 'django.views.static.serve', {'document_root': '',
> 'show_indexes': True}),
> )
> now in your browser you can go to http://localhost:8000/media, and
> you'll see all the files that are under the path you specified above.
>
> in your templates, you can use it like this for ex.:
> 
> 
>
> i hope it helps, this works fine for me.
>
> ps: forgive me for my bad english ;)
>
> >
>

--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: CSS problem

2007-11-01 Thread Goutham D L
hi
Actually i did exactly what u have done in the trunk version. Let me be more
explicit.

I have a login.html file in which i have a link to login.css.
login.html is in templates directory
login.css is in media/css directory
both media and templates are in my project directory
now i configured media_root to point to media
now if i type 127.0.0.1/media/css/login.css, i can see the css file.(the url
has been configured)
But the effects of the css file can't be seen on the login(html) page.
the linking inside the html file to the css file is proper.
Am i missing something simple here?

Goutham

On 11/1/07, Antoni Aloy <[EMAIL PROTECTED]> wrote:
>
>
> 2007/11/1, Goutham DL <[EMAIL PROTECTED]>:
> >
> > hi,
> > Its still not working. Iam actually using django 0.96.The code that
> > antoni gave is giving errors.
> The code is prepared for the trunk version of Django, but if you take
> a look at the settings file and the url.py file you'll see how it
> deals with the media.
>
> On the other hand, it just uses the ideas of
> http://www.djangoproject.com/documentation/0.96/static_files/ but
> splitting the configuration  .
> The trunk version is rock solid and has lot of improvements.
>
> --
> Antoni Aloy López
> Binissalem - Mallorca
> http://www.trespams.com
> Soci de Bulma - http://www.bulma.cat
>
> >
>

--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---