Re: Authentication not applied in base template

2008-02-20 Thread James Bennett
On Wed, Feb 20, 2008 at 5:18 PM, quizkiwi <[EMAIL PROTECTED]> wrote: > Is there some difference in authentication between the app and the > main site? http://www.djangoproject.com/documentation/templates_python/#subclassing-context-requestcontext -- "Bureaucrat Conrad, you are technically co

Re: managers vs static/class methods ?

2008-02-21 Thread James Bennett
On Thu, Feb 21, 2008 at 9:35 AM, glopglop <[EMAIL PROTECTED]> wrote: > Not trying to be slow-witted, but couldn't you do > > objects = MyModel.unfiltered() if request.user.is_admin else > MyModel.filtered() > (where objects is a queryset) > > is there a functionnal difference or is it more of

Re: Django minify and combine script?

2008-02-23 Thread James Bennett
On Sat, Feb 23, 2008 at 8:26 AM, Thierry <[EMAIL PROTECTED]> wrote: > I've recently made the switch from Symfony to Django. > Some interesting code here :) > When searching around I can't seem to find any javascript and css > minifier and combiner. > Can anyone recommend a good one? Just a f

Re: newforms pre-populating with model

2008-02-24 Thread James Bennett
On Sun, Feb 24, 2008 at 11:02 PM, k4ml <[EMAIL PROTECTED]> wrote: > Get the instance:- > customer = Customer.objects.get(id=1) > > Create form instance and pass a dict of data from customer instance:- > form = CustomerForm(initial=customer.__dict__) #instance of ModelForm If you have a look a

Re: scaffold with Django

2008-02-25 Thread James Bennett
On Mon, Feb 25, 2008 at 6:24 AM, bcurtu <[EMAIL PROTECTED]> wrote: > Is there any kind of utility for automatic scaffolding? By preference, Django development does not involve generation of static files of code on disk; instead, functionality like "show a form to create an object", "show a list

Re: single-field, single-instance models

2008-02-25 Thread James Bennett
On Mon, Feb 25, 2008 at 10:06 AM, Daniel Roseman <[EMAIL PROTECTED]> wrote: > Sounds like a job for dbsettings: > http://code.google.com/p/django-values/ Or flatpages. -- "Bureaucrat Conrad, you are technically correct -- the best kind of correct." --~--~-~--~~~-

Re: Unexpected newforms/sites behavior

2008-02-25 Thread James Bennett
On Mon, Feb 25, 2008 at 9:10 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Which - as expected - creates a multi-select box with the appropriate > cars. Problem is, when the user selects one the form validation kicks > it out, saying it is not a valid choice. If I don't use the custom > w

Re: Unexpected newforms/sites behavior

2008-02-25 Thread James Bennett
On Mon, Feb 25, 2008 at 10:14 AM, Doug B <[EMAIL PROTECTED]> wrote: > Assign your choices to the ChoiceField. The Field class is what does > the validation, not the widget. By passing them into just the widget > they are displaying, but not in the Fields 'approved' list. No, he really really

Re: Unexpected newforms/sites behavior

2008-02-25 Thread James Bennett
On Mon, Feb 25, 2008 at 11:55 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Correction... ModelChoiceField works as expected. It's when I try to > set it as a multi-select that I get the sql error: For multi-select, use ModelMultipleChoiceField. -- "Bureaucrat Conrad, you are technical

Re: django model concurrency?

2008-03-01 Thread James Bennett
On Fri, Feb 29, 2008 at 5:02 PM, kbs <[EMAIL PROTECTED]> wrote: > Is anybody aware of any documentation related to how django ORM > handles concurrency? I am assuming that it is delegated to the > database. Anyway, I did a test using a threaded client to call a view > and increment a shared fi

Re: revert database migration

2008-03-02 Thread James Bennett
On Sun, Mar 2, 2008 at 11:45 PM, stranger <[EMAIL PROTECTED]> wrote: > Is there a way in django where we can migrate the changes in model, > or revert back database changes to the original(fresh). You probably want to search the archive of this list, which is publicly available and powered by

Re: has "newforms-admin" branch been integrated?

2008-03-02 Thread James Bennett
On Mon, Mar 3, 2008 at 1:48 AM, Niklas Collin <[EMAIL PROTECTED]> wrote: > I was wondering if (and I quote the manual chapter 17 ;) the > "newforms-admin"-branch has been integrated yet? Have you considered looking for an announcement regarding that, or perhaps looking at the timeline for a "ne

Re: Upgrade to development version - Admin no longer works

