> AddHandler fastcgi-script .fcgi
Is this the actual name of your fcgi script? Also, there seems to be a
space before ".fcgi", which doesn't seem right.
Michael Hipp wrote:
> Hello,
>
> I'm hoping to rework my website into Django, but am having trouble at my
> shared hosting provider (HostMons
We're looking into this as well! 10K session rows in one day. Have you
noticed the records being in multiples of seven?
Also, in our slow query log we've noticed django performing a
selection on the entire session table with no WHERE clause.
Clues in the puzzle...
On Jan 4, 11:51 pm, SmileyChri
I have a model attribute of type TextField, where I am storing html
data. While displaying in template I do not want to escape it, and so
should mark this as safe. How can I do this? I read the link at
http://www.djangoproject.com/documentation/templates_python/#filters-and-auto-escaping
, but tha
I am trying to set up Django on a shared site (OCSSolutions.com) using
FCGI.
Needless to say, it doesn't work.
In my public_html directory, I place the file site.fcgi containing:
#!/usr/bin/python
import sys, os
# Add a custom Python path.
sys.path.insert(0, "/home/ktb/py/")
print '--sys.path-
On Sun, 2008-01-06 at 00:34 -0800, shabda wrote:
> I have a model attribute of type TextField, where I am storing html
> data. While displaying in template I do not want to escape it, and so
> should mark this as safe. How can I do this? I read the link at
> http://www.djangoproject.com/documenta
I have a form, to which I want to pass some data when it is first
dipalyed,
My form is,
class EditPage(forms.Form):
text = forms.CharField(widget = forms.Textarea)
edit_summary = forms.CharField()
In my view I bind data to this form as
if request.method == 'GET':
page = Page.o
On Sun, 2008-01-06 at 01:32 -0800, shabda wrote:
> I have a form, to which I want to pass some data when it is first
> dipalyed,
> My form is,
> class EditPage(forms.Form):
> text = forms.CharField(widget = forms.Textarea)
> edit_summary = forms.CharField()
>
> In my view I bind data to
Gratis Erotikforum
http://www.flirt-base.at/wbb2/
1000 Private Amateurgirls !
http://www.adult-drink.com/index1.html
http://www.adult-drink.com/vorschau/Vorschau.jpg
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
On Jan 5, 5:46 pm, Michael Hipp <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I'm hoping to rework my website into Django, but am having trouble at my
> shared hosting provider (HostMonster).
>
> They don't support mod_python, so Hostmonster said to add this to .htaccess
> for FastCGI:
>
>AddHandl
Never mind.
In my month of experience with Python, I never quite grasped that each
module on the module path needs a __init__.py
Ktb
On Jan 6, 12:38 am, kbochert <[EMAIL PROTECTED]> wrote:
> I am trying to set up Django on a shared site (OCSSolutions.com) using
> FCGI.
> Needless to say, it doe
On 06 Jan 00:38, kbochert wrote:
> I get:
>
> --sys_path--
> ['/home/ktb/py', (...) , '/opt/python/lib/python2.5/site-packages']
> ...
> ImportError: No module named django.core.servers.fastcgi
>
>
> If I do:
> ls /home/ktb/py/django/core/servers
>
> I see the file fastcgi.py (among a few o
On Sun, 2008-01-06 at 04:04 -0800, Brot wrote:
> Hello,
>
> I have a few models which have the same two fields. Based on these
> fields there is always the same function in these models. But this
> violates DRY. Is there another possibility for my function/models
Sono-ish, we'll have model inhe
Hello Django Users,
I just started working with the form validation from the newforms
library. Most of the options are very good documented and easy to
implemend the only thing i'm missing is the ComboFields description.
In the documentation they say you can look for an example in the unit
tests
Hello,
I have a few models which have the same two fields. Based on these
fields there is always the same function in these models. But this
violates DRY. Is there another possibility for my function/models
-
Am Sonntag, 6. Januar 2008 13:04:38 schrieb Brot:
> I have a few models which have the same two fields. Based on these
> fields there is always the same function in these models. But this
> violates DRY. Is there another possibility for my function/models
>
> [...]
>
> Model Inheritance isn't supp
Hello,
thank you for the fast reply. This is what I am looking for. I know I
had to add the fields redundantly, but the function is defined once
now.
~Bernd
On Jan 6, 1:30 pm, Nikolaus Schlemm <[EMAIL PROTECTED]> wrote:
> Am Sonntag, 6. Januar 2008 13:04:38 schrieb Brot:
>
> > I have a few mode
On Fri, 2008-01-04 at 14:48 -0800, Peter Rowell wrote:
> It appears that setting SESSION_SAVE_EVERY_REQUEST = True is causing a
> new session to be created on each page access.
I was intending to have a quiet evening at home, but James Bennett
convinced me to look at this instead. It should be f
On Sun, 2008-01-06 at 23:58 +1100, Malcolm Tredinnick wrote:
>
> On Fri, 2008-01-04 at 14:48 -0800, Peter Rowell wrote:
> > It appears that setting SESSION_SAVE_EVERY_REQUEST = True is causing a
> > new session to be created on each page access.
>
> I was intending to have a quiet evening at ho
[EMAIL PROTECTED] wrote:
>> AddHandler fastcgi-script .fcgi
>
> Is this the actual name of your fcgi script? Also, there seems to be a
> space before ".fcgi", which doesn't seem right.
That line came directly from ...
http://www.djangobook.com/en/1.0/chapter20/
http://www.djangoproject.
Just seen your answers. Thanks a lot.
--~--~-~--~~~---~--~~
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
On Jan 6, 2008 11:27 AM, shabda <[EMAIL PROTECTED]> wrote:
>
> But I need the initial data to be dynamic, so I can't just do
> text = forms.CharField(widget = forms.Textarea, initial = 'sometext')
>
> I assume I can do some thing along the lines of overriding __init__
> for this form, passing the
> But I need the initial data to be dynamic, so I can't just do
> text = forms.CharField(widget = forms.Textarea, initial = 'sometext')
A form also has an initial argument.
form=YourForm(initial={'formfield1':
formvalue1,'formfield2':formvalue2})
--~--~-~--~~~---~--
But I need the initial data to be dynamic, so I can't just do
text = forms.CharField(widget = forms.Textarea, initial = 'sometext')
I assume I can do some thing along the lines of overriding __init__
for this form, passing the requored value from the view function and
then using something like
te
There was a couple bugs in pyAMF that they have squished as of
yesterday. Great guys.
http://joelhooks.com/?p=5
I'm still using the S2Flex2 RemotingService, but just because it
works.
On Jan 5, 8:56 am, akaihola <[EMAIL PROTECTED]> wrote:
> DjangoAMF almost worked for us except for two problems
This is probably really simple, but I'm not seeing it.
I have my base.html and sub.html templates. The method that services the sub
template does it's job fine. But in the base template I have a piece of
content that is independent of the sub template. I have a get_stuff() method
in views.py t
"Initial" parameter can be a callable object. So you can create "lazy
getter" for your initial data
On 6 янв, 19:27, shabda <[EMAIL PROTECTED]> wrote:
> But I need the initial data to be dynamic, so I can't just do
> text = forms.CharField(widget = forms.Textarea, initial = 'sometext')
>
> I assu
Hi, I'm reading thoroughly the new django book and on page 86, the
figure 6-2, why didn't the Django Administration Site showing Ch6
except only Auth and Sites showing? I have trying all morning to
figure it out but can't.
Here are my files:
# Django settings for mysite project.
DEBUG = True
T
> Attempting to do a method call {% views.get_stuff %} just results in a 'bad
> tag' error.
Right, because there is no tag with the name 'views.get_stuff'.
> Doing it like a variable {{ views.get_stuff }} just seems to be ignored.
Not ignored, but it probably fails which the template engine tre
I have a model field that I want to change the attrs on when displayed
by newforms. I thought I could do something like:
class Timesheet(models.Model):
date = DateField(widget=forms.TextInput())
and then define my attrs in the widget. But syncdb is complaining:
TypeError: __init__() got a
Never mind. Clearly, I was confusing my models with my forms.
--~--~-~--~~~---~--~~
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 fr
I'm sure this will be very easy for most of you...
I am trying to display a list.
in views.py, I have:
from mysite.books.models import Book
from django.http import HttpResponse
def book_list(request):
book = Book.objects.all().order_by('title')
return render_to_response('books/book_lis
Hi Guys,
Been looking to get the current id of the user logged in everywhere
but can't seem to find how to do this.
Basically in my views.py file I want to insert an entry into a table.
Part of this insert requires the current logged in users id. The only
bit of information I seem to be able to
Mikey3D,
I believe you need to seed the database by typing python manage sql
or type python manage sqlall. The you need to type python
manage syncdb db again.
Cheeers.
Did you run python manage syncdb?
Did you run python manage sqlall?
On Jan 6, 2:10 pm, Mikey3D <[EMAIL PROTECTED]> wrote:
> H
{% if "book_list" %} - what is "book_list" ? It is string literal, so
it is always True.
You must write this:
{% if book %}
And if you want to print books:
{{book|join:", "}}
On 6 янв, 23:38, chiefmoamba <[EMAIL PROTECTED]> wrote:
> I'm sure this will be very easy for most of you...
>
> I am t
User id - request.user.id
On 6 янв, 23:43, Darthmahon <[EMAIL PROTECTED]> wrote:
> Hi Guys,
>
> Been looking to get the current id of the user logged in everywhere
> but can't seem to find how to do this.
>
> Basically in my views.py file I want to insert an entry into a table.
> Part of this ins
Hello
I've been using Django for a week. Really liking its flexibility.
I'm using it to create a CMS for an ActionScript 3 app. The Flash
will read an XML file outputed from Django and maintained through the
admin interface. It's all working well but I have a problem
structuring the XML output
Thanks, should have guessed that!
For some reason though it is returning the value as 11L. I just want
it to return 11, as it is throwing up an error when trying to use it
like that:
Invalid value: 'user' should be a instance, not a
I'm using a MySQL database, any way of stripping the L off t
It appears that at this point, response.content is a utf8-encoded bytestring.
I'm playing with a response middleware doing something like:
MY_RE.sub(u'%s' % text, response.content)
which raises a UnicodeDecodeError if response.content contains non-ascii.
I understand that the strings need to be
You are doing something like my_instance.author = request.user.id
whereas you should do: my_instance.author = request.user. Why? You are
working with the Django ORM and it doesn't expect you to give it an
User-Id (although it get's saved as that in the db), but an instance
of django.contrib.auth.m
When I used request.user, it outputs the username of the currently
logged in user. When I try and use this as part of the entry into the
table, it won't let me as it's expecting an integer.
Is that wrong?
On Jan 6, 9:33 pm, Florian Apolloner <[EMAIL PROTECTED]> wrote:
> You are doing something l
The error message:
Invalid value: 'user' should be a instance, not a
clearly states you should use a User-instance and not an integer
(long).
You might wanna show us some code...
And yes printing request.user reuturns the username, but that's caused
by __unicode__ and has nothing to to with th
Peter Rowell wrote:
> It
> would probably be better (for any number of reasons) if you put all of
> these types of routines in a utils.py module and import/pass that.
> E.g.
>
> import utils
> return render_to_response('now.html', RequestContext(request, {
> 'utils': utils,
>
Hi,
I need to limit the number of elements I have to display on an index page.
Right now I do something like this in the template.
{% for p in part.object.all %}
...
{% endfor %}
Witch obliviously output all objects in the set.
In the view, I can do it this way:
Part.objects.all()[:5]
I would
Hi goober,
I have done your suggestions before or I won't be able to create a
superuser, right? I could login and there is no Ch6 but only Auth and
Sites in Admin Interface. So I try again your suggestions:
In command:
python manage.py sql books "OR" python manage.py sqlall books > the
same dif
First of all, Part.objects.all()[:5] is still lazy. SQL query executes
only when you try to iterate through items.
And you can slice objects in template with "slice" filter
{% for p in part.object.all|slice:":5" %}
On 7 янв, 01:13, "Alexandre Forget" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I need t
On Jan 6, 2008 5:44 PM, Alex Koshelev <[EMAIL PROTECTED]> wrote:
>
> First of all, Part.objects.all()[:5] is still lazy. SQL query executes
> only when you try to iterate through items.
> And you can slice objects in template with "slice" filter
>
> {% for p in part.object.all|slice:":5" %}
>
Th
Hello David,
I was not able to reproduce the error on any Linux, Windows or Solaris
machines so I created a vmware image from scratch using the software
versions you specified. The following are steps I took to recreate
your problem.
[Installation for setting up Whitebox Linux 3.0 with geodj
Malcolm, please accept my apologies for 1/2 of the problem described
in the original article. I, of all people (I wrote debuggers back in
the 80's), should know that you have to vet your diagnostic tools
before you depend on them.
Short version: The high cookie creation frequency was real (I'm go
An Invitation To Reflection And Repentance ((IMPORTANT VIDEO))
Adam Yahiye Gadahn (Azzam)
For the loading >>>
clarity high 404MB
http://www.archive.org/download/u5uwII/v.AVI
http://www.archive.org/download/u7uwII/v.AVI
http://www.archive.org/download/u8uwII/v.AVI
http://ia360634.us.archive.
On Jan 2, 9:48 am, Nathaniel Whiteinge <[EMAIL PROTECTED]> wrote:
> On Dec 30 2007, 6:46 pm, makebelieve <[EMAIL PROTECTED]> wrote:
>
> > Part of a form of mine has a drop down to choose a region which is a
> > foreign key to the object I'm updating. Further, I have a link to add
> > a new regi
update: it doesn't work in the for loop.
--
TemplateSyntaxError at /parts/8051/
'for' statements should use the format 'for x in y': for t in
part.forum.thread_set.all |slice: ":5"
--
this is the offending line:
{% for t in part.forum.thread_set.all |slice: ":5" %}
any
On Jan 6, 2008 5:10 PM, Mikey3D <[EMAIL PROTECTED]> wrote:
> [...]
> from django.db import models
>
> class Publisher(models.Model):
> name = models.CharField(max_length=30)
> address = models.CharField(max_length=50)
> city = models.CharField(max_length=60)
> state_province = mode
Have you put a space between "all" and filter mark?
On 7 янв, 02:27, "Alexandre Forget" <[EMAIL PROTECTED]> wrote:
> update: it doesn't work in the for loop.
>
> --
> TemplateSyntaxError at /parts/8051/
>
> 'for' statements should use the format 'for x in y': for t in
> part.forum.thr
Hi all,
I am following the online tutorial and I am unable to add my app to
the admin section.
When I runserver I get:
mysite.polls: unexpected indent (models.py, line 5)
1 error found
Here is my models.py:
from django.db import models
class Poll(models.Model):
question = models.CharField(
In the course of attempting to learn Django I've decided to attempt to
build something resembling Flickr or Facebook groups, e.g Person
creates an account, People can create a group/join a group, Person can
post start a topic/post a comment if they belong to that group. Fairly
basic stuff in the g
I tried with and without... no difference
On Jan 6, 2008 6:32 PM, Alex Koshelev <[EMAIL PROTECTED]> wrote:
>
> Have you put a space between "all" and filter mark?
>
> On 7 янв, 02:27, "Alexandre Forget" <[EMAIL PROTECTED]> wrote:
> > update: it doesn't work in the for loop.
> >
> > --
Ummm.
-Original Message-
From: Chris Phillips <[EMAIL PROTECTED]>
Sent: Sunday, January 6, 2008 6:50pm
To: Django users
Subject: "unexpected indent" error not allowing me to add the poll app to the
admin site
Hi all,
I am following the online tutorial and I am unable to add my app
I just go that to work after wrestling with that for the past day or
two as well.
Python uses indentation instead of braces to show levels of code. So,
the line "class Admin: pass" needs to be only one level of indentation
in from the top class declaration. So, your code should be more like
thi
On Sun, 2008-01-06 at 15:25 -0600, Gary Wilson Jr. wrote:
> It appears that at this point, response.content is a utf8-encoded bytestring.
> I'm playing with a response middleware doing something like:
>
> MY_RE.sub(u'%s' % text, response.content)
>
> which raises a UnicodeDecodeError if respons
Like Ramiro says. It's an indentation issue.
Your nested class Admin: pass statement needs to be one and only one
level of indentation below the top class declaration for each class
that you're defining:
class Publisher(model.Model):
...
class Admin: pass
class Foo(model.Model):
On Jan 6, 9:23 pm, kbochert <[EMAIL PROTECTED]> wrote:
> On Jan 5, 5:46 pm, Michael Hipp <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hello,
>
> > I'm hoping to rework my website into Django, but am having trouble at my
> > shared hosting provider (HostMonster).
>
> > They don't support mod_python, so Hos
Note you must delete *all* spaces in filter expression
part.forum.thread_set.all|slice:":5"
And what is your django version?
On 7 янв, 02:55, "Alexandre Forget" <[EMAIL PROTECTED]> wrote:
> I tried with and without... no difference
>
> On Jan 6, 2008 6:32 PM, Alex Koshelev <[EMAIL PROTECTED]> w
On Sun, 2008-01-06 at 12:38 -0800, chiefmoamba wrote:
> I'm sure this will be very easy for most of you...
>
> I am trying to display a list.
[...]
> If I view source, I get this:
>
> There are books
> The title of your books: [, ]
That's the default representation of a Python list: using the
On Sun, 2008-01-06 at 16:12 -0600, Michael Hipp wrote:
> Peter Rowell wrote:
[...]
> > I recommend rethinking how data is passed into and used in your
> > templates. Consider creating your own content processor. Or maybe some
> > custom template tags and/or filters. See
> > http://www.djangoproj
I'm realy glad:)
On 7 янв, 03:15, "Alexandre Forget" <[EMAIL PROTECTED]> wrote:
> you are right ! it works now, thanks
>
> django fresh from svn
>
> On Jan 6, 2008 7:10 PM, Alex Koshelev <[EMAIL PROTECTED]> wrote:
>
>
>
> > Note you must delete *all* spaces in filter expression
>
> > part.forum.t
On Sun, 2008-01-06 at 15:51 -0800, Pete McVicar wrote:
[...]
> Because Django already has the concept of groups/permission my
> immediate reaction would be to extend the admin interface to allow
> ordinary People to create and mange groups this way. However, from
> what I've read that would basic
you are right ! it works now, thanks
django fresh from svn
On Jan 6, 2008 7:10 PM, Alex Koshelev <[EMAIL PROTECTED]> wrote:
>
> Note you must delete *all* spaces in filter expression
>
> part.forum.thread_set.all|slice:":5"
>
> And what is your django version?
>
> On 7 янв, 02:55, "Alexandre Fo
Hello,
I have a database table with a list of features that a user can
enable, so I would like to create a form like:
Feature1 [ ] Enable [ ] Disable
Feature2 [ ] Enable [ ] Disable
Feature3 [ ] Enable [ ] Disable
Feature4 [ ] Enable [ ] Disable
The number of features can grow or decre
[EMAIL PROTECTED] wrote:
> The number of features can grow or decrease depending on the user type
> so I can't create a static form class with all the features listed.
>
> Can someone please help to do this.
>
Sure!
I believe this will be a decent starting point for you:
http://code.djangoproje
I am getting the following error:
OperationalError at /lista/
(1241, 'Operand should contain 1 column(s)')
Request Method: POST
Request URL:http://127.0.0.1:8000/lista/
Exception Type: OperationalError
Exception Value:(1241, 'Operand should contain 1 column(s)')
Except
Excellent. I just updated to 7003 and the error message is gone.
I really appreciate your taking the time to help me with this.
Cheers!
--
David Hancock
On Jan 6, 6:01 pm, tlp <[EMAIL PROTECTED]> wrote:
> Hello David,
>
> I was not able to reproduce the error on any Linux, Windows or Solaris
>
Hi Elgringo,
Thank you so much it works. :-) One question, why is that I have Auth
and Sites are showing up when my "class Admin: pass" were wrong way of
coding still works?
Hi Ramiro, I wasn't sure what you mean by copy/paste error and inner
class but Elgringo clearly what you were saying. Than
Elgringo-
Your solution of using spaces instead of tabs to indent worked
perfectly!
Thank you for saving me additional hours of banging my head against
the wall!
On Jan 6, 7:06 pm, elgringo <[EMAIL PROTECTED]> wrote:
> I just go that to work after wrestling with that for the past day or
> two
>> I was having problems with my text editor. For some reason Python
>> didn't like the way it handled tabs/spaces. I stopped using tabs and
>> started using spaces, and that seemed to fix the problem.
Your solution of using spaces instead of tabs to indent worked
perfectly!
The python inter
0.97-pre-SVN-unknown rev 7003
i have a proble with de urlfield broken link
im make a model as app1 this model haves a UrlField
urlflyer = models.URLField("Direccion de la imagen",verify_exists=False)
in my develop local server (python manage.py runserver) function fine
But on my produc
On 06-Jan-08, at 11:01 PM, Michael Hipp wrote:
> Attempting to do a method call {% views.get_stuff %} just results
> in a 'bad
> tag' error.
>
> Doing it like a variable {{ views.get_stuff }} just seems to be
> ignored.
make a templatetag
--
regards
kg
http://lawgon.livejournal.com
http:
> There is a mechanism available
> for that -- context processors -- but people don't want to use it
> because they want *something else* that happens for every template.
Malcolm's absolutely correct: context processors (I mis-typed when I
said content processors) is exactly what you want here. T
Hi, I have a strange issue with my css not loading. CSS and Images
seem to work fine for the admin portion of the site but when I try to
add my own CSS it can't seem to find it.
my variables look as such:
MEDIA_ROOT = '/srv/abc/media/'
MEDIA_URL = 'http://www.abc.net/media/'
ADMIN_MEDIA_PREFIX =
Have you tried this yet?
http://www.djangoproject.com/documentation/static_files/
-Bill
On Jan 6, 2008, at 9:12 PM, pacman wrote:
Hi, I have a strange issue with my css not loading. CSS and Images
seem to work fine for the admin portion of the site but when I try to
add my own CSS it can'
bah, nevermind, I should try reading more carefully, as you're not
using the test server. :)
Sorry.
Might be a conflict with using /media/ for both admin and static files?
-Bill
On Jan 6, 2008, at 9:12 PM, pacman wrote:
Hi, I have a strange issue with my css not loading. CSS and Images
s
define as /srv/ your documentroot on apache virtualhost.
change 755 permission to your /srv/abc/media dir
put a symbolic link on /srv/media --> /srv/abc/media/
rember when the navegator search on django.abc.com/media/
search /media dir for /media/ location on your documentroot
William Siegrist
define as /srv/ your documentroot on apache virtualhost.
change 755 permission to your /srv/abc/media dir
put a symbolic link on /srv/media --> /srv/abc/media/
rember when the navegator search on django.abc.com/media/
search /media dir for /media/ location on your documentroot
William Siegrist
82 matches
Mail list logo