please help:
i´m trying to have just ONE table for my app on a different host. all the
other tables should be on dreamhost (auth, packages ...). so, when trying to
install my newapp, i get an error like "table .packages not found". i
basically need 2 setting files for one project (if that works).
Hi Patrick.
At the moment Django can not talk to 2 different databases.
If you need this, you might be able to get the data out of the 2nd
database via custom functions
which handle the db calls directly, or possibly futz with django/core/db
regards
Ian
but I would wait 12-24 hours until the ex
How do I specify default value for a form field, which maps to a
foreign key as Poll.submitted_user shown below, with manipulator, in
particular AddManipulator? I couldn't find relevant information from
the django-users archive, at least searching with keywords:
manipulator, default didn'
Adrian, thank you for your reply.
I checked http://www.djangoproject.com/documentation/sessions/ and you
say:``Session dictionary keys that begin with an underscore are
reserved for internal use by Django. ``
So, I expect some to be exist. Is there a list of such session
dictionary keys that beg
Hello Cheng Zhang!
On Tue, 22 Nov 2005 19:36:52 +0800 you wrote:
> To add a new poll, when I login as a user, say 'test1', I want the
> 'submitted_user' form field (render as a pulldown list) to be
> selected as 'test1' automatically. It would be better if this field
> is disabled or hidden
Thanks. Guess I should get the habit of searching wiki, esp. the
cookbook.
On Nov 22, 2005, at 9:21 PM, Grigory Fateyev wrote:
http://code.djangoproject.com/wiki/CookBookManipulators there are two
ways to do this stuff.
On 11/22/05, PythonistL <[EMAIL PROTECTED]> wrote:
> Adrian, thank you for your reply.
> I checked http://www.djangoproject.com/documentation/sessions/ and you
> say:``Session dictionary keys that begin with an underscore are
> reserved for internal use by Django. ``
> So, I expect some to be ex
Hi,
Based on the following model
from django.models.auth import User
class PolicyCategory(meta.Model):
name = meta.CharField(maxlength=100);
users = meta.ManyToManyField(User, blank=True)
class META:
db_table = 'intranet_policies'
module_name = 'policies'
ve
What is the Django Way (tm) to paginate complex queries with
user-controlled parameters? That is, if I want to paginate the results
of a foos.get_list({'lots': 'of_complex', ['junk': 'in here']}) where
the query terms are submitted via form, how should I go about that
while maintaining the user-p
On 16/11/05, Maniac <[EMAIL PROTECTED]> wrote:
> Oracle has 'rownum' - a virtual field representing the ordinal number of
> a row. So you can do this:
>
> SELECT id, name FROM table where rownum<=5;
This specific issue is covered in the patch, but just for reference,
the 'gotcha' with rownum is t
I spotted this on the Dallas craigslist:
"""
Pegasus News is looking for a Python programmer -- better yet for you
and us if you're versed in Django -- to help with some light
programming/tweaking on pre-existing content management system.
"""
http://dallas.craigslist.org/art/112889763.html
Adr
Gwyn Evans wrote:
This specific issue is covered in the patch, but just for reference,
the 'gotcha' with rownum is that it's applied before any ORDER BY
clause is applied
I know :-). That's why I didn't use ORDER BY in my example :-).
, so in most cases, it's not going to do what you
want!
On 11/22/05, plisk <[EMAIL PROTECTED]> wrote:
> >>> pc.get_user_list(groups__name__exact='Tech')
> Traceback (most recent call last):
> File "", line 1, in ?
> File "/usr/lib/python2.4/site-packages/django/utils/functional.py",
> line 3, in _curried
> return args[0](*(args[1:]+moreargs), *
Adrian Holovaty wrote:
On 11/22/05, plisk <[EMAIL PROTECTED]> wrote:
pc.get_user_list(groups__name__exact='Tech')
Traceback (most recent call last):
File "", line 1, in ?
File "/usr/lib/python2.4/site-packages/django/utils/functional.py",
line 3, in _curried
return args[0](*(args[1:]+m
limodou wrote:
NewEdit is a Python Editor base on wxPython. I'm learning django
recently, and I'm beginning develop some extension about django in
NewEdit. The process is continuing. I'v finished something like these:
* django project wizard(need install it) -- you can create a django
project
I think that is time for the admin have some statistics usage of the
applications. Or maybe another app include with the package.
Unfortunately, I believe they're necessary. My exact code is a list of
radio inputs, in template lanaguage and radio buttons use the input
name as a way of grouping.
My Models would be:
class OptionSet(Model):
name = CharField()
class Option(Model):
name = CharField
option_set = Foreig
On 11/22/05, Kevin <[EMAIL PROTECTED]> wrote:
> {% for option_set in item.get_options %}
>
> {{option_set.name}}
> {% for option in option_set.get_choices %}
> value="{{option.id}}"> {{option.name}}
> {% endfor %}
> {% endfor %}
In this example, there's nothing forcing you to use the square
brac
Use the (undocumented) django.core.paginator class:
http://code.djangoproject.com/browser/django/trunk/django/core/paginator.py
You can see an example on how it works in:
http://code.djangoproject.com/browser/django/trunk/django/contrib/admin/views/main.py
in the change_list function, the one t
I understand, and that's what I'm really doing at the moment, but I was
just curious if there's a better way to retrieve these POST values than
just:
options = []
for name, value in request.POST.items():
if(name.startswith("option")):
options.append(value)
On 22 Nov 2005, at 17:43, Luciano Rodrigues da Silva wrote:
I think that is time for the admin have some statistics usage of the
applications. Or maybe another app include with the package.
Stats is a very obvious application for Middleware. I bet you could
do something very, very cool alo
I've already dug into the paginator code. I was hoping there was a way
to do it without having to munge query parameters by hand every time I
get a new page. I thought my solution was bad but that code in the
admin interface is pretty much the same sort of edge-case-ridden sin
against nature.
M
Well, I think I am not the best person to do this, but I can try. Can
you gime some sugestion about the data the stats need to have. I think
number of user in days, weeks, months, type of browser, geographic
location, ...
Is this standard practice? I'd been having a tough time using some
parts the template language (in particular ifequals, many of the filter
and string functions) until I discovered that some of the template
"magic" doesn't work correctly unless I "pre", repr(o) objects within
the code of my view (
On 11/22/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> What is the Django Way (tm) to paginate complex queries with
> user-controlled parameters? That is, if I want to paginate the results
> of a foos.get_list({'lots': 'of_complex', ['junk': 'in here']}) where
> the query terms are submitt
On Tue, 22 Nov 2005 07:09:06 -0800 [EMAIL PROTECTED] wrote:
> What is the Django Way (tm) to paginate complex queries with
> user-controlled parameters? That is, if I want to paginate the
> results of a foos.get_list({'lots': 'of_complex', ['junk': 'in
> here']}) where the query terms are submi
On Tue, 22 Nov 2005 10:37:08 -0800 Kevin wrote:
>
> I understand, and that's what I'm really doing at the moment, but I
> was just curious if there's a better way to retrieve these POST
> values than just:
>
> options = []
> for name, value in request.POST.items():
> if(name.startswith("opt
I decided to try writing a generic array converter as a middleware:
import re
class ParamsMiddleware:
patt = re.compile("^([a-zA-Z_]\w*)\[\(d*)\]$")
LARGE_INT = 2**30
def process_request(self, request):
if(request.POST):
post = requ
> Great job! I was waiting for something like this!
>
Thanks. :)
--
I like python!
My Blog: http://www.donews.net/limodou
NewEdit Maillist: http://groups.google.com/group/NewEdit
Looks like Django is starting to occupy the fields of news
organization, beyond the stronghold of World Online. :-)
Hopefully we will see such signs all over the world in near future,
indicating the rapid occupation/adaptation of Django, at least as a
competent counterpart of Rails.
- Che
That's what we need.
2005/11/23, limodou <[EMAIL PROTECTED]>:
>
> > Great job! I was waiting for something like this!
> >
> Thanks. :)
>
> --
> I like python!
> My Blog: http://www.donews.net/limodou
> NewEdit Maillist: http://groups.google.com/group/NewEdit
>
--
欢迎访问我的小站: http://www.2tuzi.com
sorry for the delay, got buried under a ton of work :(
I haven't applied any patches to it (well except a couple of filters
that I put into the default filters file).
I switched to file based cache, results are below, sadly no great improvement.
It may help to know that I'm running openload wit
On 11/15/05, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote:
>
> On Nov 15, 2005, at 5:09 PM, oggie rob wrote:
> > But when I get to the
> > template, no scalable option is obvious. I would expect something
> > like:
> > (% for field in form.fields %)
> [snip]
>
> As of revision [1253] this is now po
For comparison I ran openload against my blog page
(http://lazutkin.com/blog/). It is 38012 bytes at the moment. I don't know
how many db transactions required to build it, but with cache it's a moot
point anyway. Incidentally I use "file:" cache. The site is hosted with
DreamHost --- cheap co
That's what the original motivation for it was, rapid prototyping. But
also because for a specific application I needed a
richly-relationshipped (tm) model, and one that does some heavy
processing on many related objects, and one (with its data) that can be
easily adapted and evolved. I thoug
35 matches
Mail list logo