OT: Re: ANN: Screencast demo of the WebFaction control panel

2006-06-22 Thread Luke Plant
Jay Parlar wrote: > Luke, which hosting plan are you using? I know that Shared 2 is the > minimum for Django, but I'm curious if it's "enough". I'm on shared 2, which seems to be fine for my needs. The main thing that would worry me is the amount of memory, so I haven't used any caching. Sinc

Re: OT: Re: ANN: Screencast demo of the WebFaction control panel

2006-06-22 Thread Jeroen Ruigrok van der Werven
On 6/22/06, Luke Plant <[EMAIL PROTECTED]> wrote: > Right now, for instance, 'ps aux' shows 10 apache instances of mine > each using about 18 Mb, which is a lot more than my 40 Mb limit. Are you looking at residential or virtual size here? Also, ulimit should show you some imposed limits, most l

a easy way of orderlist?

2006-06-22 Thread momobear
hi, I use the generic view object_list to display my result, but now I want the result to be showed like the page in django admin-site, we can click the column to let it on desc or asc ordering, the admin-site seems complex to me, is there any easy solution? thanks. --~--~-~--~~-

Problem with DRY and feeding parent's template block

2006-06-22 Thread Jaroslaw Zabiello
Django uses Python modules instead of classes. The problem is how to avoid duplication of the code in controllers when I want to put some data to parent templates? Let see the example: base.html: {% block welcome %} Hello {{ name }}! {% endblock %} {% block main %}{% endblock %} test1.html: {% e

Re: OT: Re: ANN: Screencast demo of the WebFaction control panel

2006-06-22 Thread Derek Hoy
rimu have some useful info for a VPS setup: http://rimuhosting.com/howto/memory.jsp -- Derek --~--~-~--~~~---~--~~ 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@

Re: Problem with DRY and feeding parent's template block

2006-06-22 Thread Malcolm Tredinnick
On Thu, 2006-06-22 at 10:01 +, Jaroslaw Zabiello wrote: > Django uses Python modules instead of classes. The problem is how to > avoid duplication of the code in controllers when I want to put some > data to parent templates? Let see the example: > > base.html: > {% block welcome %} > Hello {

Re: Problem with DRY and feeding parent's template block

2006-06-22 Thread Frankie Robertson
On 22/06/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > On Thu, 2006-06-22 at 10:01 +, Jaroslaw Zabiello wrote: > > Django uses Python modules instead of classes. The problem is how to > > avoid duplication of the code in controllers when I want to put some > > data to parent templates?

Re: Problem with DRY and feeding parent's template block

2006-06-22 Thread Matt McDonald
You can also make use of Inclusion Tags. Very easy to use: http://www.djangoproject.com/documentation/templates_python/ #inclusion-tags I use them for all dynamic sections that appear across templates. On 22/06/2006, at 8:32 PM, Malcolm Tredinnick wrote: > > On Thu, 2006-06-22 at 10:01 +,

Re: MS SQL Django suport is stable?

2006-06-22 Thread Lucas Vogelsang
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 mamcxyz wrote: > Yes, apt/yum is the way to go. Unfortunally, the packages > availables for CentOS 3 are not > who uses centos? :P I use Ubuntu. It's up to date and has a lot of packages available. Debian would be my second choice. regards, lucas

Re: Root URI in templates

2006-06-22 Thread Derek Hoy
Or just use the templatetag approach mentioned earlier. -- Derek --~--~-~--~~~---~--~~ 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 unsubscri

Re: Problem with DRY and feeding parent's template block

2006-06-22 Thread Malcolm Tredinnick
On Thu, 2006-06-22 at 11:52 +0100, Frankie Robertson wrote: > On 22/06/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > > > On Thu, 2006-06-22 at 10:01 +, Jaroslaw Zabiello wrote: > > > Django uses Python modules instead of classes. The problem is how to > > > avoid duplication of the cod

queryset.latest bug

2006-06-22 Thread Spock
I'm getting some errors when trying call latest() method on quety set when there is no associated data in table. Here is example: Model(reduced): class Ticket(Model): title = CharField('Tytul',maxlength=128) priority = SmallIntegerField('Priorytet',choices=PRIORITIES) author = Foreign

Re: queryset.latest bug

2006-06-22 Thread Malcolm Tredinnick
On Thu, 2006-06-22 at 04:30 -0700, Spock wrote: > I'm getting some errors when trying call latest() method on quety set > when there is no associated data in table. Here is example: > Model(reduced): > > class Ticket(Model): > title = CharField('Tytul',maxlength=128) > priority = SmallInt

Re: queryset.latest bug

2006-06-22 Thread Spock
Thx, In this case if I want get [ ] if result is 0 i need to write my own method .. Regards, --~--~-~--~~~---~--~~ 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@g

Template to Render Unknown Number of Arguments

2006-06-22 Thread Paul Childs
I am trying to create a template that will only render selected values of an unknown number of dictionary keys which follow a certain pattern. This is the form of the dictionary in context: {'pets':{'dog0':'Rover','dog1':'Spike','cat0':'Fang'}} The pet dogs can go from dog0, dog1, dog2,...dogn.

Re: Triple Store / RDF

2006-06-22 Thread Phil Powell
Thanks Malcolm. I'm curious more than anything, since RDF etc gets talked about a lot, but implementations rarely seem to make it into the real-world. I referenced the exact same resource to pull together a basic triple-store library in Rails a while back, and it was fairly painless (although a

Re: Template to Render Unknown Number of Arguments

2006-06-22 Thread Malcolm Tredinnick
On Thu, 2006-06-22 at 12:47 +, Paul Childs wrote: > I am trying to create a template that will only render selected values > of an unknown number of dictionary keys which follow a certain pattern. > > This is the form of the dictionary in context: > {'pets':{'dog0':'Rover','dog1':'Spike','cat

Re: Triple Store / RDF

2006-06-22 Thread Malcolm Tredinnick
Hi Phil, On Thu, 2006-06-22 at 13:51 +0100, Phil Powell wrote: > Thanks Malcolm. I'm curious more than anything, since RDF etc gets > talked about a lot, but implementations rarely seem to make it into > the real-world. For me, RDF is one of those things that I try to keep up to speed with, bec

Best way to resuse admin pagination?

2006-06-22 Thread Patrick J. Anderson
What is the best way to reuse admin pagination in a generic object_list view template? --~--~-~--~~~---~--~~ 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@googlegr

Re: MS SQL Django suport is stable?

2006-06-22 Thread mamcxyz
> If you managed to get it compiling and working, well done, a lot of people > already stop at that point. In contrast with the other compilings, I found lighttpd is easy (except that the info I first read not talk about the switch to enable fastcgi) > Was this only because of the missing/non-wo

Comments: Failed lookup for key [id] in ''

2006-06-22 Thread Patrick J. Anderson
Following documentation found on http://code.djangoproject.com/wiki/UsingFreeComment, I run into this problem. Below is my template: {% load comments.comments %} {% for p in latest %} {% get_free_comment_count for blog.post object.id as comment_count %} {{ p.title }}

Re: MS SQL Django suport is stable?

2006-06-22 Thread [EMAIL PROTECTED]
Hi folks,Just to throw more fuel on the fire :)The missing part that everybody is forgetting is the Database Connector setup.  Every distribution (and I've tried a whole bunch) does it differently.  Installing the connector for mysql or postgres is easy if you are experienced, but not easy if you a

GenericForeignKey in admin

2006-06-22 Thread arthur debert
I've been playig with GenericForeignKey and they are great. One question though, they do not show up on the admin app. For example on the object that should be 'tagged', I would like to edit tags inline. Is thart possible at all? thanks, arthur --~--~-~--~~~---~--

Re: Best way to resuse admin pagination?

2006-06-22 Thread Jay Parlar
On 6/23/06, Patrick J. Anderson <[EMAIL PROTECTED]> wrote: > > What is the best way to reuse admin pagination in a generic object_list > view template? What part do you want to reuse? Because object_list already has the paginate_by argument. Jay P. --~--~-~--~~~---~-

Re: overriding-default-model-methods what am i doing wrong ?

2006-06-22 Thread coulix
class Tag(models.Model): name = models.CharField(maxlength=200, core=True) total_ref = models.IntegerField(blank=True, null=True) class Admin: ordering = ['name'] def __str__(self): return self.name def get_absolute_url(self): return "/blog/tag/%s/" %

Re: overriding-default-model-methods what am i doing wrong ?

2006-06-22 Thread coulix
i mean never shows up --~--~-~--~~~---~--~~ 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 email to [EMAIL PRO

Re: overriding-default-model-methods what am i doing wrong ?

2006-06-22 Thread coulix
imported file used space.. i was puting tab. --~--~-~--~~~---~--~~ 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, s

Re: Best way to resuse admin pagination?

2006-06-22 Thread Patrick J. Anderson
Yes, that's true, but what would be the easiest way to reuse the pagination "widget" (if you can call it that) instead of writing my own? Sorry, if I haven't explained it in more detail --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: OT: Re: ANN: Screencast demo of the WebFaction control panel

2006-06-22 Thread James Bennett
On 6/22/06, Luke Plant <[EMAIL PROTECTED]> wrote: > I'm on shared 2, which seems to be fine for my needs. The main thing > that would worry me is the amount of memory, so I haven't used any > caching. Since my site (www.cciw.co.uk) is low traffic and never > likely to be slashdotted, this should

Lost with forms

2006-06-22 Thread mamcxyz
I read the docs at http://www.djangoproject.com/documentation/tutorial4/ and http://www.djangoproject.com/documentation/forms/ however, I still not get the form processing. Also, I try to read the admin code, however I'm still lost. I'm need a form for singup user. Have the fields of the django U

Re: Best way to resuse admin pagination?

2006-06-22 Thread Jay Parlar
On 6/22/06, Patrick J. Anderson <[EMAIL PROTECTED]> wrote: > > Yes, that's true, but what would be the easiest way to reuse the > pagination "widget" (if you can call it that) instead of writing my > own? Sorry, if I haven't explained it in more detail I don't actually have a django setup in fron

Re: GenericForeignKey in admin

2006-06-22 Thread Jay Parlar
On 6/22/06, arthur debert <[EMAIL PROTECTED]> wrote: > > I've been playig with GenericForeignKey and they are great. > > One question though, they do not show up on the admin app. > > For example on the object that should be 'tagged', I would like to edit > tags inline. Is thart possible at all?

save model method for a many to many relationship . how to.

2006-06-22 Thread coulix
Hello, normal schema for a blog app, entry and tag class : TAG class Tag(models.Model): name = models.CharField(maxlength=200, core=True) total_ref = models.IntegerField(blank=True, null=True) class Admin: ordering = ['name'] def __str__(self):

Re: Using Exclude w/ Many to Many Relationships

2006-06-22 Thread rajesh . dhawan
I have found that, in some cases, the following also works (I have a similar model where using the slug of the related object does not work but using it's PK works): tag_id = Tag.objects.get(tag = 'nopush').id x = Server.objects.exclude(tags__id__exact=tag_id) This may be because using the id sa

Re: Lost with forms

2006-06-22 Thread mamcxyz
I do this: (I copy this class from the cookbox) class Manipulator(forms.Manipulator): default = {} done = False def getData(self, request): return request.POST def getForm(self, data, errors): return forms.FormWrapper(self, data, errors) def process(self, r

Re: overriding-default-model-methods what am i doing wrong ?

2006-06-22 Thread Adrian Holovaty
On 6/22/06, coulix <[EMAIL PROTECTED]> wrote: > def get_absolute_url(self): > return "/blog/tag/%s/" % (self.name) > > def save(self): > print "foo" > self.total_ref = 28 > super(Tag, self).save() > > "foo" [never] shows up on the

Re: Template to Render Unknown Number of Arguments

2006-06-22 Thread spacedman
> On Thu, 2006-06-22 at 12:47 +, Paul Childs wrote: > > I have tried a number of ways of doing this but can't come up with a > > solution. I don't think pre-processing the data will help since the > > template still doesn't know how many keys there will be. Changing the > > structure of the

Re: Comments: Failed lookup for key [id] in ''

2006-06-22 Thread DavidA
Patrick J. Anderson wrote: > {% load comments.comments %} > > > {% for p in latest %} > {% get_free_comment_count for blog.post object.id as comment_count > What could be the reason for failed lookup on key[id]? Shouldn't that be 'p.id' rather than 'object.id' in the get_free_comment

Re: Triple Store / RDF

2006-06-22 Thread Phil Powell
On 22/06/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > I guess mine was more of a combination. I wrote an interface that was > similar to the querying interface in Django at the time (0.90 / 0.91 > style). Give it keyword args of what to select and triples describing > the filtering conditio

Re: Lost with forms

2006-06-22 Thread Steven Armstrong
On 06/22/06 18:08, mamcxyz wrote: > I do this: > > (I copy this class from the cookbox) > > class Manipulator(forms.Manipulator): > default = {} > done = False > > def getData(self, request): > return request.POST > > def getForm(self, data, errors): > return fo

Re: Comments: Failed lookup for key [id] in ''

2006-06-22 Thread Patrick J. Anderson
That's right! Thanks for spotting this silly mistake. --~--~-~--~~~---~--~~ 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

How test with debugging power the web interaction part?

2006-06-22 Thread mamcxyz
I run fine test with unittest module the logic code and the stuff is complety decoupled from the web. However, I don't know how in python can debug the interaction with the web side. I'm aware of selenium but that is not the thing I want. I want debug and see the flow of the code, for example, wh

Re: MS SQL Django suport is stable?

2006-06-22 Thread Douglas Campos
i wait the day when lighty + flup + django would be supported officially by the official docs :) just my 0.02 On 6/22/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi folks, > > Just to throw more fuel on the fire :) > > The missing part that everybody is forgetting is the Database Connecto

Re: Lost with forms

2006-06-22 Thread mamcxyz
You are correct. But the form perform like if have error. In the template; {% if form.has_errors %} {% for e in errors.items %} Field "{{ e.0 }}": {{ e.1|join:", " }} {% endfor %} {{ form.error }} Fallo el ingreso. Revise su clave y usuario {% endif %} When I post this show, but I'

Re: Lost with forms

2006-06-22 Thread mamcxyz
I figure this... I put: if data: new_data = data.copy() errors = self.get_validation_errors(new_data) raise Exception(errors) if not errors: So I can see the error. The problem is for the singup form I don't wanna obligate to enter all th

How do I use a custom FilterSpec?

2006-06-22 Thread MattiasN
A while back I created a customer filter for use in admin. It worked fine, but after svn up I noticed it didn't work anymore. So I found this. http://code.djangoproject.com/browser/django/trunk/django/contrib/admin/filterspecs.py r3136 The commit message says: "Added AllValuesFilterSpec to admin

Re: Which IDE to debug django app? (Was "Using Pyscripter with Django")

2006-06-22 Thread Filipe
Hi, That's definitely a better way to inspect values than modifying the view's template every time I need to debug something. I found out today that I can also print to the output console (yes, I'm that much of a newbie :) which also helps. It doesn't solve everything though, I'd still like to ha

Customizing form.x widgets - how?

2006-06-22 Thread [EMAIL PROTECTED]
Is there a way to change the HTML attributes that are rendered when we use {{form.x}} widgets? Or is writing a custom tag the best way? The use-case and problem I have is when using a generic view and a form; suppose my object being edited has a field called "description". I'd like to just use {

Re: GenericForeignKey in admin

2006-06-22 Thread Jacob Kaplan-Moss
On Jun 22, 2006, at 10:24 AM, Jay Parlar wrote: > On 6/22/06, arthur debert <[EMAIL PROTECTED]> wrote: >> I've been playig with GenericForeignKey and they are great. > > I don't think any explicit work has been done yet to support the new > generic stuff in the Admin. There is in fact at least on

Setup django

2006-06-22 Thread Martin
Hi all, I just recently found out about django and started playing around with it to explore if I could use it for my new small and simple application. Looking at the features and the way django works it seem pretty much have all the features I would require. So the next step in my evalution is

Re: GenericForeignKey in admin

2006-06-22 Thread Jay Parlar
On 6/22/06, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote: > > Yeah, that's right -- there's currently no admin support. It'll get > there eventually; I just wanted the core code to get some eyeballs > before trying to write it into the admin. > > (Thanks for the pointer to the bug, Jay, I'd missed

Deployment suggestions?

2006-06-22 Thread Jay Parlar
I was just wondering what kind of deployment strategies people have been using with their Django sites? Currently, for developing, I'm working right out of an SVN checkout. For deployment, I'd ideally like to login to my production server, grab the current copy from SVN, and then *copy* the conte

Re: Deployment suggestions?

2006-06-22 Thread Michael Radziej
Jay Parlar wrote: > I was just wondering what kind of deployment strategies people have > been using with their Django sites? > > Currently, for developing, I'm working right out of an SVN checkout. > For deployment, I'd ideally like to login to my production server, > grab the current copy from

Re: Deployment suggestions?

2006-06-22 Thread Joseph Heck
svn export sounds like what you want... gives you all the bits, but without the .svn directories scattered about.-joeOn 6/22/06, Jay Parlar < [EMAIL PROTECTED]> wrote:I was just wondering what kind of deployment strategies people have been using with their Django sites?Currently, for developing, I'

Re: Setup django

2006-06-22 Thread Joseph Heck
there's always lighttpd...-joeOn 6/22/06, Martin <[EMAIL PROTECTED]> wrote: Hi all,I just recently found out about django and started playing around withit to explore if I could use it for my new small and simpleapplication.Looking at the features and the way django works it seem pretty much have a

Re: Deployment suggestions?

2006-06-22 Thread rajesh . dhawan
I SVN straight from the repository to my production path. I do the same for my own code to -- pull it from a tagged SVN version that I have tested in my dev environment. In both cases, I store the revision tag info (from svn info) into a Release Notes file for reference. This has worked wonderf

Re: Deployment suggestions?

2006-06-22 Thread Jay Parlar
On 6/22/06, Joseph Heck <[EMAIL PROTECTED]> wrote: > svn export sounds like what you want... gives you all the bits, but without > the .svn directories scattered about. > Perfect, I'd forgotten about svn export. Jay P. --~--~-~--~~~---~--~~ You received this mess

Fetching related items

2006-06-22 Thread Philipp Klein
Hey, I'm writing a small blog application in order to learn a bit more about Django. Like every other nifty web 2.0 application mine has also got tags. ;) There are basically two tables: One for the entries and one for the tags. Here are my models: --snip-- class Tag(models.Model): tagtit

Re: How test with debugging power the web interaction part?

2006-06-22 Thread rajesh . dhawan
Use Python debugger (import pdb) in your code and put pdb.set_trace() at the first break point where you want to begin debugging. Then, run your app using the standard built-in server (manage.py runserver) The break point could be in your own code or in the Django source code (for example, in an a

Re: Fetching related items

2006-06-22 Thread Waylan Limberg
On 6/22/06, Philipp Klein <[EMAIL PROTECTED]> wrote: > > Hey, > > I'm writing a small blog application in order to learn a bit more about > Django. Like every other nifty web 2.0 application mine has also got > tags. ;) > There are basically two tables: One for the entries and one for the > tags.

OT: dynamically generated files?

2006-06-22 Thread Scott Finnie
Realise this isn't django specific, would however appreciate advice. I have a django app that dynamically generates image files based on user queries. During dev I use the same filename every time (so it gets overwritten for each request) however that won't do for production. My proposed solu

'got multiple values for keyword argument' error

2006-06-22 Thread Corey Oordt
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': 'sele

Re: OT: dynamically generated files?

2006-06-22 Thread Jay Parlar
On 6/22/06, Scott Finnie <[EMAIL PROTECTED]> wrote: > > Realise this isn't django specific, would however appreciate advice. > > I have a django app that dynamically generates image files based on user > queries. During dev I use the same filename every time (so it gets > overwritten for each req

Re: 'got multiple values for keyword argument' error

2006-06-22 Thread rajesh . dhawan
Can you show the excerpt of your view including the line number at which this happens? --~--~-~--~~~---~--~~ 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@googlegr

Re: OT: dynamically generated files?

2006-06-22 Thread Scott Finnie
Just until they've gone in the response. - Scoot. Jay Parlar wrote: > On 6/22/06, Scott Finnie <[EMAIL PROTECTED]> wrote: >> Realise this isn't django specific, would however appreciate advice. >> >> I have a django app that dynamically generates image files based on user >> queries. During d

Re: OT: dynamically generated files?

2006-06-22 Thread Jay Parlar
On 6/22/06, Scott Finnie <[EMAIL PROTECTED]> wrote: > > Just until they've gone in the response. Your best bet then is probably to use the tempfile module, to generate guaranteed unique filenames. Then just clean them up on occasion. You might also be able to pull off a StringIO based solution,

Re: OT: dynamically generated files?

2006-06-22 Thread Don Arbow
On Jun 22, 2006, at 1:33 PM, Scott Finnie wrote:Realise this isn't django specific, would however appreciate advice.I have a django app that dynamically generates image files based on user queries.  During dev I use the same filename every time (so it gets overwritten for each request) however that

Re: OT: dynamically generated files?

2006-06-22 Thread Simon Willison
On 22 Jun 2006, at 21:33, Scott Finnie wrote: > My proposed solution is to insert the session id into the filename > (since, for a given session, there can only be one image used at any > given time). That should work but will need a cleanup job to clear > the > temp dir periodically. > > So

Re: 'got multiple values for keyword argument' error

2006-06-22 Thread Corey Oordt
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: /opt/loc

Re: Fetching related items

2006-06-22 Thread Philipp Klein
Damn. I knew it was something dumb. Thank you very much. --~--~-~--~~~---~--~~ 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 t

Re: 'got multiple values for keyword argument' error

2006-06-22 Thread rajesh . dhawan
I would still like to see the definition of the select_date_for_pub() view method. I have seen errors similar to this where it was the positional parameters defined in my method caused this. You see this exception in base.py because that's where it's first trapped by Django. It could still be you

Re: OT: dynamically generated files?

2006-06-22 Thread rajesh . dhawan
If your images are small and you don't mind serving them from memory rather than files on disk, take a look at the cStringIO section of the "outputting PDFs" document: http://www.djangoproject.com/documentation/outputting_pdfs/ You should be able to use that technique to serve an image with the a

Re: How do I use a custom FilterSpec?

2006-06-22 Thread Adrian Holovaty
On 6/22/06, MattiasN <[EMAIL PROTECTED]> wrote: > However I don't understand what I should change. "beacause each > FilterSpec now takes a model parameter" doesn't mean anything to me... > How do I register the filterspec now? Where should I place it and so > on. > > (The dirty fix is of course pa

Re: overriding-default-model-methods what am i doing wrong ?

2006-06-22 Thread coulix
yes it was, thanks. --~--~-~--~~~---~--~~ 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 email to [EMAIL PROTE

Re: Setup django

2006-06-22 Thread djx
If the traffic is also small, maybe can use the development server? See http://www.djangoproject.com/documentation/tutorial1/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this gr

Re: Using Exclude w/ Many to Many Relationships

2006-06-22 Thread Malcolm Tredinnick
On Thu, 2006-06-22 at 15:48 +, [EMAIL PROTECTED] wrote: > I have found that, in some cases, the following also works (I have a > similar model where using the slug of the related object does not work > but using it's PK works): > > tag_id = Tag.objects.get(tag = 'nopush').id > x = Server.obje

Re: 'got multiple values for keyword argument' error

2006-06-22 Thread Corey Oordt
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 (code=pub).reservation_set.filter(pub_date__gte=datetime.dateti

Re: Using Exclude w/ Many to Many Relationships

2006-06-22 Thread rajesh . dhawan
Malcolm is dead on! In fact, I should've mentioned that the case that works for me is an inclusion query rather than an exclusion e.g. find all articles that have the topic soccer, where articles and topics have a many-to-many relationship. For exclusions like the one sought by the OP, an extra

Re: 'got multiple values for keyword argument' error

2006-06-22 Thread rajesh . dhawan
The positional argument "pub" in your method is causing the problem, I think. Replace it with pub=None and let me know if that fixes things: def select_date_for_pub(pub=None, template_name=None): --~--~-~--~~~---~--~~ You received this message because you are sub

Advanced Locale from URL middleware

2006-06-22 Thread jon1012
A middleware that permits to change the locale based on the url was posted here one month ago by Atlithorn. For example, when you go to /fr/article/*** you get the article in french, and when you go to /en/article/*** you get the article in english... I've gone a little further making a version

Re: Advanced Locale from URL middleware

2006-06-22 Thread jon1012
the last code has a bug, here is the new one, and sorry :) class LocaleURLMiddleware: def get_language_from_request (self,request): from django.conf import settings import re supported = dict(settings.LANGUAGES) lang = settin

Re: 'got multiple values for keyword argument' error

2006-06-22 Thread Corey Oordt
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 22

Re: 'got multiple values for keyword argument' error

2006-06-22 Thread rajesh . dhawan
Ah..I should've noticed this earlier, but you are missing the mandatory first argument 'request' in your view function. That's causing Python to assign pub as the first argument i.e. request, and then yet another time with the actual value. That must be why you're getting this error. --~--~-

Re: 'got multiple values for keyword argument' error

2006-06-22 Thread Corey Oordt
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

Re: How test with debugging power the web interaction part?

2006-06-22 Thread mamcxyz
Now... I'm falling in love ;) This is the most wonderfull "hack" in long time. Also, for the record so if other newbie like me try this stuff: Write "next" so you can see execute line by line With "quit" you generate cute 500 error ! With "continue" the flow is restarted --~--~-~--~

Re: a easy way of orderlist?

2006-06-22 Thread Adrian Holovaty
On 6/22/06, momobear <[EMAIL PROTECTED]> wrote: > hi, I use the generic view object_list to display my result, but now I > want the result to be showed like the page in django admin-site, we can > click the column to let it on desc or asc ordering, the admin-site > seems complex to me, is there an

Re: Advanced Locale from URL middleware

2006-06-22 Thread Adrian Holovaty
On 6/22/06, jon1012 <[EMAIL PROTECTED]> wrote: > the last code has a bug, here is the new one, and sorry :) Hi Jon, Can you post that to http://code.djangoproject.com/wiki/ContributedMiddleware ? Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~

Re: Template to Render Unknown Number of Arguments

2006-06-22 Thread Paul Childs
Thanks for your input Malcom. I'm going to take a look at extending with new template tags. --~--~-~--~~~---~--~~ 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@goo

Re: Template to Render Unknown Number of Arguments

2006-06-22 Thread Paul Childs
You do have a point spacedman. I might be able to massage the data in a view. It actually happens to be the results of a generic view, an update_object to be precise. It is a model and the model in which it is a foreign key i.e. edit_inline. Works great in the admin interface (it's rendered quite

Re: Setup django

2006-06-22 Thread Malcolm Tredinnick
On Thu, 2006-06-22 at 16:48 -0700, djx wrote: > If the traffic is also small, maybe can use the development server? > See > > http://www.djangoproject.com/documentation/tutorial1/ Please don't suggest that. The development server is very much not appropriate for any kind of production use. There

Re: a easy way of orderlist?

2006-06-22 Thread Tyson Tate
On Jun 22, 2006, at 7:01 PM, Adrian Holovaty wrote: > On 6/22/06, momobear <[EMAIL PROTECTED]> wrote: >> hi, I use the generic view object_list to display my result, but >> now I >> want the result to be showed like the page in django admin-site, >> we can >> click the column to let it on des

Re: Setup django

2006-06-22 Thread SmileyChris
Hi Martin, Django works alright with FastCGI, so if you can get that installed it looks like your best bet. Check out this page for some installation info for a shared environment: http://wiki.dreamhost.com/index.php/Django --~--~-~--~~~---~--~~ You received this

Same name on project and app causes error

2006-06-22 Thread [EMAIL PROTECTED]
Hi, this is more an information for people having the same problem like me then a discussion. Never use the same name for a project and an application. manage.py will not start anymore and return following error: Environment variable DJANGO_SETTINGS_MODULE is undefined. Just renaming project o

Forein keys from application tables to Authentication tables

2006-06-22 Thread [EMAIL PROTECTED]
Hi, i like to use the authentication modules in the contrib modul of django (using 0.95). But i have to build a foreign key with the user id to my tables in my application. I have to know which record in my local tables is depending to which auth group. Until now i did not find a solution to bu