2008-03-03 Thread James Bennett
On Mon, Mar 3, 2008 at 10:29 AM, merric <[EMAIL PROTECTED]> wrote: > There is no VIEW called "help_no_cookies" in the promotions.views > module. Should there be? You apparently have an old URL pattern somewhere in your project which tries to reference such a view; previously this was not an er

Re: Permissions and login

2008-03-05 Thread James Bennett
On Wed, Mar 5, 2008 at 2:53 PM, Monica Leko <[EMAIL PROTECTED]> wrote: > Why first condition? Why checking is user authenticated? Doesn't the > request.user.has_permit("polls.can_vote) already imply that user is > authenticated? Can anonymous users have permissions? If they can, > and if

Re: Documentation Project [No django directly related]

2008-03-05 Thread James Bennett
On Wed, Mar 5, 2008 at 3:52 PM, Grupo Django <[EMAIL PROTECTED]> wrote: > These anotations are not 100% real, I've been looking only for a few > hours documentation about them, I don't know all the features of each > system yet. reST has two advantages: 1. Django already supports it for auto-

Re: Multiple apps on one template

2008-03-08 Thread James Bennett
On Sat, Mar 8, 2008 at 2:52 PM, DuncanM <[EMAIL PROTECTED]> wrote: > And I have a home page that I would like to display a "widget" (5 most > relevant of each) on that home page... > In the current situation I have created the view in the Events > application. How would I create a view extern

Re: App not showing up in Admin Site

2008-03-09 Thread James Bennett
On Sun, Mar 9, 2008 at 7:46 AM, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > then use the docs for .96 - but it is far better to use the svn trunk > as there are a lot of goodies there that .96 doesnt have. Also when > you do upgrade you will face a lot of backward compatible problems Somewh

Re: Add a new line in TextField

2008-03-09 Thread James Bennett
On Sun, Mar 9, 2008 at 8:06 AM, Daniel de la Cuesta <[EMAIL PROTECTED]> wrote: > How can I insert a return carriage and new line in a "TextField"? Yes, by pressing the "Enter" or "Return" key, as appropriate for your keyboard layout, or by copy/pasting some line breaks from elsewhere. Here are se

Re: Using mod in if in template

2008-03-24 Thread James Bennett
On Mon, Mar 24, 2008 at 2:12 PM, Tim Sawyer <[EMAIL PROTECTED]> wrote: > Unfortunately, I can't do the mod (%) in the if statement, as it's not valid > syntax. Is there a way around this, or a simpler solution? The first thing to do is to step back and remember that the Django template languag

Re: How often do you update your django?

