runserver via code runs twice...

2009-09-24 Thread Steve Motola
When attempting to use a few management commands together, ala: from django.core.management.base import NoArgsCommand from django.core.management.commands import syncdb from django.core.management.commands import runserver class Command(NoArgsCommand): def handle_noargs(self, **options):

Re: fixture fails to load in test case, but works with loaddata

2009-09-24 Thread Russell Keith-Magee
On Fri, Sep 25, 2009 at 3:25 AM, skunkwerk wrote: > > Hi, >   I created a database dump using the 'dumpdata' command, and when I > but am getting this error when I add the line: > fixtures = ['test_fixture-24.09.09.json'] to my TestCase class: > > Problem installing fixture

DateTimeField Formatting (in admin)

2009-09-24 Thread Lyubomir Petrov
Is there a easy way to automatically change the default formatting of DateTimeField's when they are used to be printed on the console/ html... As i see in db/models/fields/__init__.py: def value_to_string(self, obj): val = self._get_val_from_obj(obj) if val is None:

Django 1.0 cannot handle ManyToOne inheritance in two apps

2009-09-24 Thread luciferleo
Hi, I am using Django 1.0 Suppose I have two models in one file: class BaseModel(models.Model): # attrs creator = models.ForeignKey('User', related_name='%(class) s_creator_set') class User(BaseModel): # attrs That's perfectly OK. But if I split them into two apps, say,

Py Web SF #4: 6pm, Tues September 29th, SF Main Public Library

2009-09-24 Thread Niall O'Higgins
Hi folks, PyWebSF is a Python meet-up with a strong focus on Web technology in the heart of San Francisco. From frameworks like WSGI/Pylons/TurboGears/Django to libraries like httplib2 to using emerging Web technologies like Amazon's AWS and Freebase - its all covered. The emphasis is on

How to customize field to get the correct python value?

2009-09-24 Thread jay.sh...@gmail.com
Hi there, I have a question on customize the db field. For this field, I want to save integers in db, but want them to be my custom class when they are used in Python code. In Django docs, it's said that I should set the __metaclass__ to be models.SubfieldBase to make to_python() work. I tried

Re: django forum

2009-09-24 Thread Wiiboy
Strike what I said above. It's fixed. @derekh http://forum.python.su --~--~-~--~~~---~--~~ 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

Re: How to update a ManyToManyField in a model's custom save method

2009-09-24 Thread Brian McKeever
The presave signal passes the instance of the updated object to the signal automatically, so your code should work with minimal modifications. Try this: from django.db.models.signals import post_save def member_check(sender, **kwargs): if Project.objects.filter(id__exact=self.id).count():

Re: Design question

2009-09-24 Thread Brian McKeever
It's a trade-off. Loose coupling allows you to modify the structure of your program easier, but doing so in this case is going to lead to a performance hit. That said, this isn't crazy coupling we're suggesting. It's not like we need to know anything about the user model to do this or that

Re: Admin Interface Bug?

2009-09-24 Thread Nakedsteve
Yeah that was the problem, I overrode the TEMPLATE_CONTEXT_PROCESSORS setting in settings.py which got rid of django.core.context_processors.auth On Sep 23, 9:56 pm, Karen Tracey wrote: > On Wed, Sep 23, 2009 at 9:00 PM, Nakedsteve wrote: > > > Hey

URL Tag for feeds

2009-09-24 Thread When ideas fail
If i want to create a URL tag for feeds then where should the path.to.view point to? Should it point to urls.py or feeds.py? or do i need to do something else entirely? This is using the standard sydication framwork. Thanks, Andrew --~--~-~--~~~---~--~~ You

Re: group querysets in template

