memcached + multiple virtual hosts

2006-02-09 Thread Roberto Aguilar
Hello, I'm planning on running multiple websites on one server using virtual hosts. I also want to run memcached and wanted to know what the best way to avoid "name collisions". Would the right thing to do be run multiple instances of memcached on different ports, or does memcached somehow acco

making email required

2006-02-09 Thread char
I'm just wondering what the best way is to make User.email a required field. I wouldn't think I'd be required to modify django's source but I'm not sure. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django user

tiny patch to improve the url validating regex

2006-02-09 Thread EricHsu
hey guys, when I tried to save an "https://..."; url into the db, the django's manipulator kept complaining that it was invalid. It is because the django/core/validators.py's url_re is a little bit too simple, the url_re pattern accepts only url begins with "http://";. I've read the RFC3986 whic

admin interface can't find table

2006-02-09 Thread James_Martin
So this is a strange problem...I'm getting the Following error when try to view the list mode of my court_detals object in the Admin interface. OperationalError at /admin/contrack/court_details/ (1109, "Unknown table 'contrack_locations' in order clause") Request Method: GET Request URL:

OneToOneField extending User: is this the best way?

2006-02-09 Thread arthur debert
Hi folks. I realize this is a recurring question on this list but I have not found an authoritative answer, maybe some one can show me the best path to take. I want to add new fields to a User class. should I: 1) extend from auth.User as described in the wiki. This seems nice, but I feel like

Re: Making Django Development server available to local network.

2006-02-09 Thread gizo
Jan Rademaker wrote: > Panos Laganakos wrote: > > I am using a local server for all web development stuff. So I set up > > django on it and started the tutorial. > You could try 'manage runserver 0:8000' so it won't bind to a specific > interface/ip address. Panos, I was about to ask the same qu

integer field's type?

