guys,
by reading simon's AbstractSearching:
https://simon.bofh.ms/cgi-bin/trac-django-projects.cgi/wiki/AbstractSearching
I got my searching for stories work by:
1. settings.py - add:
SEARCH_DEFINITIONS = {
"foo.apps.bar.search",
}
INSTALL_APPS = {
[snip]
'stuff.search'
}
2. url
btw, I tracked down to the stuff/search/views/generic.py, seem that the
kwarg module_list hasn't been passed to the search() funtion from the
utils.py, so I have to set the SEARCH_DEFINITION in the settings.py to
get the searching work properly.
It won't work if I set the search_info_dict like th
Hey,
I'm having a lot of problems with Django not printing error messages
when errors happen. For example:
1. if the error 500 template is missing - django just prints 'template
missing', and doesn't print the actual error that caused the problem.
2. if i do make an error 500 template i don't k
>I think you should have $PROJECTPATH/locale and not
>$PROJECTPATH/conf/locale as in the Django source tree.
Exactly. Only the Django source tree uses conf/locale/, projects and
apps use just locale/. With the wrong paths make-messages.py was
thinking about running in the Django source tree, that
>I'm having a lot of problems with Django not printing error messages
>when errors happen. For example:
Just activate DEBUG=True in your settings file and possible
TEMPLATE_DEBUG=True if you have templating errors and you should see
what the exception is and where it is :-)
bye, Georg
Did I mention that it's the *PRODUCTION* environment? And I can't just
'activate DEBUG', I want the error to be logged whenever it happens
and.
Besides, once DEBUG=False i want to know what's going on on my servers
too and not have to turn debug on and reproduce the error which is
ridiculous.
p
>Now I would like to add one more function by using AbstractSearching: I
>would like to search for users by username, first_name, last_name or
>email. how could I achive that?
You would have to add lookup or filter functions to your search
definition. There are two kind of additional queries that
>Have you looked at django.core.validators? There's one in there called
>RequiredIfOtherFieldNotGiven that might do what you want. You'd want
>to make both fields blank=True and add that validator to
>validator_list
Keep in mind that cross-field-validators only work on the main record,
not on pos
>Did I mention that it's the *PRODUCTION* environment? And I can't just
>'activate DEBUG', I want the error to be logged whenever it happens
>and.
With production environments, Django explicitely tries to _not_ send
out informations to the users, as those might contain important stuff
you don't
Hi,
Here are two questions:
1.Which Django webhosting provider would you recommend and why?
2. What should I be aware of when choosing aDjango webhosting?
I know there are webhosting providers that boast how good they are but
after you sign up with them the things are different.For example when
Yep. And now it works perfectly. Reading the documentation again and
again I see it is actually in the documentation! You have to very
carefully read the documentation.
What confused me was the following part in the documentation. It is the
paragraph called "How to create language files". It cont
I'm not saying I wnat to send information to users, I'm saying I want
it logged (at least to stdout is it *that* hard?). And I'm not keen on
putting down my email server when I publish some broken code and get
1 error emails. Email isn't a means of error reporting - logs are.
And digging th
>I'm not saying I wnat to send information to users, I'm saying I want
>it logged (at least to stdout is it *that* hard?). And I'm not keen on
>putting down my email server when I publish some broken code and get
>1 error emails. Email isn't a means of error reporting - logs are.
The only m
On 1/7/06, PythonistL <[EMAIL PROTECTED]> wrote:
>
> As I can see by "premium quality hosting solutions" everyone can mean
> something different :-(
When web-host shopping (or any other sort of shopping, for that
matter), always go by explicitly stated offerings, e.g., "your own
Apache instance w
On Saturday 07 Jan 2006 6:31 pm, Tom Tobin wrote:
> When web-host shopping (or any other sort of shopping, for that
> matter), always go by explicitly stated offerings, e.g., "your
> own Apache instance with mod_python" or "lighttpd and fastcgi
> supported",
very simple - go for root access. you
BiG Thanks to hugo!
"To have a unified search" - that make things clear now :)
I got my site's searching against a single model work with writing
lookup_kind function like yours! Now I can search for stories with
query_string = 'kind:storys foo bar' and search for users with
query_string = 'kind
Not really django specific, I was having problems with it in
java+hibernate implementation too...
I have a model, 'Items', which is generic enough to extend to more
specialized items, like a 'book items' model for example. This
relationship has been modelled as a one-to-one, but when listing the
Yet another problem :)
Could I paginate the search result?
On Jan 7, 2006, at 12:46 AM, Kenneth Gonsalves wrote:
i have an installation of django on a server. The domain names given
are or the form:
http://myname.foo.com
my django will live at http://myname.foo.com/mysite/
if i put this:
then wouldnt requests to say http://yourname.foo.com/mysite/ al
Thanks for all your efforts on this Jacob, it was really helpful. I
came away thinking that the main thing Rails has over Django is AJAX
integration built-in at a (seemingly) fundamental level, but as that's
being addressed ... :)
"We've got Welsh" ;)
>How could I have different templates for the search form/results?
In my case it's part of the model itself - I have a template tag
"embed" that just does the right thing for each class that might be
searched. In your case you could just have different search result
templates and have two views t
Hello!
I'm a bit confused about where to put css and images to the
application in order to use them in Django. I have read
http://www.djangoproject.com/documentation/static_files/ and I'm
trying to use the "if DEBUG trick" but it does not work for me.
What I like to do is to use some css for the
Hi Adrian:
When placed together, I do get asked for Authentication from browser.
When good credentials are provided, I do get through but then an error
is displayed.
I would like to determine wether or not I am doing something wrong.
Otherwise, can log this intro Trac as a feature request?
-- B
For my development server I only have one more line in urls.py
(r'^Media/(?P.*)', 'django.views.static.serve', {'document_root'
: 'C:/Django/TEMPLATES/Static/', 'show_indexes':True}),
where 'C:/Django/TEMPLATES/Static/' is my dir on my XP
.
For the production server (Apache with mod_Python) I h
On 1/7/06, Brian Ray <[EMAIL PROTECTED]> wrote:
"/usr/local/lib/python2.4/site-packages/django/contrib/auth/handlers/modpython.py",
> line 20, in authenhandler
> staff_only = _str_to_bool(options.get('DjangoRequireStaffStatus',
> "on"))
>
> TypeError: 'tuple' object is not callable
Ooooh, tha
Hello!
Thank you for your answer!
2006/1/7, PythonistL :
>
> For my development server I only have one more line in urls.py
>
> (r'^Media/(?P.*)', 'django.views.static.serve', {'document_root'
> : 'C:/Django/TEMPLATES/Static/', 'show_indexes':True}),
>
This is quite the same that I have actually
Hi, Some time ago I posted the message below, with no responses yet.Probably my questions where not very clear.My questions are:am I doing something wrong (and what is wrong), or is this expected behavior?How do I get this working properly?Is this a bug, and should I submit this as a bug?Thanks,Wie
Alice wrote:
Not really django specific, I was having problems with it in
java+hibernate implementation too...
I have a model, 'Items', which is generic enough to extend to more
specialized items, like a 'book items' model for example. This
relationship has been modelled as a one-to-one, but wh
On 1/7/06, PythonistL <[EMAIL PROTECTED]> wrote:
> Here are two questions:
> 1.Which Django webhosting provider would you recommend and why?
> 2. What should I be aware of when choosing aDjango webhosting?
If I were you, I'd pick one of these three, depending on how you want
to use Django:
1. I
Adrian,
I took a look at modpython.py. I changed line 16 to:
_str_to_bool = lambda s: s.lower() in ('1', 'true', 'on', 'yes')
Note the parethesis.
Seems to work now. Cool, Thanks!
On Saturday 07 January 2006 02:17, WSobczuk wrote:
> I'm not saying I wnat to send information to users, I'm saying I want
> it logged (at least to stdout is it *that* hard?). And I'm not keen on
> putting down my email server when I publish some broken code and get
> 1 error emails. Email i
Anouther issues with Authenticating this way, the Django user is still
Anonymous although the REMOTE_USER is not:
,
POST:,
COOKIES:{},
META:{'AUTH_TYPE': 'Basic',
'CONTENT_LENGTH': 0L,
'CONTENT_TYPE': None,
'GATEWAY_INTERFACE': 'CGI/1.1',
'HTTP_ACCEPT': '*/*',
'HTTP_ACCEPT_ENCODING': 'gzip,
I'm sure he tests throughly beforehand.
but issues like database corruption, bad networks, and DoS attacks can
happen which you don't expect, and can't test properly in staging. all
of these can cause a flood of emails bring down mail servers rending
other parts of your system unworkable..not a g
Hi Brian.
I wrote a http auth middleware along time ago, I haven't used Adrian's.
http://svn.zilbo.com/svn/django/common/middleware/httpauth.py
this might work for you.
it was written before Adrian's version but it works well in my
environment. It just hands the Auth over to apache, and creates
Thanks Ian. But, this is not really what I am doing here. I do not
want to create users from Apache.
Kind Regards, Brian
This is in my view *after* the Authenticaion:
def login(request):
user = users.get_object(username__exact=request.META['REMOTE_USER']
request.session[users.SESSION_KEY] = user.id
request.user = user
# do something else ...
Seems to make both Django and Apache happy.
Regards, Brian
>but issues like database corruption, bad networks, and DoS attacks can
>happen which you don't expect, and can't test properly in staging. all
>of these can cause a flood of emails bring down mail servers rending
>other parts of your system unworkable..not a good idea at all.
That's especially t
Hello everyone,
I'm just starting with django and am trying to figure out the best way
to approach creating a top-level model. My "Item" model would be one
that all other items will extend in some way. By doing this, i'm
hoping to give all entries an owner, some metadata (e.g. timestamp) and
pe
Thanks for the reply :)
python+django make everything easier than java, but I don't think there
is any nice clean way of modelling something like this.
It might be easier to have each specialized model inheriting from a
generic item class (through django), then listing each seperately or
perform
On Saturday 07 Jan 2006 8:08 pm, Jacob Kaplan-Moss wrote:
> > then wouldnt requests to say http://yourname.foo.com/mysite/
> > also go to my django app? I cant experiment since i dont have
> > access to the server, and my own box is set up completely
> > differently.
>
> It completely depends on t
On Sunday 08 Jan 2006 1:11 am, James Bennett wrote:
> 1. If you want to do Apache+mod_python, go with Jacob's Gypsy
> Hosting (http://www.gypsyhosting.com/).
> 2. If you want to do Apache+FastCGI, go with Dreamhost
> (http://www.dreamhost.com/).
> 3. If you want to do lighttpd+FastCGI, go with Tex
wOW!
I get it done "by writing small wrappers around the generic view"!
Thanks A LOT hugo! You've been a great help!
I'm going to look into the pagination thing later ;)
On 1/7/06, Brian Ray <[EMAIL PROTECTED]> wrote:
> btw, I will fill out a Trac ticket for the modpython.py fix, just in
> case this thread get's lost in cyberspace.
Thanks for the ticket and patch! I've committed it.
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
Just a suggestion: in addition to direct download and a torrent it
should be uploaded to http://video.google.com. In this case it is easier
to send a reference, when people ask. Not everybody can download the
whole thing. I can do it for you guys, if you want.
Thanks,
Eugene
Adrian Holovat
44 matches
Mail list logo