my bad :). didn't really get his gist. just switched to wsgi myself.
On Nov 25, 11:00 pm, Graham Dumpleton
wrote:
> On Nov 26, 5:04 pm, Some Guy wrote:
>
> > WSGIScriptAlias /test
>
> > should be
>
> > WSGIScriptAlias /
>
> > not really sure what
I don't know your problem in detail, but as alternative
I recommend read about twisted framework. If you work
with xmlrpc servers and you need in call remote methods,
then it help you. Simple exmaples:
http://twistedmatrix.com/documents/current/web/howto/xmlrpc.html
--
You received this message
well, I've looked into it more, and it seems that the max_num argument
to the modelformset_factory constructor is the best way to go. If it
works i'll post it here for those who might find this thread from
google.
On Nov 25, 8:46 pm, Some Guy wrote:
> I'm having an issue
On Nov 26, 5:04 pm, Some Guy wrote:
> WSGIScriptAlias /test
>
> should be
>
> WSGIScriptAlias /
>
> not really sure what you mean by suburl...
No it shouldn't. What he was doing with the directive is correct.
Provided they are using 1.0 or later, urls.py should be setup
WSGIScriptAlias /test
should be
WSGIScriptAlias /
not really sure what you mean by suburl...
On Nov 25, 9:47 pm, Amit Sethi wrote:
> Hi , can somebody tell me how i should configure mod_wsgi on a suburl I want
> to set a django project on
>
> domain.com/test/
>
>
Hi , can somebody tell me how i should configure mod_wsgi on a suburl I want
to set a django project on
domain.com/test/
so my urls.py at present looks like :
urlpatterns = patterns('',
(r'^(.*)', 'sttp.views.serve'),)
and the wgi scrip alias is WSGIScriptAlias /test
I'm having an issue trying to create pagination with a modelformset.
so far I have...
SubFormSet = modelformset_factory(Submission, can_delete=True,
extra=0, form=PricingForm)
...
objs = Submission.objects.all()
formset = SubFormSet(queryset=objs) <-overriding the basic
queryset
On Wed, Nov 25, 2009 at 11:23 AM, Tim Valenta wrote:
>
> I had not realized that models.permalink depends on the `sites`
> application. I had removed this for the sake of simplifying the admin
> options as much as possible for those who would use it. But, having
>
I have a (simplified) model
class Incident(models.Model):
title = models.CharField(max_length=128)
when_reported = models.DateTimeField(auto_now_add=True)
reporter = models.ForeignKey(User)
Where User is from auth. When used with a ModelForm, this creates a popup
button with a
On Wed, Nov 25, 2009 at 1:54 AM, Hinnack wrote:
> Hi Karen,
>
> thanks for your reply
>
> it means so far I must do a:
> qs = search[query].encode('iso-8859-1')
>
> before I add the qs to a Q object of a queryset. Only in this case I get
> results.
>
> the full
Hi all,
The software we're developing uses sphinx search engine whose index
updating process doesn't play well with django's unittest setup, as a
result we have to move all the tests from django to nosetest. I found
one of your test talk on djangocon and you mentioned that we could
'instantiate
i have this code in my tests.py:
from models import *
and in the models.py I have a signal handler and register it with
post_save.connect( post_save_note, sender=Note )
and when i run test with ./manage.py test main
I found the signal handler was registered twice and executed twice,
and I
I have a TaskForm that contains a DateField. If I create my form from
an instance of a Task, I find that when I render the DateField field,
the value argument to render() is an actual datetime.date object.
However, if I create my form from POST data, the value argument to
render() is just a
On Wed, Nov 25, 2009 at 4:10 PM, Alex Dong wrote:
> Hi all,
>
> During the `manage.py test` process, django will automatically change
> the database from `hivemind` to `test_hivemind`, For similar reason,
> I'd like to change a file path from `sphinx.conf` to
>
I tend to find that Django's true potential bubbles up when all of the
components work together in an interdependent manner. Normally that
sounds like a bad idea (too much interdependency could make it hard to
grasp the bigger picture), but for some reason, Django comes together
very nicely as
Actually, a widget required a js file that required core.js, but did not
specify it. So I added core.js to the form's media list - but apparently it
renders the widget media, then the form media - so no good.
Your second suggestion was the best - I now just include the jsi18n and core.js
on
Thanks Tim. That's funny you just posted that because I just got done
doing that and was going to post it as solved.
Cheers,
J
On Nov 25, 1:48 pm, Tim Valenta wrote:
> I know how messed up this all seems, so I sympathize. I totally want
> to store items according
On Nov 25, 2009, at 12:39 PM, Nadae Ivar BADIO wrote:
> i'm new in django and i trying to run django on my production server
> who have debian and apache someone can please help me?
It's Centos, not Debian, but this might help:
Hi,
i'm new in django and i trying to run django on my production server who have
debian and apache someone can please help me?
Thanks
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to
I know how messed up this all seems, so I sympathize. I totally want
to store items according to a related object's name or id or whatever.
However, I'm using upload_to in a more straightforward manner, and it
seems to work out alright. Tell me if you've already tried it this
way:
class
http://code.google.com/p/django-logging/
*shrug* I haven't used it, but he's got a screen-cast about how the
thing is set up. He builds it off of built-in Python logging
modules. It looks like it provides some decorators for suppressing
logging output on methods, etc. Might be worth the time
Dear Django Community,
I am curious if anyone has built some middleware to log all request/
response objects & possibly view & exception calls. I could do this
myself easily, but, I would like to not reinvent the wheel.
Thank you for your time.
-Sean Neilan
--
You received this message
I have a website running on www.mydomain.com. It is not a django site.
It has a registration page which is not a django template/form.
I have django app running on app.mydomain.com
I want the registration page on www.domain.com to use django views and
models on app.mydomain.com to save
Well, you've got a couple of options. One is easiest and most
straightforward, but could impact performance. The second is a little
bit more work, but would limit the ordering to only taking effect on
that one form.
The first way is to use the Meta option `ordering = ('fieldname',)`,
as
On 11/25/09, Alessandro Ronchi wrote:
> I need to make my model translatable into different languages.
> Is there any simple way to handle that in a transparent manner?
> I've fround transmeta project on google, anyone is using that?
>
I'm using django-multilingual
On Wed, Nov 25, 2009 at 3:07 PM, S.Selvam wrote:
> I need to show some data as a chart.
>
> I would like to achieve a high quality rendering.
>
> Is reportlab or matplotlib enough ?
reportlab allows you to generate PDFs, which can be as high quality as
you want; but if
Hah.. wow. I'm glad you figured that out. I haven't used pth files
in any serious manner before, so I totally wasn't thinking about that.
Best of luck to you!
On Nov 25, 1:08 pm, Stodge wrote:
> What do you know - it's my .pth file. My Mercurial hook is in /home/
>
It looks to me like the Media class managing the files stores JS files
in a Python list, so order should be remembered. I can see the issue
though if a *widget* has critical "core" media, which isn't rendered
until after other bits of media already went out the hatch.
Is it a widget that has the
Hi all,
This is my first post here andi am new to django.
I need to show some data as a chart.
I would like to achieve a high quality rendering.
Is reportlab or matplotlib enough ?
I hope you can direct me on track.
--
Yours,
S.Selvam
Sent from Bangalore, KA, India
--
You received this
What do you know - it's my .pth file. My Mercurial hook is in /home/
mike/hooks and I have a path file /usr/lib64/python2.5/site-packages/
hooks.pth defined, which contains:
/home/mike/hooks
If I comment this line out, I can do ./manage.py shell. If I uncomment
this line, manage.py doesn't work
I have configured a modeladmin which uses the filter_horizontal
feature. I would like to be able to order left side of this feature by
name instead of the default (which I believe is by id). Is this
possible? I see how to use "ordering" in the display for change lists,
but not sure how to apply
I can successfully start python and import the settings file. My
settings file only imports os.
On Nov 25, 3:01 pm, Tim Valenta wrote:
> Well, does it have errors? If you navigate to the directory where
> it's kept, can you enter the python shell and do "import
Well, does it have errors? If you navigate to the directory where
it's kept, can you enter the python shell and do "import settings"?
Given all of the trouble you're having, can you verify that it imports
successfully? The settings module itself should have no immediate
dependencies, unless
It fails even if I delete the hg and .hg directories now. It worked a
few times before, but no longer. Odd.
> /usr/lib/python2.5/site-packages/django/core/management/base.py(194)run_from_argv()
-> handle_default_options(options)
(Pdb) print options
{'pythonpath': None, 'verbosity': '1',
The latest is that the media collection strategy apparently has no concept of
order dependence when specifying or loading javascript and in my form it seems
to be sticking core.js somewhere in the middle which contains addEvent which is
required by something being loaded sooner and thus it
It's meant to be done through an SVN checkout, since that's the format
that the Django development repository is kept.
If you haven't got SVN, I'd start there. If you're on Windows, the
"nicest" solution is "tortoisesvn", which integrates pretty simply
into the Windows shell for easy right-click
I usually don't find myself writing too many redundant views, since
the built-in admin site does so much of that automatically. Then I
just build views specific to the site's public UI. I still find it
curious that you would find yourself recreating said urls. I run a
company database through
Interesting.
I take it that hg and hg/hooks both have __init__.py files? Otherwise
I'm not sure how django sees them. Unless hg is also an app, listed
in installed apps and has a models.py file. That is, I don't believe that
the name 'hg' has any special meaning to django.
You might try
And now it doesn't work again.. what is going on???
On Nov 25, 2:18 pm, Stodge wrote:
> I think I have it. I'm developing a Mercurial hook in /var/www/sites/
> project/hg/hooks. If I delete this directory it works. If I recreate
> the directory and the hook, it fails.
I think I have it. I'm developing a Mercurial hook in /var/www/sites/
project/hg/hooks. If I delete this directory it works. If I recreate
the directory and the hook, it fails. Guess Django is getting confused
by its existence.
On Nov 25, 12:56 pm, Bill Freeman wrote:
> Does
Permissions are correct, __init__.py exists. Something is screwing the
filesystem up. I blew away the old environment and re-created it and
it worked. After a short while it broke again. I'm using Mercurial to
manage source control for the environment; maybe that is interfering.
On Nov 25, 12:56
I am interested in applying patch 7028, but I don't know what to apply
it to.
Any help would be appreciated.
Paul Hide
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To
I'm trying to access the current instance of ScreenShot related to the
current instance of WebProject, in order to get the slug field of
WebProject to use as a upload directory but I don't think I can
because there's no primary key in the db yet. I need to call
change_upload_to when the instance
It is mostly a waste of time and busy work.
I like the rails strategy of /controller/action/id
I'd like to define a similar one time couple rules in urls.py
Something like /application/view/id where view is the name of the function in
the views.py in that application.
Anybody got a little
Tim,
Thanks for the response. That is what I was looking for. I got it
working now, just needed a little hint. Found the User Admin stuff (in
contrib) and was able to follow that.
As far as the "id" columns.I adapted Django to an existing system
so that is why the models don't necessarily
FYI:
Trying to run unittests.
Using the .only() method on a queryset causes the content types
machinery to find and attempt to use a model with Deferred attributes.
This function (with print and verbosity added):
def update_contenttypes(app, created_models, verbosity=2, **kwargs):
"""
Tim,
Thanks. That's exactly the kind of simple example that I was looking
for of how to bridge the two worlds of Django templates and Ajax. BTW,
me living in a major crucible of brass band music, I'm completely
fascinated by your site and brass band culture in England -- of which
to date I was
Does /var/www/sites/project/__init__.py exist?
Are the files and directories readable, and the directories searchable
(excutable)
by the user as which the webserver runs?
On Wed, Nov 25, 2009 at 12:21 PM, Stodge wrote:
> If I break the code out and write a simple python script
Did that, filed it. Ticket #12264
-Todd Blanchard
On Nov 25, 2009, at 8:01 AM, Tim Valenta wrote:
>
>
> On Nov 24, 10:32 pm, Todd Blanchard wrote:
>> Yep, I solved this by ripping and copying some code out of admin/sites.py
>> and adding a url conf for it.
>>
>> It
Uh-oh: when did this break?
./manage.py shell
Error: Could not import settings 'indigo.settings' (Is it on sys.path?
Does it have syntax errors?): No module named settings
On Nov 25, 12:21 pm, Stodge wrote:
> If I break the code out and write a simple python script that
I'm a bit confused on a few points here. The upload_to field
attribute should be atomic to the imagefield - it doesn't rely on
related models.
your change_upload_to creates a new screenshot - but doesn't connect
it to the current WebProject instance. Is that what you are trying to
do?
s =
You could attempt to conditionalize this on browser version.
On Wed, Nov 25, 2009 at 10:14 AM, Tom Evans wrote:
> On Mon, Nov 23, 2009 at 3:57 PM, Benjamin Wohlwend
> wrote:
>>
>> Hi,
>>
>> currently, when a form in the admin has collapsed
If I break the code out and write a simple python script that only
contains:
import sys, os
sys.path.append("/var/www/sites")
from project import settings
from django.core.management import setup_environ
setup_environ(settings)
Even this doesn't work yet as far as I can tell, it should. Any
> I don't know what to replace XXX with, I know it's a db_field
> but I don't
> know how/where to get it from.
AutoFields are the auto-incrementing primary key of your model. By
default, your models get an automatic "id" attribute, which is what
this is. Django frequently deals with the raw
In most cases, any string field should be allowed to be blank, and can
easily survive WITHOUT "null=True". As stated before me, this is
preferable. For instance, you asked about FileField, among others.
This is perfectly fine to only use "blank=True".
You'll primarily only be using "null=True"
I've realised I can't inherit from RelatedFieldWidgetWrapper because I
want to override __init__ so I've copies the entire class an made a
few changes. Still need to know what to pass in for rel.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
Thanks again.
On Nov 25, 4:00 pm, Javier Guerra wrote:
> On Wed, Nov 25, 2009 at 10:42 AM, Jamie Pittock
> wrote:
> > Rolando, thanks. Both your and Javier's solutions work. Do they both
> > do the same think in different ways? Is one way better
Note that url pattern's aren't required to have names, so you can't capture
statistics on unnamed urls patterns in apps that you want to use unmodified.
If, on the other hand, you just want to collect statistics on url patters which
are "under your control", and thus can be required to have
I want the same add new functionality as model foreign key select
boxes in admin, there the select widget is passed through
django.contrib.admin.widgets.RelatedFieldWidgetWrapper to add the
additional html (image, links etc).
The __init__.py takes the admin_site instance, I want this
I'm completely confused. I have a Django environment installed in /var/
www/sites/project, which is accessed using mod_python/Apache. I want
to access the Django environment from a script - actually a Mercurial
hook. So I added this to my hook:
sys.path.append("/var/www/sites")
I thank you, Karen, for the pointer on that user-issue I had :)
For the sake of putting this information on the same thread, I wanted
to make note of the following:
I had not realized that models.permalink depends on the `sites`
application. I had removed this for the sake of simplifying the
> Thanks Karen. Is annoying sometimes when you see people don't bother
> reading past the single mod_wsgi page on Django site even though I put
> disclaimers at front to try and encourage people to do so without
> making it too blatant that what I wanted to say was 'STOP BEING LAZY
> AND GO READ
On Nov 24, 10:32 pm, Todd Blanchard wrote:
> Yep, I solved this by ripping and copying some code out of admin/sites.py
> and adding a url conf for it.
>
> It works now, but this should be included by default through the widget media
> dependency system. Not very slick. I
On Wed, Nov 25, 2009 at 10:42 AM, Jamie Pittock wrote:
> Rolando, thanks. Both your and Javier's solutions work. Do they both
> do the same think in different ways? Is one way better than the other
> in any way?
i guess the generated SQL is the same.
and as for
The major problem that I see with NULL in strings is that there may be databases
out there that don't distinguish between NULL and "", that is that store them
the same way.
"" is just as good in most cases. It behaves like False in python and
template tag
tests. And it has the advantage that if
Rolando, thanks. Both your and Javier's solutions work. Do they both
do the same think in different ways? Is one way better than the other
in any way?
On Nov 25, 3:40 pm, Jamie Pittock wrote:
> Well that was ridiculously easy! Thanks very much for responding
>
Well that was ridiculously easy! Thanks very much for responding
Javier.
On Nov 25, 3:25 pm, Javier Guerra wrote:
> On Wed, Nov 25, 2009 at 9:43 AM, Jamie Pittock
> wrote:
> > This is working as expected. However, the view is checking that the
>
Try
queryset=Task.objects.filter(project=project)
Regards,
On 11/25/09, Jamie Pittock wrote:
> I have two models, Project and Task. They are related via a foreign
> key in the task model.
>
> The view that displays a task is below...
>
> def task_detail(request,
On Wed, Nov 25, 2009 at 9:43 AM, Jamie Pittock wrote:
> This is working as expected. However, the view is checking that the
> project_slug is found, and also that the task_id is found, but it's
> not checking that the found task is related to the found project.
def
On Mon, Nov 23, 2009 at 3:57 PM, Benjamin Wohlwend wrote:
> Hi,
>
> currently, when a form in the admin has collapsed fieldsets, those
> fieldsets are expanded on submit. As I find this rather distracting
> and couldn't find an explanation why this should be desired behavior,
I have two models, Project and Task. They are related via a foreign
key in the task model.
The view that displays a task is below...
def task_detail(request, project_slug, task_id):
project = get_object_or_404(Project, slug=project_slug)
return object_detail(
Sorry for the bump, but does no one have an explanation for this weird
behavior? The question comes up regularly when I show the admin
interface to a client.
On 23 Nov., 16:57, Benjamin Wohlwend wrote:
> Hi,
>
> currently, when a form in the admin has collapsed fieldsets,
Hi,
use a normal form and do it like this:
shipping_character = forms.CharField(error_messages={'required': 'Your
game character name'}, label='Charakter Name')
dr.NO schrieb:
> Hi,
>
> How can i display field name using verbose_name not just field name in
> validation of ModelForm ?
>
> For
Hi Amit,
It depends how you're running.
If you're using ./manage.py testserver, then change manage.py to add in
your new path.
If you're using mod-wsgi, then change the site-wsgi.py file:
import os, sys
sys.path.append('/home/path/to/add')
os.environ['DJANGO_SETTINGS_MODULE'] =
Not quite sure what you're looking for, but I've used google maps with
django, without using GeoDjango.
http://www.brassbandresults.co.uk/map/
The script used in this page is here:
http://www.brassbandresults.co.uk/map/map_script.js
which is generated using this template:
function
2009/11/25 Gamliel Roi :
> Any idea when 1.2 will be released?
>
>
>
> On Wed, Nov 25, 2009 at 3:31 PM, rebus_ wrote:
>>
>> 2009/11/25 Russell Keith-Magee :
>> > On Tue, Nov 24, 2009 at 11:16 PM, rebus_ wrote:
Any idea when 1.2 will be released?
On Wed, Nov 25, 2009 at 3:31 PM, rebus_ wrote:
> 2009/11/25 Russell Keith-Magee :
> > On Tue, Nov 24, 2009 at 11:16 PM, rebus_ wrote:
> >> 2009/11/24 nek4life :
> >>> You
Hi,
How can i display field name using verbose_name not just field name in
validation of ModelForm ?
For egz.
shipping_character = models.CharField('Your game character name
',max_length=50) <-- field from model
if it's empty validatior error is shipping_character - field is
required
2009/11/25 Russell Keith-Magee :
> On Tue, Nov 24, 2009 at 11:16 PM, rebus_ wrote:
>> 2009/11/24 nek4life :
>>> You should look into django-authority. I'm pretty sure that has per-
>>> object-permissions.
>>>
>>>
2009/11/25 Alessandro Ronchi
> I need to make my model translatable into different languages.
> Is there any simple way to handle that in a transparent manner?
> I've fround transmeta project on google, anyone is using that?
>
Hi,
yes, I'm using transmeta, I had
ciao alessandro,
i am using transmeta for a project im developing and it seems to fit my
needs.
transmeta is easy to use and it creates a db column for every field you
defined as translatable.
the default and required language is the one you define as site language
in settings.py, and its also
I need to make my model translatable into different languages.
Is there any simple way to handle that in a transparent manner?
I've fround transmeta project on google, anyone is using that?
--
Alessandro Ronchi
SOASI
Sviluppo Software e Sistemi Open Source
http://www.soasi.com
Hi all,
During the `manage.py test` process, django will automatically change
the database from `hivemind` to `test_hivemind`, For similar reason,
I'd like to change a file path from `sphinx.conf` to
`sphinx_test.conf` but unfortunately I couldn't find a proper way to
do it.
Ideally, if there
I have a query like:
Product.objects.filter(categories__in=cat_ids).distinct()
where categories is a m2m field.
As I understand it this loads products which have belong to ANY of the
categories in cat_ids
How would I load only products which belong to ALL of the categories
in cat_ids?
(is this
Hi Everybody,
I would like to add a complex search form in the change_list.html admin
template (for example to add possibility to search something from date
to date)
Is there a way to do this?
Thanks in advance.
Marco Minutoli
--
You received this message because you are subscribed to the Google
Hi all,
I'd like to describe a little of the way we're using Django for our
site, http://m.ox.ac.uk/. I'd very much like to find out whether other
peoplethink that our approach is sensible, and if it is, I thought this
post might be useful for other people in tackling some of the issues
we've
On Nov 25, 6:43 pm, Crispin Wellington
wrote:
> On Tue, 2009-11-24 at 21:52 -0800, Graham Dumpleton wrote:
> > Your imagination is running amuck, no such thing happens. You can
> > quite happily run multiple Django instances in embedded mode, they
> > just need
Hi ,
I want to use a library in a django project but I don't want to put it in
python path. Where am I supposed to put the sys.append so that it will
available to the whole django project.
--
A-M-I-T S|S
--
You received this message because you are subscribed to the Google Groups
"Django
88 matches
Mail list logo