On 1/6/07, James Bennett <[EMAIL PROTECTED]> wrote:
What's needed to actually make this work is for user_passes_test to
copy over __module__ and __name__ from the decorated function to its
internal _checklogin function, in addition to __doc__.
Also, it's worth pointing out that this has actual
On 1/6/07, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote:
On 06-Jan-07, at 11:32 AM, chasfs wrote:
> Any suggestions other than removing the login_required decorator and
> doing the work in each view?
use user_passes_test - this has an option for adding the return url
Unfortunately, that won't h
On 06-Jan-07, at 11:32 AM, chasfs wrote:
Any suggestions other than removing the login_required decorator and
doing the work in each view?
use user_passes_test - this has an option for adding the return url
--
regards
kg
http://lawgon.livejournal.com
http://nrcfosshelpline.in/web/
--~--
On 06-Jan-07, at 11:22 AM, David Abrahams wrote:
i have light traffic - but messing with those helped immensely
Rather than me fishing in the dark, can you suggest some changes?
Like, "increase the min" or something?
i have:
StartServers 5
Minspareservers 5
maxspareservers 10
maxclients 2
I got apache with mod_python up and running ok.
Then I used manage.py reset on one of my apps.
Since then, I can't see that app in the Admin page. It was showing up fine
before. It also shows up fine if I use the development server.
I've restarted apache, my browser and even mysqld, all to no
I'm having a problem using the auto generated admin documentation for
views, when the view has an @login_required decorator. Instead of
linking to the doc for the view, the link is to:
http://localhost:8000/admin/doc/views/django.contrib.admin.views.decorators._checklogin/
which is not found.
A
Kenneth Gonsalves <[EMAIL PROTECTED]> writes:
On 05-Jan-07, at 9:11 PM, David Abrahams wrote:
Next most likely is # of child processes. Try fiddling with Min and
MaxSpareServers.
http://httpd.apache.org/docs/2.0/mod/prefork.html
According to the docs that should only be necessary if I hav
Rob Hudson wrote:
wget -E --load-cookies /path/to/firefox/profiles/cookies.txt -r -k -l
-r = recurse ...'
I missed this with pycurl & have yet to find example that supports it
:( Then I scanned the curl FAQ and found 3.15 [0]
3.15 Can I do recursive fetches with curl?
http://curl.mirrors.cy
Andy Dustman wrote:
You need to provide your own replacement for some admin templates,
specifically admin/base_site.html and maybe admin/base.html, depending
on what you want do do, and put them in one of your TEMPLATE_DIRS.
For i18n purposes it would be neat if you could do it in the model
I think, you will also need related_name parameter for your relating fields.
Regards,
Aidas Bendoraitis aka Archatas
On 1/5/07, Jorge Gajon <[EMAIL PROTECTED]> wrote:
Hi Aljosa,
On 1/4/07, Aljosa Mohorovic <[EMAIL PROTECTED]> wrote:
>
> i'm trying to create a model which referencing itself
I can think of a couple of ways:
1. Using intermediate table for Many-to-many relationship:
class UserPermission(models.Model):
user = models.ForeignKey(User)
permission = models.ForeignKey(Permission)
user_permissions = UserPermission.objects.select_related().all()
2. Writing some custo
they are actually all installed. and yet this error still comes up.
rebooting apache didn't help ~ it's all very odd. perhaps some path
issue?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Django
users" group.
T
This is (or at least, was) impossible in Django template system,
because the includes are performed before block (i.e. {% for ... %} or
{% if ... %}) manipulation. When you do as you wrote, Django executes
infinite recursion. Therefore, it crashes.
Anyway, you still have several solutions to tha
As far as I remember, It's not normally available for the fields of
the inline-edited models. However, you can still add some custom
JavaScript to the admin template to implement that functionality.
Good luck!
Aidas Bendoraitis aka Archatas
On 12/27/06, ringemup <[EMAIL PROTECTED]> wrote:
H
On 06-Jan-07, at 12:56 AM, Christoph Haas wrote:
I'd like to hear comments. Or is PostgreSQL an uncommon DBMS to use
with Django? (btw, is there a reason to prefer psycopg over
psycopg2?) I can of course restrain myself to the "public" schema
but my application would benefit from differen
On 05-Jan-07, at 10:26 PM, David Abrahams wrote:
NameVirtualHost: *:80
so is that name-based?
yes - and since you have only one IP, the question is moot
--
regards
kg
http://lawgon.livejournal.com
http://nrcfosshelpline.in/web/
--~--~-~--~~~---~--~
On Jan 5, 9:08 pm, "Aljosa Mohorovic" <[EMAIL PROTECTED]>
wrote:
i can't find info on how to change appname in admin interface.
example:
if i have "my_cool_app" app in project and it has admin interface
enabled it will display something like "My_cool_app" in
administration, can i make it display
On 05-Jan-07, at 9:11 PM, David Abrahams wrote:
Next most likely is # of child processes. Try fiddling with Min and
MaxSpareServers.
http://httpd.apache.org/docs/2.0/mod/prefork.html
According to the docs that should only be necessary if I have very
heavy traffic. I don't; far from it. S
On Dec 13 2006, 7:46 pm, "Joseph Heck" <[EMAIL PROTECTED]> wrote:
Good point - done.
http://code.djangoproject.com/wiki/CookBookUsingExternalMedia
-joehttp://www.rhonabwy.com/wp/
On 12/13/06, Jeremy Dunck <[EMAIL PROTECTED]> wrote:
> On 12/13/06, Joseph Heck <[EMAIL PROTECTED]> wrote:
>
i can't find info on how to change appname in admin interface.
example:
if i have "my_cool_app" app in project and it has admin interface
enabled it will display something like "My_cool_app" in
administration, can i make it display "My cool app description"?
Aljosa
--~--~-~--~~-
On 1/6/07, Christoph Haas <[EMAIL PROTECTED]> wrote:
The problem has been raised in
- http://code.djangoproject.com/ticket/1051
Did anyone else find a workaround? Is it meanwhile possible to use at least
a models.py without using "inspectdb"? My experiments
with 'schemaname.tablename' just l
On 1/5/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Is this a valid idea for the solution or are there other ways to do
this?
Search the Django-user archives - there was a thread about a month ago
titled 'Multiple Models on one Form' where I gave a couple of
solutions to this kind of pro
Oh - one more thing: James Bennett posted over at TextDrive saying he'd
installed psycopg via DarwinPorts, but I've been trying to do that over
the last couple of days and it stalls while trying to fetch PostgreSQL
8.1.3 (which it wants as a precondition for installing py-psycopg).
I don't know
If Joseph's suggestion doesn't work, you may want to look at your Xcode
installation. I had the same output as you when trying to install
psycopg until I updated my Xcode install (following advice on a forum
thread in French which I've since lost). You'll have to create a
developer account at the
I am still learning about HTTP requests, etc, and am looking for an
good explination of how django handles the whole coorelation between a
form button's values / names and the has_key() function, I think they
are related.
For example, I'd like to mimic the multiple buttons on the admin
interface
+1 , I don't think a beginner can have the idea to search the id index
in his datase first.
The first thing we do naturaly is to look at our code, and there we
find nothing wrong...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
Often times, I want to attach documentation or examples in the middle
of a form, just to make it clear to a user what types of data would be
acceptable.
Does this use-case automatically push me from using {{form}} and into
rendering everything about the form myself or do people think this is
gen
On 1/5/07, James Bennett <[EMAIL PROTECTED]> wrote:
I wonder if maybe it would help if ObjectDoesNotExist were to become a
subclass of Http404, so that an uncaught ObjectDoesNotExist exception
would just become a 404...
No can do -- that would couple the database layer to HTTP, which
wouldn't
turns out i was modifying the values in a post_init and thats why I
thought I wasn't getting the right thing.
On Jan 5, 3:33 pm, "leanmeandonothingmachine"
<[EMAIL PROTECTED]> wrote:
tx for the reply sry about the double post
On Jan 5, 3:31 pm, "James Bennett" <[EMAIL PROTECTED]> wrote:
> On
tx for the reply sry about the double post
On Jan 5, 3:31 pm, "James Bennett" <[EMAIL PROTECTED]> wrote:
On 1/5/07, leanmeandonothingmachine <[EMAIL PROTECTED]> wrote:
> I have a model where I'm using the save(self) method, but I can't
> figure out how to get the data that will be writen witho
tx for the reply sry about the double post
On Jan 5, 3:07 pm, David Zhou <[EMAIL PROTECTED]> wrote:
On Jan 5, 2007, at 2:04 PM, leanmeandonothingmachine wrote:
> How do you get values that will be written to the db in a models
> save(self) method before you save the changes to the db? I tried
On 1/5/07, leanmeandonothingmachine <[EMAIL PROTECTED]> wrote:
I have a model where I'm using the save(self) method, but I can't
figure out how to get the data that will be writen without writing it
to the db first. I need to modify a value that's being writen.
Just acccess the various fields
Ok, it turns out that when you kick of a thread and use the db a new
database session is created. You do need to explicitly do a
connection.close() at the end of your thread's run method or the
session leaks.
I got rid of all the setDaemon() calls, no good or bad effects.
Cheers,
Peter
--~--
On Jan 5, 2007, at 2:04 PM, leanmeandonothingmachine wrote:
How do you get values that will be written to the db in a models
save(self) method before you save the changes to the db? I tried
self.field but that gives what the current db value is? I need change
the data that is being written, bu
I have a model where I'm using the save(self) method, but I can't
figure out how to get the data that will be writen without writing it
to the db first. I need to modify a value that's being writen.
--~--~-~--~~~---~--~~
You received this message because you are
Just wondering, has anyone tried a custom template for sitemaps?
I'm thinking (a) I'd like to manually add things that I can't seem to
generate for the sitemap
and (b) I'd like to use the sitemap framework to build an html sitemap
for the site.
--~--~-~--~~~---~--~--
How do you get values that will be written to the db in a models
save(self) method before you save the changes to the db? I tried
self.field but that gives what the current db value is? I need change
the data that is being written, but I'd rather not have to do multiple
writes to the db.
--~--~
On 1/5/07, Ramdas S <[EMAIL PROTECTED]> wrote:
have considered all your suggestions and have tried something like this. But
it still fails. I have numerous errors, I guess. I have marked in yellow,
potential issues.
Many Thanks if you can help me fix it
The logic in your view is a little off
On 1/5/07, Tool69 <[EMAIL PROTECTED]> wrote:
Thank you Baxter,
you avoid me a big waste of time and effort. I was studing my Django
code, and couldn't find the answer.
The problem was solved in changing kib2.webfactionnal.com to 1, as you
said.
Cross-posting this to django-developers because I
Dear list...
I'm currently starting a larger project and want to use Django for it.
First order of business was creating the necessary database schema with
pgadmin3 (a PostgreSQL GUI). Next thing after setting my settings.py right
was to run "django-admin inspectdb" to get my already existing
I'm sure Tool69 and I aren't the only two who've been tripped up by
this.
--~--~-~--~~~---~--~~
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
On 1/5/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
i started reimplementing my old manipulators code using newforms. Can u
guys give me some feedback on my usage of it?
What i wrote seems to me a lot of code for a 3 field form (even though
part of the bloat is due to date formatting)
Here
On 1/5/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
i started reimplementing my old manipulators code using newforms. Can u
guys give me some feedback on my usage of it?
What i wrote seems to me a lot of code for a 3 field form (even though
part of the bloat is due to date formatting)
Here
have considered all your suggestions and have tried something like this. But
it still fails. I have numerous errors, I guess. I have marked in yellow,
potential issues.
Many Thanks if you can help me fix it
Thanks for reading...
Here is my forms.py
---
from django.newforms import *
from dj
"Joseph Heck" <[EMAIL PROTECTED]> writes:
Everyone's looking at the web serving mechanisms, so let me ask a
relatively obvious question - are you doing anything complex
database-wise on the page that's being so slow?
Most pages shouldn't require any DB lookups. I don't see PostgreSQL
soaking
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes:
On Jan 5, 2:54 am, David Abrahams <[EMAIL PROTECTED]> wrote:
I am developing a Django-based site, and it *really* seems to be
slow... sometimes. It's running in an Apache virtual server on the
Any insight you might have is appreciated.
Are
"Jeremy Dunck" <[EMAIL PROTECTED]> writes:
On 1/5/07, David Abrahams <[EMAIL PROTECTED]> wrote:
..
> Except that KeepAlive ties up processes waiting for further requests
> from a client, which may never come (and certainly won't if you run
> media separately as recommended.
So you're saying t
On 1/5/07, Joseph Heck <[EMAIL PROTECTED]> wrote:
Everyone's looking at the web serving mechanisms, so let me ask a relatively
obvious question - are you doing anything complex database-wise on the page
that's being so slow? Perhaps one of the issues is a missing index or
something equivalent?
Thank you Baxter,
you avoid me a big waste of time and effort. I was studing my Django
code, and couldn't find the answer.
The problem was solved in changing kib2.webfactionnal.com to 1, as you
said.
--~--~-~--~~~---~--~~
You received this message because you are
Everyone's looking at the web serving mechanisms, so let me ask a relatively
obvious question - are you doing anything complex database-wise on the page
that's being so slow? Perhaps one of the issues is a missing index or
something equivalent?
There's some good debugging information tied into pa
I'd look in the database and see what id kib2.webfactionnal.com has
versus what the comments have. I bet all the comments are looking for 1
(what example.com was) and kib2.webfactionnal.com is 2... in which
case, I'd probably just change kib2.webfactionnal.com to 1.
--~--~-~--~~
David Zhou wrote:
On Jan 5, 2007, at 5:00 AM, Robin Becker wrote:
so these define the server used by the http stuff below, do I
understand it correctly that the fcgi processes are setup to listen
on the above ports?
Those are unix sockets, but correct. The fcgi processes are listen at
On 1/5/07, David Abrahams <[EMAIL PROTECTED]> wrote:
"Jeremy Dunck" <[EMAIL PROTECTED]> writes:
...
Sure. If the traffic demands were high I could understand why we'd
like to dedicate the process to Apache. But I don't think they're
high yet. I am running quite a few services off this mac
Hi James,
no I did the faulty removing of "example.com" (loosing all my comments,
but that's not the worst), then I set my new one to
"kib2.webfactionnal.com". Now, I can't read any comments.
--~--~-~--~~~---~--~~
You received this message because you are subscri
On Jan 5, 2:54 am, David Abrahams <[EMAIL PROTECTED]> wrote:
I am developing a Django-based site, and it *really* seems to be
slow... sometimes. It's running in an Apache virtual server on the
Any insight you might have is appreciated.
Are you sure it's not a client issue?
I had a problem
Thanks!
--~--~-~--~~~---~--~~
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 m
Hi all,
i started reimplementing my old manipulators code using newforms. Can u
guys give me some feedback on my usage of it?
What i wrote seems to me a lot of code for a 3 field form (even though
part of the bloat is due to date formatting)
Here's the code:
http://dpaste.com/hold/4382/
Also
On 1/5/07, David Abrahams <[EMAIL PROTECTED]> wrote:
..
> Except that KeepAlive ties up processes waiting for further requests
> from a client, which may never come (and certainly won't if you run
> media separately as recommended.
So you're saying that basically the docs are wrong (not questio
On 1/5/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
I'm not sure why this throws a 500 error rather than a 404, but I'm
hoping somebody can help.
Typically, the pattern is to catch ObjectDoesNotExist and either
recover from it or raise Http404; ObjectDoesNotExist is there to let
you have a
Use get_object_or_404() or make a try/raise block with raise Http404.
On 1/5/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
I'm not sure why this throws a 500 error rather than a 404, but I'm
hoping somebody can help.
On my site, each forum has a slug... site.com/foo-bar/
but if someone t
"Jeremy Dunck" <[EMAIL PROTECTED]> writes:
On 1/5/07, David Abrahams <[EMAIL PROTECTED]> wrote:
...
> Most likely, KeepAlive is holding processes unavailable while
> sitting idle.
How would I tell if that was happening?
Turn it off and see if performance suddenly becomes rediculously good.
Bah, I feel guilty. I ran into this several months ago and reported it
here, got some feedback that I should open an issue on it but never
followed up. So now I have:
http://code.djangoproject.com/ticket/3235
The suggestions you make for django user's code to avoid the
performance hit are val
On 1/5/07, Tool69 <[EMAIL PROTECTED]> wrote:
It was "example.com", so I made the changes, but now all my comments
have disappeared and I just can't post any new one : I can write them,
preview them, but they are not on my blog anymore.
Did you just edit the domain name in the default 'example.
"DavidA" <[EMAIL PROTECTED]> writes:
Is it possible your Apache server is doing reverse DNS lookups on the
GET requests and the lookup is failing for the client machine? I seem
to remember older versions of Apache having this on by default.
It's Apache22, but I don't have any explicit settin
Hi,
I needed to make some changes in my Admin as I saw I've not set the
right Site domain.
It was "example.com", so I made the changes, but now all my comments
have disappeared and I just can't post any new one : I can write them,
preview them, but they are not on my blog anymore.
My Admin interf
I'm not sure why this throws a 500 error rather than a 404, but I'm
hoping somebody can help.
On my site, each forum has a slug... site.com/foo-bar/
but if someone types in site.com/foobar/ it gives a 500 error.
Traceback says "DoesNotExist: Forum matching query does not exist."
which makes sen
hi all,
using a little bit of code snippets from pygments demo app views and of
course using pygments with django for syntax highlighting. im running
into an issue where no matter what style ive selected i can't get it to
highlight properly.. to get around this ive manually copied a
stylesheet f
On 1/5/07, David Abrahams <[EMAIL PROTECTED]> wrote:
...
> Most likely, KeepAlive is holding processes unavailable while
> sitting idle.
How would I tell if that was happening?
Turn it off and see if performance suddenly becomes rediculously good. :)
If you want more evidence, perhaps the s
On 1/5/07, DavidA <[EMAIL PROTECTED]> wrote:
Is it possible your Apache server is doing reverse DNS lookups on the
GET requests and the lookup is failing for the client machine? I seem
to remember older versions of Apache having this on by default. You can
turn it off with this in your httpd.co
Is it possible your Apache server is doing reverse DNS lookups on the
GET requests and the lookup is failing for the client machine? I seem
to remember older versions of Apache having this on by default. You can
turn it off with this in your httpd.conf file.
HostnameLookups off
Of course, I'
Download Free Games! - http://surl.in/HLFRG238206SVRAKSX
--~--~-~--~~~---~--~~
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
"Jeremy Dunck" <[EMAIL PROTECTED]> writes:
On 1/4/07, David Abrahams <[EMAIL PROTECTED]> wrote:
...
If I log into the server and run "top" while trying to access pages, I
don't see any alarming jumps in CPU load; the hungriest processes
typically stay in single-digit (or below) percentages of
"Jeremy Dunck" <[EMAIL PROTECTED]> writes:
On 1/4/07, David Abrahams <[EMAIL PROTECTED]> wrote:
...
If I log into the server and run "top" while trying to access pages, I
don't see any alarming jumps in CPU load; the hungriest processes
typically stay in single-digit (or below) percentages of
I have three models, a participant, contact, and contact detal.
Participant is basically a user table, contact is a list of
contact_types (ie, web links, emails etc) and contact detail is a
detail of the contacts for a particular participant -
the the contact detail class is below:
class Contac
On 1/5/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
I am trying to get your solution 1 to work for the case of multiple
instances of the same model. The forms looks good, but the problem is
that all fields have the same name (because the forms are generated
from the same model). Is there an
Search Profiles - FREE! Intimate Dating. Start Chatting within seconds
- http://surl.in/HLMAT238206SVRAKSX
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to this group, send email to
On Jan 5, 2007, at 5:00 AM, Robin Becker wrote:
so these define the server used by the http stuff below, do I
understand it correctly that the fcgi processes are setup to listen
on the above ports?
Those are unix sockets, but correct. The fcgi processes are listen
at those sockets.
I
On 1/5/07, James Bennett <[EMAIL PROTECTED]> wrote:
I can't find it now, but I have this odd feeling that somewhere I saw
mention that LazyDate was/would be/should be deprecated in favor of
just using the appropriate methods from the datetime module (e.g.,
instead of using a LazyDate object as
Sorry I forgot to specify a thing.
The thing is to play with django on the console you need an actual
application to poke with. In order to Django to know how to deal with
that you have to tell it where resides the settings.py of your app so
you can play with its model and so on. "python manage.
I try but :
[EMAIL PROTECTED]:~/iti$ export DJANGO_SETTINGS_MODULE=.
[EMAIL PROTECTED]:~/iti$ python
Python 2.4.4c1 (#2, Oct 11 2006, 20:00:03)
[GCC 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from djan
raise EnvironmentError, "Could not import settings '%s' (Is it on
sys.path? Does it have syntax errors?): %s" % (self.SETTINGS_MODULE, e)
EnvironmentError: Could not import settings 'iti.settings' (Is it on
sys.path? Does it have syntax errors?): No module named iti.settings
AFAIK that's
Hi, I read DJANGO BOOK and Chapter 4: The Django template system. I read
Creating template objects and :
#python
Python 2.4.4c1 (#2, Oct 11 2006, 20:00:03)
[GCC 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>
David Zhou wrote:
I'm running nginx + fcgi for Django, so the below is in nginx's config
format. But I'm assuming that lighttpd should be able to do something
similar.
Basically, in nginx, you can specify various upstream pools. For example:
upstream blah {
server unix:/tm
Here's an issue to be aware of wrt template performance:
I noticed that one of my templates was getting really slow. I profiled
it and it seemed to spend lots of time calling the __str__ method of
one of my models. The method contains a query for a related object,
which slowed things down quite
On 05-Jan-07, at 1:34 PM, James Bennett wrote:
Or am I getting all confused again?
only the forces of evil get confused ;-)
--
"May the forces of evil become confused on the way to your house."
-- George Carlin
--
regards
kg
http://lawgon.livejournal.com
http://nrcfosshelpline.in/web/
On 1/4/07, Russell Keith-Magee <[EMAIL PROTECTED]> wrote:
There is a tangential reference to LazyDate in the model API
documentation, but otherwise, this is an area where some documentation
could be useful. I've opened a ticket (#3231) for this issue.
I can't find it now, but I have this odd f
86 matches
Mail list logo