Re: Search Field on All Pages

2010-08-08 Thread André Santos
What about creating a template_tag for the form? Is that a good way to add
it to several templates?

2010/8/8 Roald de Vries <downa...@gmail.com>

> On Aug 8, 2010, at 2:04 PM, Tim Sawyer wrote:
>
>> What I do is to setup a search that works at /search/q=search_term, and
>> then create a form on each page that submits to /search.
>>
>>  > type="submit" value="Search">
>>
>> This form is in my top level site template.  The /search/ url is part of a
>> search application.
>>
>> There's an example of this working at http://www.brassbandresults.co.uk/
>>
>> Hope that helps,
>>
>> Tim.
>>
>> On 08/08/10 10:41, wchildsuk wrote:
>>
>>> Hi,
>>>
>>> I want a search field on all my pages and was wondering the best way
>>> to do this. I could create a function and import it to every view but
>>> this doesn't seem to follow the django DRY principles.
>>>
>>
> Personally, I like all of my forms to be classes. If you want that, you
> should create a context processor.
>
>
> http://docs.djangoproject.com/en/dev/ref/templates/api/#writing-your-own-context-processors
>
> Cheers, Roald
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
André Santos Teixeira de Carvalho
Undergraduating in Computer Science DCC/UFRJ

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Generic View for create , update and delete !

2009-03-28 Thread André Santos

Try this one:
http://www.b-list.org/weblog/2006/nov/16/django-tips-get-most-out-generic-views/

2009/3/28 Hamza <dr.hamzam...@gmail.com>:
>
> Hello ,
>
> am trying to use Generic view instead of using the old view way ,
> however am a django newbie , i tried several tutorials , documentation
> and non seems works with me yet . can anyone point me an example
> ( full working good example )  of using generic view 
>
> Regards
>
> >
>



-- 
André Santos Teixeira de Carvalho
Graduando em Ciência da Computação - DCC/UFRJ

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



Re: [Newbie] Problem with startproject

2009-03-21 Thread André Santos

Try this:
python -c "import django"
If it returns one error, than django wasnt installed correctly.

2009/3/21 Alnain <carles.lla...@gmail.com>:
>
> Hi!
>
> I'm new in Django, and I have a little problem with the starting. I
> tried to create a new project, using django-admin.py startproject
> mysite, but it raises an error: "ImportError: no module named
> django.core". I know that it means that there isn't a required file,
> but I don't konw why it isn't. Do I have installed Django incorrectly?
>
> Thanks
>
> PD: I'm spanish, sorry my poor english ^^u
>
> >
>



-- 
André Santos
Graduando em Ciência da Computação - UFRJ

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