Try settting related_name on "user" as well.
user = models.ForeignKey(User, unique=True, related_name='foo')
ME
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send e
Graham, you've once again made my life easier. Your solution solved
ALL my ownership/permission issues. Thank you!
My mod_wsgi directive now looks like so:
WSGIDaemonProcess user1 threads=15 user=user1 group=user1 display-name=
%{GROUP}
WSGIProcessGroup user1
WSGIApplicationGroup %{GLOBAL}
I th
Hi Bernard,
To me, one of the attractions of Django is that the look and feel is
COMPLETELY up to you. Django does not come with templates. You create
them...and they're just HTML files. Wherever you want Django to do
something in your page, insert the proper Django Template code:
http://www.dja
Here's my clunky, but working, solution. In the following example, I
have solved two security issues I was experiencing: 1) the original
sorl directory permissions—now 755—and 2) the 'upload_to' folder of
the source images—also now 755.
In the following example...
Apache with mod_wsgi v2.0 (daem
Thanks, John. I found a clunky solution (see next post), but I like
your solution better. I'm using mod_wsgi in daemon mode, but Django
seems to be running as 'nobody'. Here's my mod_wsgi directive in
httpd.conf's Virtualhost section:
WSGIDaemonProcess user1 threads=15 display-name=%{GROUP}
WSGIP
I'm using sorl-thumbnails on Apache. It's working fine, except
permissions on the directory in which it writes the thumbnails — /
media/images — must be set to 777. For obvious security reasons, I'd
like to work around this somehow...or at least minimize the threat.
Any suggestions?
Thanks!
ME
--
Adi. That got the pagination working on the first page! Thank you!
I'm getting no results on page 2, however. I know this is in the way
I'm handling GET requests (see the 'else' statement). I'm just not
sure how this should be handled. I'll be reading some docs and
searching around for a solution
> What does the search funtion return?
> A django queryset or a xapian result and are you sure that
> the Paginator can handle the returned value?
Hmmm. Great question.
I believe it's returning a xapian result set.
In my template, I'm looping through the paginator.object_list. Here's
a simple e
> what does the search method of your model do?
> I can't find any reference of a search function in the docs.
I'm sorry, but I don't think I understand the question.
I'm searching on a full-text index.
ME
--~--~-~--~~~---~--~~
You received this message because y
You're right. The form action was blank. I changed it to "/Catalog/
search/?page=1". I'm now seeing the page parameter, but I'm still
seeing all the results on one page.
>> Have you tried 'results': results.object_list in your render_to_response?
I tried this and still no luck. Also, using "'re
> shouldn't this be
> results = paginator.page(pager).object_list
Thanks, Adi. I get the same result set with that. The only exception
is that I get the following error:
'generator' object has no attribute 'has_next'
If I comment out the 'has_next' and 'has_previous' lines in the
render
Hello all. I'm having trouble getting pagination working on search
results in a custom view.
I have djapian/xapian full-text indexing working and I have some
pagination code cobbled together from various sources. I can get the
search results and all the pagination (result count, page x of y, etc)
Hello all,
I have the following models:
class Category(models.Model):
name = models.CharField(core=True, max_length=100)
parent = models.ForeignKey('self', blank=True, null=True,
related_name='child')
class Product(models.Model):
name = models.CharField('name', max_lengt
13 matches
Mail list logo