2006-02-09 Thread sam
I observed a weird thing with the integer field defined inside a model class. Suppose I have SEX_TYPE_CHOICES = ( (1, 'male), (2, 'female'), ) class Person(meta.Model): sex = meta.Integerfield(choices=SEX_TYPE_CHOICES) def is_male(self): if self.sex == 1: retu

Re: Deleting ForeignKey Delets my Object!

2006-02-09 Thread Siah
Jonathan, Don't be unkind to my schema. I enjoyed your blog though. Sia

Re: recursive template calls

2006-02-09 Thread Shannon -jj Behrens
> You don't *need* recursion on templates for threaded messages like > your example app, that's exactly the point :) Julio, with all due respect for your programming prowess, I *like* recursion. It can often make hard problems easy, even when generating HTML. Anyway, I figured out how to solv

Re: custom admin view for edit_inline object

2006-02-09 Thread Colleen Owens
On 09 Feb, 2006, at 13.21, Robert Wittams wrote: > > The overrides stuff is just to allow TABULAR and STACKED to continue to > work, without meaning that the core django has a dependency on the admin > code. > > As you are defining your own class, that shouldn't matter for you, you > can just us

Re: editing multiple records

2006-02-09 Thread Jason Huggins
Patrick, I'm using Django right now for my in-house Finance department to "bulk" edit multiple items. You'd be surprised how I'm doing it, though. I'm generating an XML file and letting the user download it from the website... Then they use Excel for the "bulk editing", save again as XML, and rep

Re: custom admin view for edit_inline object

2006-02-09 Thread Jacob Kaplan-Moss
On Feb 9, 2006, at 12:21 PM, Robert Wittams wrote: PS Jacob is currently changing this code. So it might be that all this gets broken in the near future, as the plan seems to be to abandon non-AJAX edit inline AFAIK. Not quite the severely, actually -- I'm just changing the TABULAR/ STACKE

Re: custom admin view for edit_inline object

2006-02-09 Thread Robert Wittams
Colleen Owens wrote: >>Did you read the line: >> >>Inline editing can be customised. rather than using >>edit_inline=meta.TABULAR or meta.SOURCE, you can define a custom inline >>editing mode. This is done by subclassing BoundRelatedObject?, and using >>that class. eg edit_inline=HorizontalScrolle

Re: "... is an invalid model parameter" -- huh?

2006-02-09 Thread Tobias
Thanks for answering so fast. I didn't see this anywhere, but I didn't understand how it is supposed to work after reading http://www.djangoproject.com/documentation/db_api/#many-to-one-relations (just behind the one-to-one part, but obviously not working in a similar way), and I don't understand

Re: "... is an invalid model parameter" -- huh?

2006-02-09 Thread Adrian Holovaty
On 2/9/06, Tobias <[EMAIL PROTECTED]> wrote: > class KeyData(meta.Model): > orga_id = meta.ForeignKey(Unternehmen, db_column='id') > keyd_year = meta.IntegerField() > # ... > id = meta.IntegerField(primary_key=1) > # this causes the error: > the_unternehmen = meta.ManyToOne

Re: custom admin view for edit_inline object

2006-02-09 Thread Colleen Owens
> Did you read the line: > > Inline editing can be customised. rather than using > edit_inline=meta.TABULAR or meta.SOURCE, you can define a custom inline > editing mode. This is done by subclassing BoundRelatedObject?, and using > that class. eg edit_inline=HorizontalScroller?. > > You can look a

"... is an invalid model parameter" -- huh?

2006-02-09 Thread Tobias
Hi, I get a very strange (and not very helpful, at least to a Django newbie) error message when trying to establish a ManytoOne-relation. This is what I have: class Unternehmen(meta.Model): id = meta.IntegerField(primary_key=1) # ... class KeyData(meta.Model): orga_id = meta.Forei

Re: custom admin view for edit_inline object

2006-02-09 Thread Robert Wittams
Colleen Owens wrote: >>There is a simple way to create special admin templates for one object. >>See >>http://code.djangoproject.com/wiki/NewAdminChanges#Adminconvertedtoseparatetemplates >> >>HTH, >>Edgars > > > Thanks for the link, I hadn't seen this before. I basically derived the > same solu

Re: Deleting ForeignKey Delets my Object!

2006-02-09 Thread Eric Walstad
On Wednesday 08 February 2006 22:00, Jonathan Ellis wrote: > On 2/8/06, Siah <[EMAIL PROTECTED]> wrote: > > I have a model similar to: > > > > class Phone(meta.Model): > > number = meta.CharField(maxlength=50, null=True) > > > > class Contact(meta.Model): > > phone = meta.ForeignKey(Phone,

Re: locale settings

2006-02-09 Thread TT
Hello again. I didn't previously meant to be impolite. I'm quote new to Django and I really like it. But I was just wondering this implementation for time formatting. Seems like this considers no one else but me or I posted this to wrong group. I just wanted to ask if this really is the best way

Re: truncate html filter?

2006-02-09 Thread Luke Skibinski Holt
It's probably not ideal for your needs, but I put an 'abstract' (or a 'short_desc') field for user's to enter a summarization of their data, then use the abstract with the list views to link to a more detailed view - it depends entirely on one's situation though. You could of course just strip ou

Re: truncate html filter?

2006-02-09 Thread Jason F. McBrayer
Adrian Holovaty <[EMAIL PROTECTED]> writes: > On 2/8/06, Milton Waddams <[EMAIL PROTECTED]> wrote: >> I'm wondering if anyone has a filter which safely truncates html so as >> not to chop through tags. > > Hey Milton, > > You could try using the Python interface to HTML Tidy: Beautiful Soup (htt

Re: custom admin view for edit_inline object

2006-02-09 Thread Colleen Owens
> There is a simple way to create special admin templates for one object. > See > http://code.djangoproject.com/wiki/NewAdminChanges#Adminconvertedtoseparatetemplates > > HTH, > Edgars Thanks for the link, I hadn't seen this before. I basically derived the same solution on my own, except that I a

Re: How to use non English characters in templates

2006-02-09 Thread [EMAIL PROTECTED]
"uakti" wrote: > Also check that you have python configured for UTF-8. I have this code > in sitecustomize.py on lib/site-packages. > > import sys > sys.setdefaultencoding('utf-8') please don't recommend people to mess with the default encoding. python breaks in subtle ways if you do this, third

Re: How to use non English characters in templates

2006-02-09 Thread uakti
Also check that you have python configured for UTF-8. I have this code in sitecustomize.py on lib/site-packages. import sys sys.setdefaultencoding('utf-8')

Re: Tiny myce

2006-02-09 Thread akaihola
Doesn't your HTML render as expected in the editor, or do you get unexpected results when viewing the resulting HTML outside admin? If you're used to hand-coding your HTML, remember that with wysiwyg editors, your HTML is not your HTML anymore: you'll have to live with the machine-generated markup

Re: recursive template calls

2006-02-09 Thread Julio Nobrega
You don't *need* recursion on templates for threaded messages like your example app, that's exactly the point :) On 2/8/06, Shannon -jj Behrens <[EMAIL PROTECTED]> wrote: > > Sorry, guys, I'm confused. I *did* search before posting, but wasn't > able to find a full answer. I saw someone doing

Re: Upcoming project... 0.91 or svn or magic-removal?

2006-02-09 Thread Rudolph
Hi all, I've got the same "problem". My projects must be finished within a couple of weeks. I tried trunk and Magic Removal, trunk seems to be stable enough to just use it, and Magic Removal still has lot's of things broken. For a new Django user like me, I would start with the trunk but keep an

Re: custom admin view for edit_inline object

2006-02-09 Thread Edgars Jekabsons
On Thu, 09 Feb 2006 03:13:04 +0200, Colleen Owens <[EMAIL PROTECTED]> wrote: Again, what I'm trying to do is customize the way inline-edited objects are displayed for one of my applications (without affecting any other application). First I changed line 52 of django/contrib/admin/templates/adm

Is there a solution in Django?

2006-02-09 Thread PythonistL
Hi Because I use non English characters I used: ALTER DATABASE `db_name` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci but now, when I want to insert some values into the database, I get the error: (1267, "Illegal mix of collations (utf8_general_ci,IMPLICIT) and (latin1_swedish_ci,COERCIB

Re: truncate html filter?

2006-02-09 Thread Milton Waddams
On 2/9/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > On 2/8/06, Milton Waddams <[EMAIL PROTECTED]> wrote: > > I'm wondering if anyone has a filter which safely truncates html so as > > not to chop through tags. > > Hey Milton, > > You could try using the Python interface to HTML Tidy: > > htt

Re: Tiny myce

2006-02-09 Thread mary
Thanks very much it is working now and i am testing it but the problem that i am facing a problem is that TinyMyce is changing the Html code that i am writing i don't know why? and how i could let him write the html code that i need as example my Url has certain color but he changes them to the bl