2008-03-26 Thread James Tauber
jects. Just thought I'd add that as the original poster is new to getting stuff from svn. James On Mar 25, 2008, at 12:58 PM, Justin Lilly wrote: > I update it every time I'm reminded of it (I just updated), at the > end of a sprint or when I get errors (in hopes it was a b

Re: Using a Read-Only model for data, second database for "django stuff"

2008-03-26 Thread James Bennett
On Wed, Mar 26, 2008 at 8:08 AM, Jesse Noller <[EMAIL PROTECTED]> wrote: > I've been handed the task of doing a bit of data-mining on a bugzilla > database, and rather than work through the straight SQL, or using the > somewhat awful bugzilla query interface, I would much rather build out > my

Re: Using a Read-Only model for data, second database for "django stuff"

2008-03-26 Thread James Bennett
On Wed, Mar 26, 2008 at 11:26 AM, James Bennett <[EMAIL PROTECTED]> wrote: > To transfer data to another DB, simply import the appropriate database > adapter and grab a cursor, then starting INSERT'ing or UPDATE'ing > away. (or, if you *must* use the ORM, use the s

Re: Is identity map planned for Django ORM?

2008-03-27 Thread James Bennett
There's been active discussion recently on the developers list, which is generally the place to look for information about Django development... -- "Bureaucrat Conrad, you are technically correct -- the best kind of correct." --~--~-~--~~~---~--~~ You received t

Re: Could not parse the remainder in Template?

2008-03-27 Thread James Bennett
On Thu, Mar 27, 2008 at 1:12 AM, django <[EMAIL PROTECTED]> wrote: > How do i convert {{ candidate.vote_set.filter(vote='TU').count()}} in > my view_candidate to work it properly > Right now it give me templatesyntax error Quoting the "Philosophy" section at the top of this page: http://

Re: math in django

2008-03-27 Thread James Bennett
On Thu, Mar 27, 2008 at 9:19 PM, Dan Ellis <[EMAIL PROTECTED]> wrote: > It's not possible to use aggregate functions in any Django release, > but IIRC it is something that has been added in the queryset-refactor > branch. Be careful how you say that: you're free to write any piece of SQL you l

Re: Using ModelForm...not populating my choices

2008-03-27 Thread James Bennett
On Thu, Mar 27, 2008 at 9:49 PM, Greg <[EMAIL PROTECTED]> wrote: > class SurveyForm(ModelForm): > experience = forms.ChoiceField(widget=forms.RadioSelect) A ChoiceField requires you to pass in a set of choices for it to use. -- "Bureaucrat Conrad, you are technically correct -- the best k

Re: IntegrityError: duplicate key violates unique constraint

2008-03-28 Thread James Bennett
On Fri, Mar 28, 2008 at 2:10 PM, makebelieve <[EMAIL PROTECTED]> wrote: > Saving some of my objects work, but only because early IDs have been > removed > so it isn't trying to insert an object with an existing ID. It sounds like you have a unique constraint in the DB that you haven't told Dja

Re: IntegrityError: duplicate key violates unique constraint

2008-03-28 Thread James Bennett
On Fri, Mar 28, 2008 at 2:35 PM, makebelieve <[EMAIL PROTECTED]> wrote: > I haven't added any unique contraints. It really seems as though > django doesn't know > about my existing data. If I obliterate the old data everything works > fine, but > that's not a possibility. At the database l

Re: User profile metadata problem

2008-03-28 Thread James Bennett
On Mar 28, 1:57 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > ordering = ['auth_user.first_name','auth_user.last_name'] Giving a model a default ordering based on a foreign key is not currently possible in either 0.96 or trunk. -- "Bureaucrat Conrad, you are technically correct -- the best

Re: Purpose of Complex Generic Views

2008-03-28 Thread James Bennett
On Fri, Mar 28, 2008 at 6:40 PM, bob <[EMAIL PROTECTED]> wrote: > in some examples that require extra work, we have to define a wrapper > function. What's confusing me is how is this different from just > defining regular views? I can't quite notice much reduction in code, > nor improvements

Re: scraping PDF

2008-03-28 Thread James Bennett
On Fri, Mar 28, 2008 at 10:15 PM, <[EMAIL PROTECTED]> wrote: > our state legislature has all their reports online in PDF format, i > was hoping to scrape 'em and get them and use them with django to > create something similar to what adrian did with the w-p and others > have done. There are

Re: scraping PDF

2008-03-28 Thread James Bennett
On Fri, Mar 28, 2008 at 11:21 PM, <[EMAIL PROTECTED]> wrote: > I'm trying to figure out the best way to link-up everything. Any > suggestions? So, since I talked about it at PyCon, I'll take an example from this project: http://www2.ljworld.com/data/crime/ku/ And I'll walk through this in a

Re: Is Django thread safe?

2008-03-29 Thread James Bennett
On Sat, Mar 29, 2008 at 3:52 AM, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > The best I have ever been able to get out of anyone associated with > Django development about thread safety is the comments by Jacob Kaplan- > Moss in the following thread: And that's really about the best anyone c

Re: Permissions get automatically created without class Admin in models

2008-03-30 Thread James Bennett
On Sun, Mar 30, 2008 at 8:06 AM, Carl <[EMAIL PROTECTED]> wrote: > I will open a ticket right away... Fixed in changeset 7388. -- "Bureaucrat Conrad, you are technically correct -- the best kind of correct." --~--~-~--~~~---~--~~ You received this message beca

Re: Permissions get automatically created without class Admin in models

2008-03-30 Thread James Bennett
On Sun, Mar 30, 2008 at 8:06 AM, Carl <[EMAIL PROTECTED]> wrote: > The only problem is, that those automatically created permissions have > english descriptions and I'm building something for a german-only > speaking user base. But i think i'll just change the descriptions > manually in the da

Re: Permissions get automatically created without class Admin in models

2008-03-30 Thread James Bennett
On Sun, Mar 30, 2008 at 10:47 AM, Karen Tracey <[EMAIL PROTECTED]> wrote: > Note ticket #5926 has been hanging around for a few months on this issue, > with at least 3 people (one who provided a patch) hoping the fix would be to > change the code to match the docs versus changing the docs to match

Re: Model Inheritance

2008-03-30 Thread James Bennett
On Mon, Mar 31, 2008 at 1:01 AM, jurian <[EMAIL PROTECTED]> wrote: > It's working on the latest development release. No, it's working in a branch. > Does that mean I > should move this discussion to the developers group? No, it means that if you're interested you should check out the branch,

Reloading projects on FCGI

2008-03-31 Thread James Matthews
whole project. Thanks James -- http://search.goldwatches.com/?Search=Movado+Watches http://www.jewelerslounge.com http://www.goldwatches.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Re: Custom ID field with random string

2008-03-31 Thread James Bennett
On Mon, Mar 31, 2008 at 4:00 AM, Julien <[EMAIL PROTECTED]> wrote: > I just thought I'd try to make it clearer what I'm after. Instead of > having numbers as ID for my objects, I'd like to have random strings > (e.g. "sadfwetbtyvt32452" or "fd70982876adhfd"...). Those strings have > to be uniq

Re: mark_safe for a html field

2008-03-31 Thread James Bennett
On Mon, Mar 31, 2008 at 6:40 AM, Marc Garcia <[EMAIL PROTECTED]> wrote: > I was thinking in giving a option on field definition, to make it safe > on all templates at same time. Anyway using safe filter as you > proposed is clearer than my initial solution. Since subclassing Field to create yo

Re: mark_safe for a html field

2008-03-31 Thread James Bennett
On Mon, Mar 31, 2008 at 6:46 AM, James Bennett <[EMAIL PROTECTED]> wrote: > Since subclassing Field to create your own custom model fields is easy > and documented, why not write an "HTMLField" class which calls > mark_safe() before returning a value? And though I m

Calling syncdb twice

2008-03-31 Thread James Matthews
Hi, I was wondering why you can only call "python manage.py syncdb" to create your databases but after that if you change your models file it work create the changes and you have to do them manually using SQL? Thanks James -- http://search.goldwatches.com/?Search=Movado+Wa

Re: Calling syncdb twice

2008-04-01 Thread James Matthews
Thank you! On Tue, Apr 1, 2008 at 2:56 AM, blis102 <[EMAIL PROTECTED]> wrote: > > James, > > Django Evolution is a project that is working to take care of that > problem (http://code.google.com/p/django-evolution/). I have not used > it but, if what they say on their

Re: Auth System

2008-04-01 Thread James Bennett
On Tue, Apr 1, 2008 at 3:38 PM, Mat <[EMAIL PROTECTED]> wrote: > I'm looking at django for a new project, and have a quick question, I'm > going to need a mixture of the Query-set branch and generic-auth branch, I > really need object based permissions, but it seems like generic-auth was > las

Re: sql & cache problem? Am I crazy?

2008-04-03 Thread James Bennett
On Thu, Apr 3, 2008 at 11:04 AM, sandro dentella <[EMAIL PROTECTED]> wrote: > Any light to understand/solve it? > Thanks in advance Are you using MySQL? Its (server-side, not part of Django, but rather part of the MySQL database server itself) query cache is known to cause these sorts of thin

Re: sql & cache problem? Am I crazy?

2008-04-03 Thread James Bennett
On Thu, Apr 3, 2008 at 12:57 PM, Alessandro Dentella <[EMAIL PROTECTED]> wrote: > more. I'd like to understand why one of the 2 query used the cache and the > other didn't. Nothing in Django will magically cache things when you haven't told Django to cache things. Nothing in PostgreSQL will ma

Re: Application Concepts

2008-04-07 Thread James Bennett
On Tue, Apr 8, 2008 at 1:38 AM, jurian <[EMAIL PROTECTED]> wrote: > Are django applications meant to be implemented in such a manner as to > allow the entire application directory to be copied into another > project and used without having to alter any of the code? Though I often get flamed fo

Re: Anybody successfully deployed Django to appengine? Having some problems

2008-04-08 Thread James Bennett
On Tue, Apr 8, 2008 at 4:18 AM, Mat <[EMAIL PROTECTED]> wrote: > From what I've read django seems limited on appengine, no models, I'm > assuming this is because the ORM still needs porting, is anyone going to > look at this, or is the plan to just go with google models? Any thoughts, or > am

Re: Google App Engine & Django

2008-04-08 Thread James Bennett
On Tue, Apr 8, 2008 at 12:36 PM, ydjango <[EMAIL PROTECTED]> wrote: > It pretty much excludes data driven and data intensive applications > where data consistency and reliability is very critical (ACID > properties). Yeah, Google certainly use their platform to do any data-driven or data-inten

Re: Using ModelForm...not populating my choices

2008-04-09 Thread James Bennett
On Wed, Apr 9, 2008 at 2:56 PM, ydjango <[EMAIL PROTECTED]> wrote: > Not for model form, if a ChoiceField is based on foreign Key. It is > getting values from the referenced table using the __unicode__ method > in that table and ignoring the choices field passed to it. Not in this case; the mo

Re: Using ModelForm...not populating my choices

2008-04-09 Thread James Bennett
On Wed, Apr 9, 2008 at 3:30 PM, ydjango <[EMAIL PROTECTED]> wrote: > Miles and Owner are defined as foreign_key to respective tables. Yes, but did you actually look at the docs for the field types that make it easy to represent foreign keys? -- "Bureaucrat Conrad, you are technically correct

Re: Using ModelForm...not populating my choices

2008-04-09 Thread James Bennett
On Wed, Apr 9, 2008 at 4:21 PM, ydjango <[EMAIL PROTECTED]> wrote: > owner = models.ForeignKey(Participant,null=True) Not the *model* fields, the *form* fields for representing this type of relationship. -- "Bureaucrat Conrad, you are technically correct -- the best kind of correct." --~--~-

Re: Has anyone made an MS excel exporter in a django site yet?

2008-04-09 Thread James Bennett
On Wed, Apr 9, 2008 at 5:43 PM, Roboto <[EMAIL PROTECTED]> wrote: > I'm curious =P A couple of my users are requesting that I find a way > to export some data to excel so that they can manipulate as fit. It's easy enough to dump to CSV using the Python standard library, and Excel reads that ju

Re: Tree from the model.

2008-04-10 Thread James Bennett
2008/4/11 Dmitriy Sodrianov <[EMAIL PROTECTED]>: > Is it possible to use only Django's built-in functions? Yes, but you will end up essentially re-implementing all the code in the application Alex suggested. When an application exists that helps you to do what you want, it's quite silly to go d

Re: tutorial question

2008-04-11 Thread James Bennett
On Fri, Apr 11, 2008 at 5:20 AM, sebey <[EMAIL PROTECTED]> wrote: > i am on a mac and I am running a podcasting network so I will proabley > be storing all my files in XML/RSS I think you're suffering from very severe conceptual confusion. Take a podcast and think about it logically: Each pod

Re: how do I create a zebra table using a template?

2008-04-11 Thread James Bennett
On Fri, Apr 11, 2008 at 11:10 AM, Chas. Owens <[EMAIL PROTECTED]> wrote: > Alright, call me a moron, but this isn't working. What am I doing wrong? You got bad advice. You want to read the docs on the "cycle" tag, because this specific sort of thing is what it exists for. -- "Bureaucrat Conr

Re: Allowing html tags for filter.

2008-04-11 Thread James Bennett
On Fri, Apr 11, 2008 at 11:35 AM, Dmitriy Sodrianov <[EMAIL PROTECTED]> wrote: > I have a custom filter that outputs some html code. The problem is > that it converts all "greater than" and "less than" symbols to > appropriate > and < symbols. How is it possible to say to > filter not to do t

Re: alternative to (r'^house/edit/(\d+)/$',ediHouse)?

2008-04-12 Thread James Bennett
On Fri, Apr 11, 2008 at 6:28 PM, ydjango <[EMAIL PROTECTED]> wrote: > currently I am using constructing url as /house/edit/123/ > where 123 is house data base primary key for that house. > > Can exposing the primary key in url be any security issue? > > (r'^house/edit/(\d+)/$',editHouse) > >

Re: How to use dojo toolkit in django?

2008-04-14 Thread James Bennett
On Mon, Apr 14, 2008 at 2:13 AM, Duke <[EMAIL PROTECTED]> wrote: > Where to store the dojo toolkit in the project The same place you put all other CSS stylesheets, JavaScript, images and other static files. Similarly, they will be served the same way. There is specific documentation on how to ha

Re: Application Concepts

2008-04-14 Thread James Bennett
On Fri, Apr 11, 2008 at 1:09 PM, andy baxter <[EMAIL PROTECTED]> wrote: > What /should/ be inside the project folder? I often get severely flamed for saying this, but: I very rarely have a "project folder". All it is is a place to stick a settings file and a root URLConf module, both of which a

Re: How to extend django.views.generic.date_based to return more "context variables"?

2008-04-14 Thread James Bennett
On Mon, Apr 14, 2008 at 4:41 AM, fizban <[EMAIL PROTECTED]> wrote: > In fact by default it only returns "object" (or the > template_object_name name you pass), but I need it to return "year", > "month" and "day" too. This is because in my *_detail.html template > I'd have to keep on formatting

Re: Application Concepts

2008-04-14 Thread James Bennett
On Thu, Apr 10, 2008 at 2:49 AM, jurian <[EMAIL PROTECTED]> wrote: > Does anyone else think I should add a ticket request for this as a > future feature? I'm ambivalent, but leaning toward "no". In my experience, it's very rare to have media files that are truly coupled to a single specific app

Re: Application Concepts

2008-04-14 Thread James Bennett
On Mon, Apr 14, 2008 at 6:03 AM, Waldemar Kornewald <[EMAIL PROTECTED]> wrote: > I agree that you can't always reuse those media files, but why does > that mean there shouldn't be an easy (automatic) way to serve media > files? Because Django should have nothing whatsoever to do with your medi

Re: What happened to django-updates?

2008-04-14 Thread James Bennett
On Mon, Apr 14, 2008 at 10:43 AM, John-Scott <[EMAIL PROTECTED]> wrote: > There hasn't been any updates on the django-updates mailing list since > March 18. At the time, someone on IRC said they thought it was due to > the traffic from the sprint but that was a month ago. I am tracking > trunk

Re: Enterprise applications with Django

2008-04-16 Thread James Bennett
On Wed, Apr 16, 2008 at 8:05 AM, Hussein B <[EMAIL PROTECTED]> wrote: > Is it possible to create enterprise applications (in the same context > of Java EE applications, highly concurrent, distributed ...) with > Python? Google seems to manage it... -- "Bureaucrat Conrad, you are technically

Re: Prepopulate Slugfied from Foreign Key without using the id

2008-04-17 Thread James Punteney
I ran into this issue the other day wanting to use a foreign key value to prepopulate a slugfield and just getting the id (if anything). According to the documentation[1] prepopulate doesn't support foreign keys, so I ended up going the custom javascript route in order to get it working. --

Re: Prepopulate Slugfied from Foreign Key without using the id

2008-04-17 Thread James Punteney
this is a django template file and not a plain javascript file). Overall it's pretty close to what you are wanting to do though. Hope that helps, --James On Thu, Apr 17, 2008 at 4:53 PM, Merrick <[EMAIL PROTECTED]> wrote: > > Hi James, > > thank you for respondin

Re: mail in base64

2008-04-17 Thread James Bennett
On Thu, Apr 17, 2008 at 10:16 PM, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > (1) What version of Django are you using (the mail infrastructure has > changed a bit between 0.96 and trunk, from memory)? He was using Django 0.96, and running into this (fixed on trunk) issue: http://code.djan

MultiValueField Question

2008-04-18 Thread James Snyder
Hi - I've been attempting to put together a website to use for keeping track of information for a wedding, and I'm wanting to use multiple inline lists of invitees within each group that has been sent an invite. Basically I want something like the admin interface where one can do tabular inline

Re: MultiValueField Question

2008-04-18 Thread James Snyder
It does, however, work quite well! On Apr 17, 6:31 pm, James Snyder <[EMAIL PROTECTED]> wrote: > Hi - > > I've been attempting to put together a website to use for keeping > track of information for a wedding, and I'm wanting to use multiple > inline lists

Re: how do designers create content

2008-04-19 Thread James Bennett
On Sun, Apr 20, 2008 at 1:33 AM, lee <[EMAIL PROTECTED]> wrote: > designers. Do the designers use text base editting like ultraedit or > or graphics based software like dreamweaver? Most of the artist I know > don't do much coding and are into photoshop, illustrator and > dreamweaver. Most of

Re: How to get ':' in address?

2008-04-22 Thread James Aylett
be escaped in *all* components of a URI, and in particular path segments (the bits between '/') may contain unescaped colons. HTH, James -- /--\ James Aylett

Re: Best practices for sending bulk (+4000) mail in Django / Python

2008-04-23 Thread James Tauber
s intended to be used for exactly this. It's not usable yet, but could always do with more people driving it to completion. See http://code.google.com/p/django-mailer/ James -- James Tauber http://jtauber.com/ journeyman of s

Re: MultiValueField Question

2008-04-23 Thread James Snyder
As above, I have this working now. Any suggestions on wrapping individual items in items from a multivaluefield in tds? Thanks. -jsnyder --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post

Re: 'dict' object has no attribute 'autoescape'

2008-04-23 Thread James Bennett
On Wed, Apr 23, 2008 at 6:59 PM, falcon <[EMAIL PROTECTED]> wrote: > 94. if (context.autoescape and not isinstance(output, > SafeData)) or isinstance(output, EscapeData): Right there's your problem. you've ended up passing a plain dictionary someplace where Django was expecting you to

order_by using methods or property?

2008-04-25 Thread James Snyder
Hi - I understand that django does order_by on the database level, but I was wondering if anyone had any recommendations for the "django-like" way of doing an order_by but using a model method or property? Basically I have names associated with a group model, where the first entries are always f

Re: Disabling autoescaping when calling render_to_string

2008-04-26 Thread James Bennett
On Sat, Apr 26, 2008 at 9:38 PM, Darryl Ross <[EMAIL PROTECTED]> wrote: > So my question is, is there an argument which will disable auto-escaping? > If not, would there be some merit to adding some functionality that allows > this, either as an argument or perhaps to make the auto-escaping only

Re: Updating django forms makes me...

2008-04-27 Thread James Bennett
On Sun, Apr 27, 2008 at 7:17 AM, notfound <[EMAIL PROTECTED]> wrote: > No, that's a hosted server, I don't have access to Apache > unfortunately. Is there any other way I could make it reload the code? Not really, no. In a production deployment, the code stays resident in memory for the life of

Re: SUM on a model

2008-04-27 Thread James Bennett
On Sun, Apr 27, 2008 at 8:47 AM, Darryl Ross <[EMAIL PROTECTED]> wrote: > I use: > >total = sum([obj.amount for obj in Model.objects.all()]) As of the merge of qsrf, this will also work: total = sum(Model.objects.values_list('amount', flat=True)) Plus there's the SoC project which will

Re: Updating django forms makes me...

2008-04-27 Thread James Bennett
On Sun, Apr 27, 2008 at 10:28 AM, notfound <[EMAIL PROTECTED]> wrote: > What could be the reason here that it sometimes works, sometimes does not? Multiple server processes; each one has its own copy of the code, and refreshes independently. -- "Bureaucrat Conrad, you are technically correct

Re: Odd Multi Select Behavior

2008-04-27 Thread James Bennett
On Sun, Apr 27, 2008 at 1:39 PM, Alex Ezell <[EMAIL PROTECTED]> wrote: > but if I log the value of "request.POST['point_list']" I see this: > > 37​.​4482804​,-​122​.​12251 > > It's like it doesn't know that it's a list. This makes it problematic > to do anything with the values in point

Re: Queryset-refactor branch has been merged into trunk

2008-04-28 Thread James Bennett
On Mon, Apr 28, 2008 at 8:32 AM, Juanjo Conti <[EMAIL PROTECTED]> wrote: > Could you give me a url where new features are explained? > Is this backwards compatible or should I svn up with care? Well, there's the wiki page Malcolm linked up in his original post... -- "Bureaucrat Conrad, you a

Enhancing the Admin Interface

2008-04-28 Thread James Matthews
Dear List Can someone please point me to a site that lists all the enhancement for the admin interface. (filter lists,search,orderby etc..) Thanks James -- http://search.goldwatches.com/?Search=Movado+Watches http://www.jewelerslounge.com http://www.goldwatches.com

Re: Django Performance Discoveries Part 1

2008-04-28 Thread James Matthews
Very nice article! Thanks 2008/4/28 Graham Dumpleton <[EMAIL PROTECTED]>: > > On Apr 28, 5:44 pm, Jarek Zgoda <[EMAIL PROTECTED]> wrote: > > Christian Vest Hansen napisał(a): > > > > > On 4/28/08, rich <[EMAIL PROTECTED]> wrote: > > >> Yes, I too am at a similar level of confusion as to when dja

Re: Django on Jython - anybody doing it?

2008-04-30 Thread James Bennett
On Wed, Apr 30, 2008 at 9:44 PM, rich <[EMAIL PROTECTED]> wrote: > More out of curiosity than anything else, is anybody using Django on > Jython? Several people are, and are actively involved in improving both Jython and Django to work better together; a number of bugs have been reported to bot

Re: Backwards incompatibility with fancy PostgreSQL queries and QS-RF

2008-04-30 Thread James Bennett
On Wed, Apr 30, 2008 at 11:43 PM, Barry Pederson <[EMAIL PROTECTED]> wrote: > any thoughts on the best way to do this now with QS-RF? Well, the official database API docs say [1]: "In some rare cases, you might wish to pass parameters to the SQL fragments in extra(select=...)`. For this purpose

Re: persistence of variable in views.py

2008-05-01 Thread James Bennett
On Thu, May 1, 2008 at 1:23 AM, skunkwerk <[EMAIL PROTECTED]> wrote: > I have a variable defined by a function call in my views.py that's at > the global level at the start of the file (ie is not inside any other > function, though the variable is not prefixed by 'global'). As this > takes a

Re: HEAD requests causing AttributeError

2008-05-01 Thread James Bennett
On Thu, May 1, 2008 at 4:39 AM, omat <[EMAIL PROTECTED]> wrote: > I don't see why someone / something is hitting with HEAD requests. Can > it be a security issue? No, it's not a security issue. It probably means you've enabled the middleware view-documentation middleware ("django.middleware.doc

Re: django-tagging doesn't work with qs-ref

2008-05-02 Thread James Bennett
On Fri, May 2, 2008 at 1:05 PM, bcurtu <[EMAIL PROTECTED]> wrote: > How can I solve this parse_lookup problem? > Cheers Have you considered looking at that project's bug tracker? http://code.google.com/p/django-tagging/issues/detail?id=106&can=1&q=queryset-refactor -- "Bureaucrat Conrad, yo

Re: child edit causes duplication with model inheritance

2008-05-04 Thread James Bennett
On Sun, May 4, 2008 at 12:58 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > if you add an "A" object then edit it and hit save it duplicates > itself. Does anyone else have this trouble with model inheritance? The admin does not currently support model inheritance. This is a known and docum

Re: child edit causes duplication with model inheritance

2008-05-04 Thread James Bennett
On Sun, May 4, 2008 at 3:29 AM, bobhaugen <[EMAIL PROTECTED]> wrote: > Does that mean newforms-admin includes qs-ref? That is, newforms- > admin includes all of the most current svn trunk? The ideal way to find out this sort of information is to watch the development timeline: http://code.dja

Re: Sorry to butt in. I'm just trying to get my message out.

2008-05-04 Thread James Matthews
Google has to do something about these spam issues! Or we should band together to write a mailing list App in Django that filters out spam! On Sat, May 3, 2008 at 8:20 AM, Etienne Robillard < [EMAIL PROTECTED]> wrote: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On Fri, 2 May 2008 11:4

Re: /admin Cross-Site Scripting (XSS) issue!

2008-05-07 Thread James Bennett
On Wed, May 7, 2008 at 12:31 PM, Chunlei Wu <[EMAIL PROTECTED]> wrote: > /admin/index.php/%22%3E%3Cscript%3Ealert%283939%29%3C/script%3E/ > > I am surprised the passed javascript code is indeed executed. Can > somebody verify that? Is it a big threat? Which version of Django is this happening

Re: Django equivilent of PHP date in templates.

2008-05-07 Thread James Bennett
On Wed, May 7, 2008 at 2:06 PM, DuncanM <[EMAIL PROTECTED]> wrote: > Would I have to create a template tag, or is there anyway of just > sticking it straight into the template? > > Something similar to what the following php returns: > date("F j, Y"); You probably want to read the list of bui

Re: /admin Cross-Site Scripting (XSS) issue!

2008-05-07 Thread James Bennett
On Wed, May 7, 2008 at 1:45 PM, mw <[EMAIL PROTECTED]> wrote: > It worked for me and I have one of the fairly recent copies from SVN. > (not like today up to date, but pretty up to date) Visiting the precise URL he pasted, in current Django trunk (SVN revision 7514), I get a 404. And I can't s

Re: /admin Cross-Site Scripting (XSS) issue!

2008-05-07 Thread James Bennett
On Wed, May 7, 2008 at 2:51 PM, Richard Dahl <[EMAIL PROTECTED]> wrote: > Excellent, good catch, when logged out it does indeed display the > alert, I image it has to do with the 'next' property, which is not, I > believe, escaped, as it is not entered into the DB or presented to any > other u

Re: /admin Cross-Site Scripting (XSS) issue!

2008-05-07 Thread James Bennett
Also, for future reference, please remember that if you think you've found a security problem in Django the correct action is to send email to [EMAIL PROTECTED] -- "Bureaucrat Conrad, you are technically correct -- the best kind of correct." --~--~-~--~~~---~--~

Re: /admin Cross-Site Scripting (XSS) issue!

2008-05-07 Thread James Bennett
On Wed, May 7, 2008 at 3:18 PM, Richard Dahl <[EMAIL PROTECTED]> wrote: > If I said that this condition is indicative of an XSS attack vector I > may as well say that Apache is vulnerable to a Denial of Service > attack because 'after I ran apachectl stop, I could no longer get to > my website

Re: Group by for querysets

2008-05-09 Thread James Bennett
On Fri, May 9, 2008 at 12:47 PM, Chris <[EMAIL PROTECTED]> wrote: > Does django carry something similar to what I am looking for? If not, > would a group_by feature be something worth adding to django? If you're using a recent Django trunk checkout (after the queryset-refactor merge), there is so

Re: Handle on request object from custom tag

2008-05-09 Thread James Bennett
On Fri, May 9, 2008 at 10:11 PM, Greg Fuller <[EMAIL PROTECTED]> wrote: > How do I get a handle on the request object from within a custom > template tag? By making the request available to the template as a context variable, then accessing it the same as any other context variable. -- "Bureau

<    4   5   6   7   8   9   10   11   12   13   >