2009-09-24 Thread dimitri pater - serpia
> - in the view just get all the books, ordered by author > - in the template iterate over the books, with an {% ifchanged > book.author %} to display the author name thanks Javier, I will try the 'ifchanged' template tag (http://docs.djangoproject.com/en/dev/ref/templates/builtins/#ifchanged).

Re: How to update a ManyToManyField in a model's custom save method

2009-09-24 Thread Daniele Procida
On Wed, Sep 23, 2009, M Godshall wrote: > >I have a Project model with a ManyToManyField called "members" to keep >track of members of a project. Whenever the model is updated, I need >to check if certain members need to be removed from or added to the >m2m field.

Re: re-using field definitions

2009-09-24 Thread Chris Withers
Ethan Jucovy wrote: > What happens if you wrap the definition in a function? > {{{ > def signins(): return models.IntegerField(...) > > class User(models.Model): > name = models.IntegerField(...) > signins = signins() > }}} Yeah, this is sort of what I ended up with: from django.db import

Re: overriding save() for ManyToManyFields

2009-09-24 Thread Daniele Procida
On Thu, Sep 24, 2009, Daniele Procida wrote: >>So, given a obj = Referrer("foo"), updating its many-to-many field can >>happen only after obj.save() returns (this is documented in >>http://www.djangoproject.com/documentation/models/many_to_many/ ). >> >>If you are not

Re: where to place import statements

2009-09-24 Thread Kevin Teague
imports don't usually take up too much memory. I'd guess that even importing a very large number of modules isn't going to grow your process size by more than 10 MB. imports are only evaluated once. So if you nest the import into a view, your process will be smaller until the first time that

Re: MultiWidget fail to render without exception

2009-09-24 Thread Karen Tracey
On Thu, Sep 24, 2009 at 4:27 PM, JF Simon wrote: > > I launched form.as_table() in my terminal and the traceback is : > > File "", line 1, in ? > File "/usr/lib/python2.4/site-packages/django/forms/forms.py", line > 190, in as_table >return

Re: MultiWidget fail to render without exception

2009-09-24 Thread JF Simon
Ah I found something ... In my forms.MultiWidget subclass, "decompress" method was returning None and not a couple of values ! I just done that : def decompress(self, value): if value is None: return (None, None) return value I don't know if it's the best way,

Re: MultiWidget fail to render without exception

2009-09-24 Thread JF Simon
I launched form.as_table() in my terminal and the traceback is : File "", line 1, in ? File "/usr/lib/python2.4/site-packages/django/forms/forms.py", line 190, in as_table return self._html_output(u'%(label)s%(errors)s% (field)s%(help_text)s', u'%s', '', u'%s', False) File

Re: URL Tag

2009-09-24 Thread W3
Yes, I actually just tried that a few seconds ago and now it works. Thanks Andrew On 24 Sep, 20:48, Emiel van de Laar wrote: > On Sep 24, 2009, at 9:20 PM, W3 wrote: > > > > > Sorry the url.py is like so: > > > ('^myposts/$', 'myproject.myapp.views.blog'), > >

Re: re-using field definitions

2009-09-24 Thread Ethan Jucovy
On Thu, Sep 24, 2009 at 9:37 AM, Chris Withers wrote: > > Hi All, > > I tried this: > > from django.db import models > > signins = models.IntegerField( >     default=0, >     db_index=True, >     verbose_name='Total Signins' >     ) > > class User(models.Model): >    

Re: URL Tag

2009-09-24 Thread Emiel van de Laar
On Sep 24, 2009, at 9:20 PM, W3 wrote: > Sorry the url.py is like so: > > ('^myposts/$', 'myproject.myapp.views.blog'), > (r'^myposts/(?P.+)/$', 'myproject.myapp.views.title_view'), > > On 24 Sep, 20:17, When ideas fail wrote: >> Hello, I was wondering if somebody

Re: fixture fails to load in test case, but works with loaddata

2009-09-24 Thread skunkwerk
with another dump file, I get this error: Problem installing fixture '/Users/imran/Sites/bdl/match/trunk/python/ bdl_site/match/fixtures/apps_fixture-24.09.09.json': Traceback (most recent call last): File "/Library/Python/2.5/site-packages/django/core/management/ commands/loaddata.py", line

Re: django-trackback usage?

2009-09-24 Thread josebrwn
changed that to: handlers.send_pingback(sender=self.__class__, instance=self) handlers.send_trackback(sender=self.__class__, instance=self) it's now attempting to send the pingback and trackback :) I've entered a new issue. thanks! On Sep 24, 11:43 am,

Re: group querysets in template

2009-09-24 Thread Javier Guerra
On Thu, Sep 24, 2009 at 2:49 AM, dimitri pater - serpia wrote: > > Hi, > > say, I have two related models: > > class Author(models.Model): >  name = models.CharField() > > class Book(models.Model): >  author = models.ForeignKey(Author) >  titel = models.CharField() >  

where to place import statements

2009-09-24 Thread Some Guy
Hi group, I was wondering about how to structure my import statements and it's impact, if any, on the memory footprint of mod_python. I'm importing some modules that i'm sure are huge in memory for certain views. My question is: does it make any difference whether I put the import statement at

Re: URL Tag

2009-09-24 Thread W3
Sorry the url.py is like so: ('^myposts/$', 'myproject.myapp.views.blog'), (r'^myposts/(?P.+)/$', 'myproject.myapp.views.title_view'), On 24 Sep, 20:17, When ideas fail wrote: > Hello, I was wondering if somebody could tell me what i'm doing wrong. > > I keep getting

fixture fails to load in test case, but works with loaddata

2009-09-24 Thread skunkwerk
Hi, I created a database dump using the 'dumpdata' command, and when I but am getting this error when I add the line: fixtures = ['test_fixture-24.09.09.json'] to my TestCase class: Problem installing fixture '//ites/bdl/match/trunk/python/bdl_site/ match/fixtures/test_fixture-24.09.09.json':

URL Tag

2009-09-24 Thread When ideas fail
Hello, I was wondering if somebody could tell me what i'm doing wrong. I keep getting this error relating to a url tag: Traceback: File "C:\Python26\lib\site-packages\django\core\handlers\base.py" in get_response 92. response = callback(request, *callback_args,

Re: Reverse Method Not finding URLs

2009-09-24 Thread Streamweaver
I tried this solution and that's what it was. I knew I was missing something obvious. Thanks so much. On Sep 23, 8:32 pm, Peter Coles wrote: > Looks like your regex isn't matching: > >   reverse('view-project', args=['blue-dog']) > > is trying the regex here: > >  

Re: django vps hosts

2009-09-24 Thread Jaú
I don't know Linode myself. But a friend of mine says good things about them. On Wed, Sep 23, 2009 at 10:54 PM, neri...@gmail.com wrote: > > I think I'm ready to finally switch to a django vps host due to > problems with django on DreamHost. Can anyone recommend a good vps >

Re: Firefox search plugin for Django documents

2009-09-24 Thread dimitri pater - serpia
2009/9/24 玉东 : > Hi, guys, > > I've made a firefox search plugin for django documents. It can save your > time if you often search the official django documents because you don't > have to visit the djangoproject.com first. Just type in the search box, > press enter and

Re: django-trackback usage?

2009-09-24 Thread josebrwn
Hi, Here's my save method: def save(self): super(Entry, self).save() print "hello world from models" signals.send_pingback.send(sender=self.__class__, instance=self) signals.send_trackback.send(sender=self.__class__,

Inheriting from ManyToManyField

2009-09-24 Thread Béru
Hi, Is it possible to have a custom model field class inheriting from ManyToManyField ? I'd like to do something like this: class CategoryLinkField(models.ManyToManyField): def __init__(self, *args, **kwargs): super(models.ManyToManyField, self).__init__(Category,

Encrypting admin area (SSL) on nignx proxy with apache2

2009-09-24 Thread Sam
Hi everyone, I am in the process of trying to encrypt with ssl through apache anything that is done in /admin. Right now, I have an nginx proxy on port 80 that forwards anything to an apache virtual host listening on a different port. I also have another apache vhost listening on 443 but is not

Re: django vps hosts

2009-09-24 Thread Christophe Pettus
Although I haven't yet deployed a Django application on them, I'm very pleased with Slicehost in my other experiences with them. -- -- Christophe Pettus x...@thebuild.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: django vps hosts

2009-09-24 Thread creecode
You might look at Amazon's EC2 if you don't mind rolling your own. On Sep 23, 6:54 pm, "neri...@gmail.com" wrote: > I think I'm ready to finally switch to a django vps host due to > problems with django on DreamHost. Can anyone recommend a good vps > host?

Re: multi-db vs. data warehouse

2009-09-24 Thread Tony Schmidt
Well, I guess the answer to the thread is looking like: - a data warehouse is preferable to multiple db connections and cross- vendor joins But that's only because I haven't heard anyone voice support for the multi-db idea. Now the question is: How should the warehouse be constructed in

Re: TemplateSyntaxError: VariableDoesNotExist

2009-09-24 Thread Brian McKeever
I would write a custom tag that wraps ugettext but checks for None. http://docs.djangoproject.com/en/dev/howto/custom-template-tags/#writing-custom-template-filters http://docs.djangoproject.com/en/dev/topics/i18n/#standard-translation On Sep 24, 10:14 am, Florian Schweikert

Re: Custom Command as cron

2009-09-24 Thread Matt McCants
I knew this would happen as soon as I hit submit to make a fool of myself. So I tried to use: manage.py custom_command_name --pythonpath='/path/to/my/project' but that had not worked either. The real path to the project is: /home/webdev/django/fls but I failed to put in: manage.py

Re: is this a sane way to show total number of objects in pagination?

2009-09-24 Thread Chris Withers
Brian McKeever wrote: > .count is definitely the way to go. Although, I would probably pass it > to your template instead of determining it there. What difference does it make? Chris -- Simplistix - Content Management, Batch Processing & Python Consulting -

Re: django template tag truncatewords_html, detect whether it truncated or not

2009-09-24 Thread Brian McKeever
I think you'll have to write a custom template tag: http://docs.djangoproject.com/en/dev/howto/custom-template-tags/#parsing-until-another-block-tag-and-saving-contents On Sep 24, 10:56 am, J wrote: > Hello, > > How can I detect whether the template tag truncatewords_html

Custom Command as cron

2009-09-24 Thread Matt McCants
Greetings all, I'm having an issue running a custom command as a cron. Most resources I've read have said that you can run your command from cron by simply using the following syntax: python manage.py custom_command_name Frustratingly, that does not work for me. It results in "Unknown command:

Re: Retrieving the request URI inside the view function?

2009-09-24 Thread Christophe Pettus
On Sep 24, 2009, at 9:53 AM, Brian McKeever wrote: > I imagine request.path would do what you want: > http://docs.djangoproject.com/en/dev/ref/request-response/#attributes Perfect, thanks. This inspires me to ask if there are known-pattern ways of accomplishing the two things I need the URI

django template tag truncatewords_html, detect whether it truncated or not

2009-09-24 Thread J
Hello, How can I detect whether the template tag truncatewords_html has truncated the html text or not? My current template code is as follows: {{ object.body|truncatewords_html:100|removetags:"span"|safe }} {% trans "Read the rest" %} » However, I only want to

Re: is this a sane way to show total number of objects in pagination?

2009-09-24 Thread Brian McKeever
.count is definitely the way to go. Although, I would probably pass it to your template instead of determining it there. On Sep 24, 10:32 am, Chris Withers wrote: > Chris Withers wrote: > >      objects = model.objects.all() > >      paginator = Paginator(objects,10) > >

Re: Retrieving the request URI inside the view function?

2009-09-24 Thread Brian McKeever
I imagine request.path would do what you want: http://docs.djangoproject.com/en/dev/ref/request-response/#attributes On Sep 24, 10:37 am, Christophe Pettus wrote: > My apologies, because I am certain that this is documented somewhere,   > but I cannot seem to find it. > >

Retrieving the request URI inside the view function?

2009-09-24 Thread Christophe Pettus
My apologies, because I am certain that this is documented somewhere, but I cannot seem to find it. Within my view function, I need to retrieve the URI that requested that particular view. Is there a straight-forward, portable way to do that? Many thanks! -- -- Christophe Pettus

Re: is this a sane way to show total number of objects in pagination?

2009-09-24 Thread Chris Withers
Chris Withers wrote: > objects = model.objects.all() > paginator = Paginator(objects,10) > return render_to_response( > 'index.html',dict( > objects = paginator.page(page), > total_objects = len(objects), > ) > ) I'm

is this a sane way to show total number of objects in pagination?

2009-09-24 Thread Chris Withers
Hi All, I have the following in a view: objects = model.objects.all() paginator = Paginator(objects,10) return render_to_response( 'index.html',dict( objects = paginator.page(page), total_objects = len(objects), ) ) Is

Re: Weird: the path to the image, retrieved using filebrowser, is rewritten with a wrong relative instead of absolute.

2009-09-24 Thread jwpeddle
Are you implying you were using an older version? I'm using latest SVN and still experiencing this issue. On Aug 17, 10:36 pm, Cody Django wrote: > sorry -- already a fix: > > http://code.google.com/p/django-tinymce/issues/detail?id=22=1=i... > > On Aug 17, 7:31 pm, Cody

TemplateSyntaxError: VariableDoesNotExist

2009-09-24 Thread Florian Schweikert
Hello, {% trans Pagetitle %} produces TemplateSyntaxError when there is no Pagetitle given, without translation django ignores it. Why i18n can't translate/ignore NoneType? I don't want to use if around all this varibles. Is there any more confortable way? greetings, Florian

Re: Limiting queryset on ModelAdmin based on date field

2009-09-24 Thread Alvaro Mouriño
On Thu, Sep 24, 2009 at 2:52 AM, Brian McKeever wrote: > > I'm not too familiar with customizing the admin, but you want to use > the range field lookup. > > http://docs.djangoproject.com/en/dev/ref/models/querysets/#range Thanks McKeever, but that's actually the problem: I

Re: Limiting queryset on ModelAdmin based on date field

2009-09-24 Thread Alvaro Mouriño
On Thu, Sep 24, 2009 at 6:19 AM, Daniel Roseman wrote: > > On Sep 24, 6:07 am, Alvaro Mouriño wrote: >> Hi list. >> >> I'm developing a news application that handles articles, about 10 new >> articles each day. The site administrator every

Re: Design question

2009-09-24 Thread ringemup
So the tighter coupling implied by each entry knowing about the user profile shouldn't be a subject of concern? On Sep 23, 11:05 pm, Brian McKeever wrote: > I remember a quote from either headfirst java or design patterns that > said something like: > "The key to inheritance

Re: too many joins

2009-09-24 Thread Tom Evans
On Thu, 2009-09-24 at 06:25 -0700, blumenkraft wrote: > Hi, > > It seems that Django generates too many joins with chained filters: > > class Issue(models.Model): > is_opened = models.BooleanField() > > class Advertisement(models.Model): > issues = models.ManyToManyField(Issue, null = True)

Re: Firefox search plugin for Django documents

2009-09-24 Thread Jaú
Hi there! Very useful! Thank you! 2009/9/24 玉东 : > Hi, guys, > > I've made a firefox search plugin for django documents. It can save your > time if you often search the official django documents because you don't > have to visit the djangoproject.com first. Just

Re: MultiWidget fail to render without exception

2009-09-24 Thread kmtracey
On Thu, Sep 24, 2009 at 10:40 AM, JF Simon wrote: > > Ouh thanks ... because of the TEMPLATE_DEBUG setting, I though > exceptions within templates were raised ... my sentence seems weird. > Ill try that tonight. > Thanks again. > > No, TEMPLATE_DEBUG just adds some information

Python Developer Wanted - London

2009-09-24 Thread Rakesh Thakrar
Python Developer / Open Source - (Graduate to Senior Developers) £25-£45k + Share Option Our client is an exciting, funded web startup that are looking for an ambitious software engineer who is hungry to build awesome software that millions of people use. Based in central London, our client is

Re: MultiWidget fail to render without exception

2009-09-24 Thread JF Simon
Ouh thanks ... because of the TEMPLATE_DEBUG setting, I though exceptions within templates were raised ... my sentence seems weird. Ill try that tonight. Thanks again. JF On 24 sep, 14:42, Karen Tracey wrote: > On Thu, Sep 24, 2009 at 2:49 AM, JF Simon

Customized Inline functionality

2009-09-24 Thread tsteinmaurer
Hello, I have a three level FK-relationship. For example: DATA_PACKAGE | DATA_GROUP | DATA_ELEMENT I can create an inline definition to edit DATA_GROUPs when I'm in DATA_PACKAGE. Is there a way to have another inline definition on the same form which allows me to directly edit associated

Re: opener.dismissAddAnotherPopup error tinymce

2009-09-24 Thread Ali Rıza KELEŞ
But i just defined document.domain in my tinymce initializer, nowhere else.. Is there anywhere else should I define it? 2009/9/24 Ali Rıza KELEŞ : > Hi, > > i did this patch, but still doesn't work. > http://code.djangoproject.com/attachment/ticket/10327/10327-r9969.diff >

Re: overriding save() for ManyToManyFields

2009-09-24 Thread Daniele Procida
On Thu, Sep 24, 2009, mrts wrote: >So, given a obj = Referrer("foo"), updating its many-to-many field can >happen only after obj.save() returns (this is documented in >http://www.djangoproject.com/documentation/models/many_to_many/ ). > >If you are not able to call obj.save()

too many joins

2009-09-24 Thread blumenkraft
Hi, It seems that Django generates too many joins with chained filters: class Issue(models.Model): is_opened = models.BooleanField() class Advertisement(models.Model): issues = models.ManyToManyField(Issue, null = True) >>> x = models.Advertisement.objects.filter(issues__is_opened = >>>

Re: django vps hosts

2009-09-24 Thread brad
+1 Linode. They've got great management tools. I've enjoyed their service. On Sep 24, 12:28 am, Kenneth Gonsalves wrote: > On Thursday 24 Sep 2009 7:24:25 am neri...@gmail.com wrote: > > > I think I'm ready to finally switch to a django vps host due to > > problems with

Re: Help delete a db register

2009-09-24 Thread gustavo
Never mind! I just figure it out that I had commented the id in the model, causing this... On 24 set, 09:49, Gustavo Senise wrote: > Hi! > > I am having a hard time trying to delete a db register, but have no clue > whats going on. > > I have already debuged but still

Re: opener.dismissAddAnotherPopup error tinymce

2009-09-24 Thread Ali Rıza KELEŞ
Hi, i did this patch, but still doesn't work. http://code.djangoproject.com/attachment/ticket/10327/10327-r9969.diff I am using use the latest svn revision, -revision 11593-. Only in options.py, new lines are not located as you mentioned in your patch. There is not on line 681, 681

Re: MultiWidget fail to render without exception

2009-09-24 Thread Karen Tracey
On Thu, Sep 24, 2009 at 2:49 AM, JF Simon wrote: > > Hi there ! > > I try to understand why my form doesn't render anything. No exception > is raised and i'm going crazy ! > In my forms.py I got these (simplified for instance) classes : > > [snip code] > > In my template I just

Re: django-trackback usage?

2009-09-24 Thread Arne
Hi, the code, which sends the trackbacks is not very well debugged. Please make a small change in trackback/utils/handlers.py (Lines 28 & 42) and add "fail_silently=False" to the function calls (it's already there but commented out). This allows errors which occur while sending the trackbacks to

Re: MultiWidget fail to render without exception

2009-09-24 Thread JF Simon
Don't you find my problem really funny ? --~--~-~--~~~---~--~~ 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

Re: list some django-powered web sites

2009-09-24 Thread Wayne Koorts
> hi everybody, We want to develop a Bussiness web site with Django framework, > but we can't decide django's performance. So, would you list some > large-scale web sites that used django for us? Define "large-scale". --~--~-~--~~~---~--~~ You received this

Re: list some django-powered web sites

2009-09-24 Thread Alexandru Nedelcu
On Thu, 2009-09-24 at 02:54 -0700, Michel Thadeu Sabchuk wrote: > Wouldn't it be better to cache on the RAM? This way you won't need > even these queries... > > I'm not a cache specialist, let me know if I miss something ;) Yes it would be better, if you can afford it. The website runs in

Auth/Session modules and JSON views

2009-09-24 Thread django_fo...@codechimp.net
This is probably a dumb question, but I am working on some JSON views that I need to apply authentication too. I thought maybe I could use the Django built-in auth/session apps to wrapper the JSON View methods, but when I do testing I am not seeing the session id being sent back. I tried

Re: HttpResponseRedirect(request.META["HTTP_REFERER"])

2009-09-24 Thread Tim Chase
dijxtra wrote: > Is it safe to use HttpResponseRedirect(request.META["HTTP_REFERER"])? > Can a session be stolen using this coed by spoofing HTTP_REFERER? Two things stand out to me: 1) HTTP_REFERER is not a required header, so if the browser doesn't send it, your code won't do what you

Re: list some django-powered web sites

2009-09-24 Thread Michel Thadeu Sabchuk
Hi guys, > You're not going to get any meaningful feedback by looking at high > profile sites, because you don't know if the backend is similar to yours > or what they did for scaling. Alexandru is right. The server arrangement can speed up your performance. > I'm currently developing a

Re: Django templated: iterating through fields in a database record

2009-09-24 Thread Daniel Roseman
On Sep 24, 9:50 am, Paul Lundberg wrote: > Thanks, I think I will have to do that, I just thought that there > might be an easy way to do this that I missed! > > Paul Lundberg There's various information about fields in a model's ._meta class. For instance,

Re: What JavaScript framework do you use and why?

2009-09-24 Thread Joshua Russo
Great links guys, thanks. I'm still in the mindset of frameworks just making JavaScript less painful too and I'm looking for ways to move beyond that. I just started looking at Dojo before posting this and it definitely looks like it has potential.

Re: multi-db vs. data warehouse

2009-09-24 Thread Joshua Russo
If he wants to discuss it here I can do that too. It was just a little off topic, but not not too much I suppose. On Thu, Sep 24, 2009 at 7:41 AM, nausikaa wrote: > > > Hi Joshua > > Thanks for sharing your knowledge. > Too bad, I would've liked to read your suggestion to

Re: list some django-powered web sites

2009-09-24 Thread Alexandru Nedelcu
On Thu, 2009-09-24 at 16:06 +0800, Anrs wrote: > hi everybody, We want to develop a Bussiness web site with Django > framework, but we can't decide django's performance. So, would you > list some large-scale web sites that used django for us? You're not going to get any meaningful feedback by

Re: Limiting queryset on ModelAdmin based on date field

2009-09-24 Thread Daniel Roseman
On Sep 24, 6:07 am, Alvaro Mouriño wrote: > Hi list. > > I'm developing a news application that handles articles, about 10 new > articles each day. The site administrator every morning selects from a > drop-down-list the ones that hit the front page. As time goes by

Re: group querysets in template

2009-09-24 Thread dimitri pater - serpia
> Well, I am not sure this is a good suggestion but the way to get > around > any template code would be to do it in the query. > Have you tried something like this: > > your_list = [] # i don't know how to initialise an empty query set > authors = Author.objects.order_by('name') > for author in

Firefox search plugin for Django documents

2009-09-24 Thread 玉东
Hi, guys, I've made a firefox search plugin for django documents. It can save your time if you often search the official django documents because you don't have to visit the djangoproject.com first. Just type in the search box, press enter and you'll see the page of the results. It is useful to

Django admin - change_list resultset

2009-09-24 Thread Alexandru Nedelcu
Hi, I want to modify the querying done for the admin's change_list view of a model. I have an "Article" model, and when viewing the change_list I want the rows in the table to group_by('pack'), which is a foreign-key to model ArticlePack. Thanks,

Re: group querysets in template

2009-09-24 Thread nausikaa
Hi dimitri Well, I am not sure this is a good suggestion but the way to get around any template code would be to do it in the query. Have you tried something like this: your_list = [] # i don't know how to initialise an empty query set authors = Author.objects.order_by('name') for author in

Re: Django templated: iterating through fields in a database record

2009-09-24 Thread Paul Lundberg
Thanks, I think I will have to do that, I just thought that there might be an easy way to do this that I missed! Paul Lundberg On Sep 22, 11:56 am, Gonzalo Delgado wrote: > El Mon, 21 Sep 2009 08:43:57 -0700 (PDT) > Paul Lundberg escribió:

Re: FormWizard and form data

2009-09-24 Thread nostradamnit
I figured it out - you just have to overload the FormWizard method parse_params, like so... class CreateThingWizard(FormWizard): def parse_params(self, request, *args, **kwargs): current_step = self.determine_step(request, *args, **kwargs) if request.method == 'GET' and

Re: multi-db vs. data warehouse

2009-09-24 Thread nausikaa
Hi Joshua Thanks for sharing your knowledge. Too bad, I would've liked to read your suggestion to Tony as well. ; ) I'm a just graduate and at work I'm working on something very similar to what has been discussed here. On Sep 23, 9:51 pm, Joshua Russo wrote: > I have

Re: list some django-powered web sites

2009-09-24 Thread Andrew McGregor
On Thu, Sep 24, 2009 at 9:06 AM, Anrs wrote: > hi everybody, We want to develop a Bussiness web site with Django framework, > but we can't decide django's performance. So, would you list some > large-scale web sites that used django for us? Out of interest as performance

HttpResponseRedirect(request.META["HTTP_REFERER"])

2009-09-24 Thread dijxtra
Is it safe to use HttpResponseRedirect(request.META["HTTP_REFERER"])? Can a session be stolen using this coed by spoofing HTTP_REFERER? Thanks in advance, nick --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

Re: list some django-powered web sites

2009-09-24 Thread dimitri pater - serpia
On Thu, Sep 24, 2009 at 10:06 AM, Anrs wrote: > hi everybody, We want to develop a Bussiness web site with Django framework, > but we can't decide django's performance. So, would you list some > large-scale web sites that used django for us? http://djangosites.org/ > >

Re: list some django-powered web sites

2009-09-24 Thread Kenneth Gonsalves
On Thursday 24 Sep 2009 1:36:37 pm Anrs wrote: > hi everybody, We want to develop a Bussiness web site with Django > framework, but we can't decide django's performance. So, would you list > some > large-scale web sites that used django for us? http://djangosites.com -- regards kg

list some django-powered web sites

2009-09-24 Thread Anrs
hi everybody, We want to develop a Bussiness web site with Django framework, but we can't decide django's performance. So, would you list some large-scale web sites that used django for us? thanks. -- love, anrs --~--~-~--~~~---~--~~ You received this message

Re: opener.dismissAddAnotherPopup error tinymce

2009-09-24 Thread Joost Cassee
On 23 sep, 16:13, Joost Cassee wrote: > The admin popup windows do set the document.domain, [...] That would be "do not set", sorry. - Joost --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: django vps hosts

2009-09-24 Thread Alexey Moskvin
You can try Dreamhost Private Server. Also they have added root access for PS not long ago. On 24 сен, 05:54, "neri...@gmail.com" wrote: > I think I'm ready to finally switch to a django vps host due to > problems with django on DreamHost. Can anyone recommend a good vps >

Re: django vps hosts

2009-09-24 Thread dimitri pater - serpia
On Thu, Sep 24, 2009 at 3:54 AM, neri...@gmail.com wrote: > > I think I'm ready to finally switch to a django vps host due to > problems with django on DreamHost. Can anyone recommend a good vps > host? try rimuhosting.com > > >

Re: How to update a ManyToManyField in a model's custom save method

2009-09-24 Thread Godshall
I think i tried a postsave signal a while back without luck, but I'll give it another shot. In order to know which users to add to or remove from the members field I have to process the data in the save method itself. Can you show me how I could pass a list of users to remove and add to the

group querysets in template

2009-09-24 Thread dimitri pater - serpia
Hi, say, I have two related models: class Author(models.Model): name = models.CharField() class Book(models.Model): author = models.ForeignKey(Author) titel = models.CharField() isbn = models.CharField() and I want to group them and display them in a template like this: Stephen King:

Re: overriding save() for ManyToManyFields

2009-09-24 Thread mrts
On Sep 24, 12:52 am, "Daniele Procida" wrote: > Don't I need to run some sort of save for those? Otherwise, what happens > to the attributes once I have set them? Sorry, I responded too hastily and erroneously. Here's the proper, longer explanation. Assume the

Re: Django + QT4

2009-09-24 Thread Javier Rivera
Gustavo Henrique escribiu: > Hi guys! > Is possible use django with qt4 for desktop apps? Sure. Two years ago I used Qt4 and the django template system, with an old version of this script (http://code.google.com/p/django-opendocument/), to add some reports to a Tinapos installation. Tinapos

Re: django vps hosts

2009-09-24 Thread Nick Lo
This may be helpful: http://djangofriendly.com/hosts/ > I think I'm ready to finally switch to a django vps host due to > problems with django on DreamHost. Can anyone recommend a good vps > host? --~--~-~--~~~---~--~~ You received this message because you are

  1   2   >