Aljosa,
The docs are really good. (
http://www.djangoproject.com/documentation/modpython/
) I can attest that you should definitely use prefork instead of
worker. I was getting random crashes on our server until I realized
that one of my admins installed worker. Switching to prefork
Tim,
The django module just needs to be on the python path, which you can
set in the mod_python configuration.
So you could do something like:
/My Site
/myproject
/site-packages
/django
Shouldn't be to difficult as long as you put both /My Site/myproject
Kristian,
I had a similar problem when I needed to send some ASCII emails. I
have a snippet at does a translation of unicode characters to close
ASCII approximations if it is helpful:
http://www.djangosnippets.org/snippets/588/
Corey
On Feb 5, 2008, at 3:48 PM, Kristian Øllegaard wrote:
I recommend this approach because it works seamlessly when
transferring between production and development:
1. Put your static files in the repository (assuming you are using one)
2. On the production server, add these lines to the site config
so this doesn't get used except on
mOne,
I use a system that uses the main urls.py and a change on the apache
site config.
This allows me to have all the files in one repository and see it when
I'm using the development server,
but use apache to deliver the files when on the production server.
in urls.py you put in:
(
I ported part of the Geo Street Address from the perl module:
address_regex.py
from geocode.address_dicts import *
STREET_TYPE_REGEX = "|".join(STREET_TYPES.keys()) + "|" +
"|".join(STREET_TYPES.values())
STATE_REGEX = "|".join(STATE_CODES.values())
DIRECTIONS_REGEX =
I see that Adrian is going to be at Web 2.0 next week. Anyone else
going to be in town for a Birds of a Feather?
Thanks,
Corey
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to
Mike,
What comes to mind is an intermediary table, a Many-to_many table.
Design 1:
This design depends on a separate Model that lists the available
plugins, but would require a manual join of the plugin_table_id to
the appropriate model/table. The plugin model tells you which type of
link
What exact command did you type?
On Jan 22, 2007, at 5:44 AM, [EMAIL PROTECTED] wrote:
>
> Traceback (most recent call last):
> File "manage.py", line 11, in ?
> execute_manager(settings)
> File
> "/usr/local/lib/python2.4/site-packages/django/core/management.py",
> line 1447, in
Hello,
I've found that each application should be specific in its
functionality. How you organize it really depends on the type of
project. A simple blog might only be one application. Our intranet
site has 7, including a settings.py file, if necessary.
I think how coupled or decoupled
Thanks for the tip, I am using os.path.splitext() !
I think somehow the problem lies with psycopg and it's "auto-quoting"
feature.
I'm not sure how it figures out what needs to be quoted and what
doesn't.
Thanks for the help, RajeshD!
Corey
On Oct 12, 2006, at 4:07 PM, RajeshD wrote:
>
You, know I just found that utility last week.
As far as just doing an os.spawn*, my recollection is that if your
process ends, the spawned process ends, even if you are not waiting
for it to return.
In the case with a web server, as soon as you return from your view,
the spawned process
I wrote a daemonize method that can be called by the view to spawn a new process that executes your code.It is part of this thread:http://groups.google.com/group/django-users/browse_frm/thread/b36f4ca10a424161/c5131410e5d548b1?lnk=gst=daemonize=2#c5131410e5d548b1I'm happy to give you any other
, gabor wrote:
>
> Corey Oordt wrote:
>> I'm not sure I can appreciate why you would require a URL to have a
>> query string. It seems to go against the anti-crufty URLs that Django
>> is trying to avoid.
>>
>> Query strings, if I understand them correctly are
Believe it or not, latin1_swedish_ci is a default collation for MySQL.
I recommend using PHPMyAdmin. It is the easiest way to see the
collations and change the collations. (but you have to use PHP :( )
You can use the MySQL Administrator GUI but it is a pain as you have
to do a lot more
You can change to collation of your MySQL tables by table and by
field. If you do it by table, all new fields are of that collation.
If you already have fields of a collation, you will have to change
all of them.
I used PHPMyAdmin to do it as the interface is nice and simple. You
mthorley:
I think you just need to override the save() method of your model.
You can do all the processing you need before it's saved.
Corey
On Sep 5, 2006, at 10:21 AM, mthorley wrote:
>
> Thanks for the tip Nate!
>
> Does any one know what method receives the data from the form when it
>
Take a look at: http://www.djangoproject.com/documentation/models/m2m_and_m2o/CoreyOn Aug 29, 2006, at 12:15 PM, Siah wrote:Hello,Given this model:class Person(models.Model): name = models.CharField(maxlength=200) children = models.ManyToManyField('self')I can do:
Charles,I've always seen a Project as a Site. Although there are situations that that may not be true, for most of us, it probably is.I've seen an App as a grouping of functionality. Examples would be Blog, Forums, News, Gallery, etc.Good design practices should keep as much internal within each
I've never done it before, but here are some places to look:http://code.djangoproject.com/ticket/1541http://www.rossp.org/blog/2006/jul/11/sending-e-mails-templates/CoreyOn Aug 26, 2006, at 8:59 PM, The Rem wrote:Hi,I am using the template to build the email content. I included linksin it but the
Dirk,
I think that it's a great option. It doesn't advocate a specific
framework or method even. AJAX views will be very similar to html
views and I agree that having some generic views for AJAX is a great
addition to the Django community, even if it doesn't get added to the
core.
Corey
Stewart:Take a look at http://www.djangoproject.com/documentation/forms/ for more on creating forms, and simplifying the process.You will need to have to figure out how you want to handle the item listings. You will either have to have a static set of items or use some fancy _javascript_/DHTML to
I think you need to include django.core.exceptions
And I think that the exception is ObjectDoesNotExist
Corey
On Aug 21, 2006, at 4:24 PM, Waylan Limberg wrote:
>
> I figured this out, thanks to a suggestion in another thread. It seems
> I was misunderstanding something about how
I wrote some code that might help you out: it in the thread:http://groups.google.com/group/django-users/browse_frm/thread/b36f4ca10a424161/c5131410e5d548b1Depending on how you spawn a process, it can either wait for each, or become a child process.Calling the daemonize method with the appropriate
I think I had this problem, at least it feels very familiar, and I do
some process forking.
I think that the problem is using the same connection more than once.
I think that the cursor is being closed and then being used again.
I took the habit of creating a new cursor and specifically
I thought a change was made in the generic date views to show only
future events. It is the allow_future parameter, I believe.
Corey
On Aug 16, 2006, at 1:38 PM, [EMAIL PROTECTED] wrote:
>
> I've got an app for user events, using the generic list view to
> display
> them. So far , so
I was sorting by subject and it was doing an ok job. Thanks for
pointing this out.
I always feel stupid when there is such an obvious feature that I
never noticed...
Corey
On Aug 15, 2006, at 10:04 PM, Sean Schertell wrote:
>
> Hey guys,
>
> I hope I'm not the only schmuck to arrive so
Ian,Try: http://www.maxmind.com/app/geolitecityCoreyOn Aug 15, 2006, at 8:17 PM, Ian Holsman wrote:Hi. does anyone know of a python module/interface to allow me to determine what state a given IP# is in? (Open source preferably) -- Ian Holsman [EMAIL PROTECTED] http://VC-chat.com It's what the
Don't store your .pyc in the repository.
Create a settings.default.py and store it in the repository.
Each user can then maintain slightly different settings
On Aug 15, 2006, at 6:50 PM, alex kessinger wrote:
>
> I want to thank you for all your anwsers it has been very helpfull. I
> also
I'm probably not the best person to be answering this, but I do have an internal subversion repository.If you don't have a working subversion server, follow the instructions at: http://svnbook.red-bean.com/nightly/en/svn.serverconfig.httpd.html(Since it's an internal machine, I just use basic
One idea is to create a package that would contain files of your
queries.
Each file could just be have an assignment : QUERY = """ """
You could then import them, like : from queries import update_this
and access it by update_this.QUERY
Corey
On Aug 11, 2006, at 3:05 PM, Maciej Bliziński
David,Not sure if this helps, but the only way I found (using postgresql) was to turn on query logging in postgresql. Then you truly see everything that is passed to the database.I'm not familiar with Oracle at all, but I'm sure it has a way to do that.Corey OordtOn Aug 11, 2006, at 8:38 AM,
I may be showing my ignorance of Django and python here but:
in MySQL there is an aggregate function GROUP_CONCAT that will do
precisely what you want. There is a PostgreSQL library that adds the
functionality as well.
I'm still getting used to the ORM is Django, so I'm not sure how you
Martina,
Mostly because I'm new to python and in my research no one mentioned it!
You are right, this does look like a better fit.
Live and learn!
Corey
On Aug 6, 2006, at 12:40 PM, oefe wrote:
>
>
> Corey wrote:
>> Hey everyone,
>>
>> I've seen references and questions in previous posts
Istvan,
Thanks for the code. I can't wait to dive into it.
Corey
On Aug 4, 2006, at 12:12 AM, Istvan Albert wrote:
>
> Hello All,
>
> For those interested here is an AJAX based demo application using
> django, developed with two different javascript libraries: Prototype
> and with MochiKit
>
Thanks, Andy. I'll give that a try!
Corey
On Jul 18, 2006, at 9:35 PM, Andrew wrote:
>
> Here's how I did it for a similar situation I had.
>
> class MyCategory(models.Model):
> category = models.CharField(maxlength=50)
> parent_category = models.ForeignKey('self', blank=True,
>
Man I hate silly errors!
Thanks so much Rajesh! (It happens to be my first view, the generic
views got me spoiled!)
Corey
On Jun 22, 2006, at 9:10 PM, [EMAIL PROTECTED] wrote:
>
> Ah..I should've noticed this earlier, but you are missing the
> mandatory
> first argument 'request' in your
Nope, I get the same thing with:
def select_date_for_pub(pub=None, template_name=None):
But, interestingly, if I switch the arguments to:
def select_date_for_pub(template_name=None, pub=None):
I get the same error, but with template_name instead of pub!
Any ideas?
Thanks,
Corey
On Jun
Here is the view:
def select_date_for_pub(pub, template_name=None):
"""
Given a publication code, generate a view of a calendar with
dates that can be selected
"""
date_list = Publication.objects.get
It doesn't happen in the view. That's the strange thing. Here is the full error:Request Method: GETRequest URL: http://localhost:8000/reservations/pubs/42/Exception Type: TypeErrorException Value: select_date_for_pub() got multiple values for keyword argument 'pub'Exception Location:
Hey All!
I'm trying to debug a view but I'm getting an error that I can't trace.
The error is:
TypeError at /reservations/pubs/42/
select_date_for_pub() got multiple values for keyword argument 'pub'
but the local vars in the error screen shows:
callback_kwargs {'template_name':
Thanks Malcolm,It's done and there!http://code.djangoproject.com/wiki/ColumnizeTagCoreyOn Jun 16, 2006, at 9:42 AM, Malcolm Tredinnick wrote:Hi Corey,On Fri, 2006-06-16 at 09:07 -0400, Corey Oordt wrote: I have no idea if this is the right place to post such a thing, but in an effort to give
I have no idea if this is the right place to post such a thing, but
in an effort to give something back to the community, I would like to
post a template tag I developed:
Comments are appreciated,
Thanks,
Corey
--
"Tags used by the
I'm going to bow my head in shame
I was SURE that I put it there! Thanks for making me look ivan!
Corey
On Jun 15, 2006, at 5:19 PM, [EMAIL PROTECTED] wrote:
>
> make sure your application exists in the project's settings file
> INSTALLED_APPS
>
>
> >
Don,Thanks for the reply. When I put in {% load reservations.reservationtags %} I get:'reservations.reservationtags' is not a valid tag library: Could not load template library from django.templatetags.reservationtags, No module named reservationtagsAny other ideas?Thanks,CoreyOn Jun 15, 2006, at
I have MacBook, and although it was a challenge to get everything up
and running, I ended up using darwinports to install apache 2, mysql
5 and python 2.4.
Everything is working really well now
Corey Oordt
On Jun 6, 2006, at 9:36 PM, Greg Harman wrote:
>
>
> Oliver Kiess
46 matches
Mail list logo