Re: kinda really nOOb question: how to for loop an integer in template?

2006-01-04 Thread EricHsu
Guys, I created the range0 (0-index) and range1 (1-index filter $ svn diff defaultfilters.py Index: defaultfilters.py === --- defaultfilters.py (revision 1813) +++ defaultfilters.py (working copy) @@ -433,6 +433,14 @@ from p

Re: kinda really nOOb question: how to for loop an integer in template?

2006-01-04 Thread limodou
2006/1/4, EricHsu <[EMAIL PROTECTED]>: > > Guys, I created the range0 (0-index) and range1 (1-index filter > > $ svn diff defaultfilters.py > Index: defaultfilters.py > === > --- defaultfilters.py (revision 1813) > +++ defaultfilter

Re: kinda really nOOb question: how to for loop an integer in template?

2006-01-04 Thread EricHsu
hi all, I've submitted it as a ticket :) http://code.djangoproject.com/ticket/1162

Re: kinda really nOOb question: how to for loop an integer in template?

2006-01-04 Thread limodou
2006/1/4, EricHsu <[EMAIL PROTECTED]>: > > hi all, I've submitted it as a ticket :) > > http://code.djangoproject.com/ticket/1162 > > Good! Just let us waiting... -- I like python! My Blog: http://www.donews.net/limodou NewEdit Maillist: http://groups.google.com/group/NewEdit

what is the best way to capture the subdomain and send it to a view?

2006-01-04 Thread Le Roux
I'm writing a web service where you get your own http://yourname.mydomain.com. Think something like blogger where you get http://yourname.blogspot.com. The url configuration only searches on the bit of url _after_ the domain name. I obviously want only one instance of django serving up all the su

Re: what is the best way to capture the subdomain and send it to a view?

2006-01-04 Thread Jason Davies
Le Roux wrote: > I'm writing a web service where you get your own > http://yourname.mydomain.com. Think something like blogger where you > get http://yourname.blogspot.com. The url configuration only searches > on the bit of url _after_ the domain name. > > I obviously want only one instance of dj

Re: track/pingback libraries recommended for django-powered apps

2006-01-04 Thread Jeroen Ruigrok van der Werven
On 1/3/06, iGL <[EMAIL PROTECTED]> wrote: > Are there some recommendations/restrictions to consider when choosing a > track/pingback libs for a django-powered app? Are there any then? -- Jeroen Ruigrok van der Werven

Re: track/pingback libraries recommended for django-powered apps

2006-01-04 Thread iGL
Here're what I've have found: http://www.dellah.com/orient/2003/01/16/pingback-to-trackback-01-for-python http://stompstompstomp.com/weblog/entries/76/ http://stompstompstomp.com/weblog/entries/76/

Re: track/pingback libraries recommended for django-powered apps

2006-01-04 Thread iGL
iGL wrote: > Here're what I've have found: > > http://www.dellah.com/orient/2003/01/16/pingback-to-trackback-01-for-python > > http://stompstompstomp.com/weblog/entries/76/ > > http://stompstompstomp.com/weblog/entries/76/ sorry: should be this: http://stompstompstomp.com/weblog/entries/77/

NEW JOBS OF THIS WEEK

2006-01-04 Thread SUNAYANA
New JOBS POSTED are as follows : REQ Software Engineer (JOB Code: SE-01-0106) SSA Global Technologies REQ Programmer(FRESHER) Compare Infobase Pvt. Ltd Req C/C++/VB/VC++ professionals Kale Consultants Req Testing Engineer(JAVA) Salix Resources HCL Req VC++ MFC Professionals (106 POSTIONS) HCL T

Re: Images. Stylesheets. Javascripts. Where do I put 'em.

2006-01-04 Thread iGL
on windows, MEDIA_URL and MEDIA_ROOT, did not quit help; I haven't understood why... all I did then was to put: in urls something like r'^m/(?P.*)$', 'media', {'document_root': 'D:\\django\\testapp\\media\\'}), and in views from django.views.static import serve media = serve and in the base

cross importing application in models

2006-01-04 Thread Dody Suria Wijaya
Hi, need a hand on this. I have two applications, called accounting and enterprise, located in myproject/accounting and myproject/enterprise. enterprise has a model which has foreign keys in accounting. so I import it beforehand: from django.models import accounting class Company(meta

Re: Images. Stylesheets. Javascripts. Where do I put 'em.

2006-01-04 Thread limodou
2006/1/4, iGL <[EMAIL PROTECTED]>: > > on windows, MEDIA_URL and MEDIA_ROOT, did not quit help; I haven't > understood why... MEDIA_URL is used for file or image upload. > > all I did then was to put: > > in urls something like > r'^m/(?P.*)$', 'media', {'document_root': > 'D:\\django\\testapp\\m

Re: what is the best way to capture the subdomain and send it to a view?

2006-01-04 Thread Le Roux
Thanks. I'll do that. It just feels like that type of thing should happen outside of the view (and come to the view as a parameter). The other thing is that _all_ my views will need this and to me that just feels a bit dirty. I guess it is probably the best way, though.

Re: what is the best way to capture the subdomain and send it to a view?

2006-01-04 Thread Edgars Jekabsons
On Wed, 04 Jan 2006 16:31:34 +0200, Le Roux <[EMAIL PROTECTED]> wrote: Thanks. I'll do that. It just feels like that type of thing should happen outside of the view (and come to the view as a parameter). The other thing is that _all_ my views will need this and to me that just feels a bit dirt

Superfluent _id in field name results in SQL error

2006-01-04 Thread Arthur
Hi all The following (simplified) model gives the SQL error "ERROR: column "invoice_number" does not exist": class Invoice(meta.Model): invoice_number = meta.PositiveIntegerField(primary_key=True) class Invoice_item(meta.Model): # General invoice item invoice_number = meta.ForeignKey(I

deleting multiple objects

2006-01-04 Thread patrick kranzlmüller
i like the way, related objects are being displayed (and deleted) in the admin-interface and i´d like to integrate that into my application. is there a way to display (and delete) multiple related objects using generic views? right now, i am importing some stuff from admin.main like _get_d

Re: what is the best way to capture the subdomain and send it to a view?

2006-01-04 Thread Le Roux
I thought about that and actually started implementing it, but then I realised that it is not very maintainable and things will be too coupled. (I like using the development server for development and I would like to try and deploy on lighttpd) Plus then every resource effectively has two urls wh

Re: what is the best way to capture the subdomain and send it to a view?

2006-01-04 Thread hugo
>happen outside of the view (and come to the view as a parameter). The >other thing is that _all_ my views will need this and to me that just >feels a bit dirty. I guess it is probably the best way, though. The easiest way out for that is to provide a decorator for your view functions that just t

Re: ANN: Another Django app at washingtonpost.com

2006-01-04 Thread Adrian Holovaty
On 1/3/06, Jeremy Dunck <[EMAIL PROTECTED]> wrote: > Who did the info graphic on top here: > http://www.washingtonpost.com/wp-dyn/content/custom/2005/12/30/CU2005123001137.html The graphics staff. See the bottom of that page for info. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com |

customizing appearance of foreign key edited inline

2006-01-04 Thread Colleen Owens
Hi, I'm having trouble figuring out how to customize the appearance of a foreign key that's edited inline in the admin interface. For example, if I wanted to change how the poll choices from the tutorial are displayed, by suppressing the number of votes, or changing the order in which the votes and

Re: Superfluent _id in field name results in SQL error

2006-01-04 Thread Dody Suria Wijaya
I agree, there seems to be a small typo in django/core/management.py col_type = db.DATA_TYPES[data_type] if col_type is not None: --> field_output = [db.db.quote_name(f.column), col_type % rel_field.__dict__] field_output.append('%sNULL' % (not f

Re: Superfluent _id in field name results in SQL error

2006-01-04 Thread Arthur
Hi >> The following (simplified) model gives the SQL error "ERROR: >> column "invoice_number" does not exist": >> >> class Invoice(meta.Model): invoice_number = >> meta.PositiveIntegerField(primary_key=True) >> >> class Invoice_item(meta.Model): # General invoice item >> invoice_number = meta.For

Re: Undo in Django

2006-01-04 Thread Mike
I'd say, in your 'change history' table, place a field and save the state of all effected data before the actual change is frozen. Good luck, Armin

Re: built-in reference

2006-01-04 Thread The Boss
Nevermind. It magically started working when I tried to show someone how it didn't work.

Re: Superfluent _id in field name results in SQL error

2006-01-04 Thread Dody Suria Wijaya
Sure thing, Arthur. From my observation, it's a kind of convention built into django on every ForeignKey field. Those get a default column name with '_id' suffix. But it's easily overridden by specifying db_column parameter. As of Primary key, the only magic I know is if a model does not have

Re: cross importing application in models

2006-01-04 Thread oggie rob
> I think this requires a lazy-fication. Perhaps another solution is each linking to a separate (common) table? That avoids referencing issues. -rob

Re: cross importing application in models

2006-01-04 Thread Dody Suria Wijaya
You meant another table that designed specifically to link those fields? This come to mind: class CompanyAccount(meta.Model): company = meta.ForeignKey(enterprise.Company) account = meta.ForeignKey(accounting.Account) or better, a OneToOneField since a company's main account is s

Re: cross importing application in models

2006-01-04 Thread oggie rob
> or better, a OneToOneField since a company's main account is singular, I have never tried this: > class CompanyAccount(meta.Model): company = meta.OneToOneField(enterprise.Company) account = meta.ForeignKey(accounting.Account) So what do you need the extra table for?! Can't you ju

Re: built-in reference

2006-01-04 Thread Simon Willison
On 4 Jan 2006, at 19:42, The Boss wrote: Nevermind. It magically started working when I tried to show someone how it didn't work. It probably just needed a server restart. Django's development server code reloading stuff work's for most cases, but if you're seeing odd behaviour it's oft

Re: django_website setup

2006-01-04 Thread [EMAIL PROTECTED]
anybody can help me here? please.

Re: django_website setup

2006-01-04 Thread Ian Holsman
hi Roy. you should probably be trying the 4 tutorials and create the 'polls' application first. the django_website is not really designed for newbies, but more as a reference on how to do things. regards Ian. On 1/5/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > anybody can help me here? p

Re: cross importing application in models

2006-01-04 Thread Dody Suria Wijaya
No, the foreign key looks the same, but logically it's for different purpose. You can easily imagine a table of Paint Suppliers, with a field for their cheapest color product. And another table listing all color products from all suppliers, with a field identifying which supplier owns the pro