Hi
I am trying to get mod_wsgi installed on a production server.
Apache: 1.3.37
Kernel: 2.6.17.13-vs2.0.2.1vs-1.00
Os: CentOS 4.8
Following instructions from:
http://code.google.com/p/modwsgi/wiki/QuickInstallationGuide
at the point with:
./configure --with-apxs=/usr/local/apache/bin/apxs
--with
One of the needs I have (and, I imagine, others too) is to be able to
display a view of a single record in a table. This is the case when
the record has many fields, not all of which are appropriate for (or
need to be) display in the normal list view.
What I need to know is: is this a "standard
After considering the severe disadvantage imposed by lacking a
handling case for the 'add' view, I figured it out and wrote it up
here, for the sake of more verbose documentation:
http://mangos.dontexist.net/blog/?p=345
Primarily, the idea is that for inlines, I can grab the hidden field
providi
Yeah, that makes sense. Thanks!
Margie
On Nov 5, 5:21 pm, Karen Tracey wrote:
> On Thu, Nov 5, 2009 at 6:53 PM, Margie Roginski
> wrote:
>
>
>
>
>
> > In my app, my user inputs one more more attachments and on the server
> > side I am successfully getting them via code like this:
>
> >
So I have a invite system for one of my projects and right now when a
user clicks the link /invitations// I get the invitation object
and store it in request.session['invitation']. Then I redirect to /
accounts/new/ if request.session['invitation'] is None then I produce
and error if not I present
Okdoke, well here's an inventive workaround for now, hope this helps
someone else.
calculated_items = Item.objects.filter(cart=self).extra(select=
{'calculated_price': 'SUM(unit_price * quantity)'})[:1]
return calculated_items[0].calculated_price if calculated_items.count
() > 0 else 0
I should
On Nov 5, 8:42 pm, Graham Dumpleton
wrote:
> On Nov 5, 5:49 pm, Jason wrote:
>
> > I have 2 projects, and I want to visit project1 at:http://localhost:8080/,
> > and visit project2 athttp://localhost:8088/.
> > I am not sure if there is a way to do it, but I really need it. I
> > really apprec
You won't be able to use a GenericForeignKey in this situation, but
you could write a helper method and define a property to affect
something similar. For example:
class ModelTwo(models):
model_one = models.ForeignKey(ModelOne)
object_id = models.PositiveIntegerField()
def get_content_o
Dear Graham,
Thank you for your time!
The problem is solved after I add a ServerName directive to each
VirtualHost section.
Thanks,
Jason
On Nov 5, 5:42 pm, Graham Dumpleton
wrote:
> On Nov 5, 5:49 pm, Jason wrote:
>
> > I have 2 projects, and I want to visit project1 at:http://localhost:8080
I have been using Django for several years now and up until this point
have always redirected users to a login page after registering their
account, and therefore have never had a problem of this sort. I am
currently running Django v1.01 and on a new yet-to-be-released site
have a combined regist
On Thu, Nov 5, 2009 at 6:53 PM, Margie Roginski wrote:
>
> In my app, my user inputs one more more attachments and on the server
> side I am successfully getting them via code like this:
>
>for file in request.FILES.getlist('attachment'):
>a = Attachment(
>
On Thu, Nov 5, 2009 at 5:46 PM, aa56280 wrote:
>
> Also, I'd like to customize the error returned when someone tries to
> save the slug with invalid characters, such as spaces. That one
> currently says "Enter a valid 'slug' consisting of letters, numbers,
> underscores or hyphens." The terms slu
On Thu, Nov 5, 2009 at 5:38 PM, aa56280 wrote:
>
> I have a ModelForm with a slug field with unique=True. I need to make
> the error message a bit more "friendly." Is there a way to override
> the default error message? The default is: "[model_name] with this
> [field_label] already exists."
>
>
On Thu, Nov 5, 2009 at 4:10 PM, davisd wrote:
>
> Adding an extra field (calculated_price):
>
> calculated_items = Item.objects.filter(cart=self).extra(select=
> {'calculated_price': 'unit_price * quantity'})
>
> works great and the queryset items have the new calculated_price
> field.
>
> calcul
Greetings,
I've been wrestling with a very strange set of errors in Django 1.1.1
using psycopg2 as the back end, and DATABASE_OPTIONS "autocommit":
True feature.
I was looking for the right combination of options and decorators such
that Django would not automatically wrap view functions i
In my app, my user inputs one more more attachments and on the server
side I am successfully getting them via code like this:
for file in request.FILES.getlist('attachment'):
a = Attachment(
filename = filename,
m
On Nov 6, 7:34 am, Sandra Django wrote:
> Hi friends, I have a problem. I'm trying to add to User class of Django an
> attribute. For that I'm using add_to_class method. I did the following:
>
> 1. Delete from Data Base the tables: «auth_user», «auth_user_groups» y
> «auth_user_user_permiss
I don't know what changed, but updating my SVN in the last week
sometime has fixed the problem that I was having.
The dev trunk and I have a love-hate relationship :)
I would make a note to anybody reading this that if the 'add' view is
being used, you should kick off the code block with a "if
Some on Linode IRC suggests that I install ssmtp package...I followed
the instruction found here
http://tombuntu.com/index.php/2008/10/21/sending-email-from-your-system-with-ssmtp/
and reboot the servers...everything works great now.
On Nov 5, 12:19 pm, mm wrote:
> Hello,
>
> I am using Djang
You can use the same method that django uses I've tried it and it
works
in your model inside the class for example users and after the
definitions of the fields
write
def save(self):
raw_password = self.password
import random
algo = 'sha1'
salt = get_hexdigest(alg
Also, I'd like to customize the error returned when someone tries to
save the slug with invalid characters, such as spaces. That one
currently says "Enter a valid 'slug' consisting of letters, numbers,
underscores or hyphens." The terms slug doesn't make sense to some of
my users.
On Nov 5, 4:38
Why do you want to split it across two models?
On Nov 5, 9:25 am, bruno desthuilliers
wrote:
> Hi all
>
> I have this pattern:
>
> class ModelOne(models):
> content_type = models.ForeignKey(ContentType)
>
> class ModelTwo(models):
> model_one = models.ForeignKey(ModelOne)
> object_id
I have a ModelForm with a slug field with unique=True. I need to make
the error message a bit more "friendly." Is there a way to override
the default error message? The default is: "[model_name] with this
[field_label] already exists."
--~--~-~--~~~---~--~~
You rece
Hi friends, I have a problem. I'm trying to add to User class of Django an
attribute. For that I'm using add_to_class method. I did the following:
1. Delete from Data Base the tables: «auth_user», «auth_user_groups» y
«auth_user_user_permissions».
2. In models.py of «main» aplication I pu
dk wrote:
> I am making a site to contain "examples" that may be tagged with
> "tags". I am wondering how to count the uses of the tags (for making
> a tag cloud, for example).
Your best bet for tags is to use django-tagging:
http://django-tagging.googlecode.com/
That app provides just about e
Hi Guys,
I have two models, with a foreign key from the first two the second, and I
need make a kind of group py and count, I try this but don't works:
a =
Congresista.objects.filter(profesion=3).annotate(Count('partido_politico')).distinct('partido_politico')
'partido_politico' is the foreignke
Adding an extra field (calculated_price):
calculated_items = Item.objects.filter(cart=self).extra(select=
{'calculated_price': 'unit_price * quantity'})
works great and the queryset items have the new calculated_price
field.
calculated_items.aggregate(Sum('calculated_price'))
raises an Excepti
I used a cheap hack. The comment object has an ID of the item that the
comment was attached to. You can then give users a link to that to
click, or auto-redirect them to that. If you use slugs, you can create
a view that catches that ID, grabs the slug, and thus redirects them
again to the origina
On Thu, Nov 5, 2009 at 2:30 PM, David wrote:
> Is it possible to redirect upon successful comment submission to the
> previous page when using Djangos built in render_comment_form ?
>
I'm not sure if there's a more direct way, but you can override the
"comment_done" named URLconf with a custom v
Hello
Is it possible to redirect upon successful comment submission to the
previous page when using Djangos built in render_comment_form ?
Thank you
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" gro
Thanks for the replies! I ended up creating a python package in the
site's directory.
Abhik
On Nov 5, 8:35 am, bruno desthuilliers
wrote:
> On 5 nov, 16:52, apramanik wrote:
>
> > Hey all,
>
> > If I have some utility functions I want to share amongst my apps,
> > where should they go? Thanks!
31 matches
Mail list logo