Re: Django equivalent to a SQL CASE statement?

2009-05-01 Thread Phil Mocek
. If you're unfamiliar with these concepts, the following information will surely be of use to you: * <http://en.wikipedia.org/wiki/Posting_style#Inline_replying> * <http://catb.org/jargon/html/T/top-post.html> * <http://www.faqs.org/rfcs/rfc1855.html> * <http://www.ca

Re: i've looked at other discussions regarding the error ?unable to open database file?

2009-05-04 Thread Phil Mocek
ncdb' command. -- Phil Mocek --~--~-~--~~~---~--~~ 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,

Re: i've looked at other discussions regarding the error ?unable to open database file?

2009-05-04 Thread Phil Mocek
ng Django 1.0, python-sqlite2 2.4.1, and libsqlite3-0 3.5.9, and the syncdb command creates an SQLite database for me without the need for me to first create an empty file. -- Phil Mocek --~--~-~--~~~---~--~~ You received this message because you are subscribed

Re: Deployment

2009-05-06 Thread Phil Mocek
on from a central package repository. Also note that dpkg has been ported to OS X as part of the Fink Project [10]. [8]: <http://peak.telecommunity.com/DevCenter/PythonEggs> [9]: <http://pypi.python.org/pypi/virtualenv> [10]: <http://www.finkproject.org/> -- Phil Mocek --~--~-

Re: Django and a basic SQL join

2009-05-06 Thread Phil Mocek
ll to help solve more interesting problems than tutoring newbies on mailing list etiquette. Good luck. -- Phil Mocek --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this gro

Re: Trouble Starting Up with runserver

2009-05-07 Thread Phil Mocek
hapter02/#cn112> [3]: <http://www.rfc-editor.org/rfc/rfc3330.txt> [4]: <http://en.wikipedia.org/wiki/Localhost> [5]: <http://en.wikipedia.org/wiki/Loopback> -- Phil Mocek --~--~-~--~~~---~--~~ You received this message because you are subscribe

Re: Trouble Starting Up with runserver

2009-05-07 Thread Phil Mocek
On Thu, May 07, 2009 at 09:01:01AM -0700, donarb wrote: > On May 7, 8:43 am, Phil Mocek wrote: > > This, unfortunately, is not explained in the runserver > > documentation [1] or the admin utility's built-in help. The > > only place I've found it documented is i

Re: Trouble Starting Up with runserver

2009-05-07 Thread Phil Mocek
"public IP address". This is fine for casual conversation, but -- for reasons including that which was discovered in this discussion -- not for a technical tutorial whose target audience is software developers. -- Phil Mocek --~--~-~--~~~---~--~~ You recei

Re: django setting problem on windows

2009-05-07 Thread Phil Mocek
ding of it, someone can help guide you to whatever part you're missing or misunderstanding. -- Phil Mocek --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Re: Can you add custom logic to the Admin page?

2009-05-11 Thread Phil Mocek
.com/en/1.0/chapter17/> [3]: <http://catb.org/esr/faqs/smart-questions.html#before> -- Phil Mocek --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Re: get_or_create not atomic?

2009-05-12 Thread Phil Mocek
nsactions. Does this not result in get_or_create operating atomically? References: [1]: <http://groups.google.com/group/django-developers/browse_thread/thread/3c8a3a0d431dc4a6/204f0f7953bda2f2> [2]: <http://docs.djangoproject.com/en/1.0/topics/db/transactions/> -- Phil Mocek

Re: Historical Records (as introduced in the Pro Django book)

2009-06-05 Thread Phil Mocek
hanks in advance for doing so. References: [1]: <http://code.djangoproject.com/wiki/AuditTrail> [2]: <http://groups.google.com/group/django-developers/browse_thread/thread/ab7649e4abd4e589> -- Phil Mocek --~--~-~--~~~---~--~~ You received this

Re: accounts/profile question

2009-06-05 Thread Phil Mocek
On Fri, Jun 05, 2009 at 01:21:50PM -0700, David wrote: > Is there a homepage for users by default? That is a question about your application, not about the Django framework. -- Phil Mocek --~--~-~--~~~---~--~~ You received this message because you

Lookup column value in external dictionary

2009-11-02 Thread Phil Edwards
f putting these ratings into their own table, although this seems a bit of a waste for a short list of data points that will never change. Any help or advice greatly appreciated. -- Regards Phil Edwards | PGP/GnuPG Key Id Brighton, UK | 0xDEF32500 --~--~-~--~~~---

Re: Lookup column value in external dictionary

2009-11-02 Thread Phil Edwards
Phil Edwards wrote: > > This all works as expected. The final step that I'm not able to figure > out is what to put in either the view or the template so that I can do a > lookup of the 'package.rating' value (which will be 1, 2, 3 or 4) > against the 'ra

Re: Upload Progress Bar

2009-12-11 Thread Phil Mocek
e he or she neither noted the version of that particular player which is known to have the bug nor referred to a bug report. -- Phil Mocek -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googl

Multiple URLs, Common View

2010-07-18 Thread Phil Edwards
and 'django multiple url single view' but I can't find anything useful. I think that at this level, my setup probably doesn;t matter, but if it does I'm using Django 1.2 on both Windows XP and Linux, with Python 2.7 and 2.6 respectively, depending upon which machine I have my US

Re: Multiple URLs, Common View

2010-07-18 Thread Phil Edwards
On 18/07/2010 23:55, Phil Edwards wrote: -begin- def servePage(request): if request.path[1:] == '': thisPage = Page.objects.get(name = unicode('home')) else: thisPage = Page.objects.get(name = unicode(request.path[1:])) sidebar_list = Page.objects.filter(category

Re: Multiple URLs, Common View

2010-07-22 Thread Phil Edwards
as exactly what I wanted. Thanks again folks! -- Regards Phil Edwards | PGP/GnuPG Key Id Brighton, UK | 0xDEF32500 -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To u

Re: Error configuring Django to run customized comments framework

2010-10-02 Thread Phil Gyford
A bit late, so you may have solved this or given up on it, but still... I just had the same error message and eventually solved it by changing the order of my INSTALLED_APPS. So maybe you have slightly different settings on your local and live servers, and the apps are ordered differently on each?

Customising comment framework and keeping moderation working

2010-10-05 Thread Phil Gyford
the code for my moderator, in case it helps: http://dpaste.com/253308/ It works fine like that, with the standard framework, but if I switch the import lines over, add my custom comments app to INSTALLED_APPS and COMMENTS_APP settings, the enable_field has no effect. What's the magical m

Re: Customising comment framework and keeping moderation working

2010-10-05 Thread Phil Gyford
ng over it, but it's got personal, and I just want to understand the solution now! Any help very much appreciated. On Tue, Oct 5, 2010 at 11:27 AM, Phil Gyford wrote: > Hi, > > I can't get my extended version of django.contrib.comments to take > notice of moder

Re: Customising comment framework and keeping moderation working

2010-10-05 Thread Phil Gyford
ntry" to either customcomments/forms.py or customcomments/models.py then comments are *always* allowed through. Any idea why? Thanks. On Tue, Oct 5, 2010 at 2:46 PM, Phil Gyford wrote: > I've investigated further and... it's very strange. > > I've got a v

Re: Customising comment framework and keeping moderation working

2010-10-06 Thread Phil Gyford
le of times and tentatively re-opened it with an explanation: http://code.djangoproject.com/ticket/12812 I'm going to have to move on though and try and work around the problem for now as this frustration is doing me no good at all :( Phil On Wed, Oct 6, 2010 at 9:06 AM, Klaas van Schelven

Re: What does an ideal django workflow setup look like?

2010-10-22 Thread Phil Gyford
After reading a few articles on this kind of thing, I tried to figure out a good, repeatable way to do some of this, and wrote up the whole process here: http://www.gyford.com/phil/writing/2010/09/29/django-environment.php It doesn't (yet) cover the best ways of integrating dev/produ

Unit test failing when testing post of a comment

2010-11-11 Thread Phil Gyford
Hi, I have a unit test that tests that a comment can be posted on an entry in a Django blog. Posting a comment myself in the browser works fine, but the test always fails with this error: "TemplateSyntaxError: Caught VariableDoesNotExist while rendering: Failed lookup for key [request] in u'[{}]'

Re: Unit test failing when testing post of a comment

2010-11-14 Thread Phil Gyford
for the presence of these, and using empty strings if they're not present, has got things working again. On Thu, Nov 11, 2010 at 5:30 PM, Phil Gyford wrote: > Hi, > > I have a unit test that tests that a comment can be posted on an entry > in a Django blog. Posting a comment myself i

Re: sleep for 30 minutes?

2007-06-10 Thread Phil Davis
ting the image and delete any images over 30 minutes old? This should be a fast operation since there are not likely to be that many images. -- Phil --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django use

Re: Confusion over CRUD generic views and newforms

2007-07-29 Thread Phil Davis
e newforms edit_inline stuff (not surprising as written before that appeared). -- Phil --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-user

Re: Moving active site from 0.96 to current svn

2008-02-24 Thread Phil Davis
k to Backwards-incompatable changes which is what you want to read. Wiki is at: http://code.djangoproject.com/wiki -- Phil --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To p

Re: Adding additional needed information in to newforms post

2008-04-01 Thread Phil Davis
On 01/04/2008, timc3 <[EMAIL PROTECTED]> wrote: > I thought that I could add in some additional information to a form > before it gets saved as a new object in the database but the following > isn't working: > > def groupadd(request): > > if request.method == 'POST': > form = Group

Re: Tricky newforms problem

2008-04-11 Thread Phil Davis
ld' is actually a boundfield instance which wraps the real field. To get to the real field use 'field.field' in the template. I.e. your template would look like: {% for field in form %} {% if field.field.is_song %} ... -- Phil Davis --~--~-~--~~

Re: PostreSQL "psql" problem

2008-04-18 Thread Phil Davis
k a shell prompt so the other commands will actually be run. Running postgres by hand like this is fairly unusual. Normally it would be started/stopped by the main init scripts which is a far more reliable way. -- Phil Davis --~--~-~--~~~---~--~~ You received this m

Re: ModelForm, Foreign key and blank value in choices

2008-04-18 Thread Phil Davis
s['object_category'].widget = > forms.RadioSelect(choices=[(c.id, c) for c in > self.fields['object_category'].queryset]) There is an empty_label kwarg you can set to None to supress the "-" option so I guess something like: self.fields['object_ca

Re: Custom form field overrides model attributes?

2008-04-20 Thread Phil Davis
super(EventForm, , self).__init__(*args, **kwargs) self.fields['endDate'].widget = DateTimeWidget() class Meta: model = Event -- Phil Davis --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: refence a variable in a template in side another variable

2008-04-24 Thread Phil Davis
have needed to do this I simply add a item attribute to each form field so in the template you can do: {% for x in form %} {{x.item.some_x_attr}} {{x}} {% endfor %} To set up the item attr just do: form = DynForm() form.setFields(form_dict) for x in y: form.field

Re: refence a variable in a template in side another variable

2008-04-24 Thread Phil Davis
2008/4/24 Phil Davis <[EMAIL PROTECTED]>: > 2008/4/24 Raisins <[EMAIL PROTECTED]>: > [...] > {% for x in form %} > {{x.item.some_x_attr}} > {{x}} > {% endfor %} > I forgot that within the template there is a BoundField wrapper around each real form fie

Using choices with newforms.form_for_model

2007-02-20 Thread Phil Powell
7;t. Am I missing something here? Or is this worth a patch submission? Seems like I'm having to do a lot of hacking to get my forms displaying nicely, particularly when it comes to designating widgets for fields in a model. Any enlightenment much appreciated. -Phil --~--~-~--~---

newforms SelectDateWidget

2007-02-27 Thread Phil Powell
ascending? -Phil --~--~-~--~~~---~--~~ 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

Re: Upcoming Django release, and the future

2007-02-27 Thread Phil Powell
t; one place with nothing to do but code, so hopefully we'll be able to > hit a lot of stuff and get a release out very quickly (we'd like to > release 0.96 in the next day or two). My vote would be for a design decision to be made on 15

Re: newforms SelectDateWidget

2007-02-27 Thread Phil Powell
Thanks Mike - that did the trick. I thought there would be a simple solution - should have RTFM more thoroughly... On 27/02/07, Mike <[EMAIL PROTECTED]> wrote: > > The range function has an optional 'step' argument. > > Howzabout: > > SelectDateWidget(years=range(2006,1900,-1)) > > > But is ther

Filtering a blank date field

2007-03-02 Thread Phil Powell
hen it's date should be treated as the beginning of time. An easy fix would be for me to make these required fields, but I'd quite like them to be optional. Is there any way I can do this without writing a custom query? -Phil --~--~-~--~~~---~--~~ You rec

Re: Filtering a blank date field

2007-03-02 Thread Phil Powell
self).get_query_set() objects = objects.filter(Q(active_from__isnull = True) | Q(active_from__lte = datetime.datetime.today())) objects = objects.filter(Q(active_to__isnull = True) | Q(active_to__gte = datetime.datetime.today())) return objects On 02/03/07, Phil Powell <[EMAIL PROTECTED

Re: temp tables

2007-04-17 Thread Phil Davis
seem to "get lost". The general layout of the code was: from django.db import connection from django.db import transaction def foo(self,someargs): cursor = connection.cursor() cursor.execute(""" YOUR CUSTOM

Re: DateField returns 'str' object has no attribute 'strftime'

2007-04-30 Thread Phil Davis
>>> a (1,) So just remove the trailing commas in your view and you will then be assigning a date rather than a tuple to conference_date. In general the error "'tuple' object has no attribute xxx" normally means a trialling comma slipped in somewhere - it is a mis

Re: How to render newforms dynamically created fields?

2007-04-30 Thread Phil Davis
but it reflects what I'd like to get on my form: > > {% for fieldname in form.fields.keys %} > {{ form.fieldname }} > {% endfor %} > > Does any one know how I might accomplish this? The following template would work with the view code you posted. {% for field in form %} {{ fiel

Re: Label and input Filed overlap

2007-10-11 Thread Phil Davis
at the admin app uses (django/contrib/admin/media/css/forms.css) so one way to fix your problem would be to edit that file or include your own style sheet after the forms.css which overrode the label element's width. Cheers, -- Phil Davis --~--~-~--~~~---~--

Re: Label and input Filed overlap

2007-10-11 Thread Phil Davis
from which CSS style line and even change it in the browser to test out what effect any change would have. http://www.getfirebug.com/ Cheers, -- Phil Davis --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Dj

Re: accessing verbose_name and other field meta data

2007-10-26 Thread Phil Davis
ns this very case. The answer is use {{form.FIELDNAME.label_tag}} in your template. Cheers, -- Phil Davis --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-

Re: edit_inline behavior

2006-11-09 Thread Phil Davis
list of > participants doubles! Did you ever find out the answer to this problem? I have just tried a 'by-the-docs' generic view with simple 2 model master/detail update form and get exactly the same problem or duplicated detail rows after each save. -- Phil Davis --~--~-~--~

Re: Re: edit_inline behavior

2006-11-09 Thread Phil Davis
On 11/9/06, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > > On 11/9/06, Phil Davis <[EMAIL PROTECTED]> wrote: [...] > > I have just tried a 'by-the-docs' generic view with simple 2 model > > master/detail update form and get exactly the same problem

Singleton model instance

2006-12-04 Thread Phil Powell
chunks, rather than one big lump of content. Is there a way to easily set a model to have one singleton instance? I've thought about adding some pre-save code to check and only allow for one instance, but wondered if there was a more graceful wa

Re: Re: Singleton model instance

2006-12-04 Thread Phil Powell
s just like I'd edit a standard model instance, but because there is only one instance of my "Homepage" I never want more than one instance of it to exist. -Phil --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Googl

Re: Re: Singleton model instance

2006-12-07 Thread Phil Powell
to only allow client users to edit that instance. Thanks for your help guys - all food for thought. -Phil [1] http://www.carthage.edu/webdev/?p=15 On 05/12/06, Jeff Forcier <[EMAIL PROTECTED]> wrote: > > As James and Fredrik have implied, I believe the proper solution here > is to

Re: extracting field information from models

2006-12-16 Thread Phil Davis
'value':f.__getattribute__(f._meta.fields[0].attname) > } > ) Try: app_fields = [] for f in app._meta.fields: app_fields.append( { 'label' : f.verbose_name, 'value': getattr(app, f.name), } Works for me on Boolean field

Re: generic list view question

2006-12-17 Thread Phil Davis
{{post.post_set.all.-5.post_text}} directly in the template (untested)? -- Phil Davis --~--~-~--~~~---~--~~ 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@googlegro

Re: generic list view question

2006-12-18 Thread Phil Davis
i/ExprTag I think you would need to pass last_seen in via extra_context and do: {% expr object.topic_modification_date > last_seen as newflag %} {% if newflag %} NEW! {% endif %} Cheers, -- Phil Davis --~--~-~--~~~---~--~~ You received this message because you

Generic form appearing on multiple pages

2007-01-17 Thread Phil Powell
it's just not going to be possible, but just interested to know if anyone has ever done anything similar? -Phil --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this gro

"cannot import" error when doing an import of an app's models

2007-01-26 Thread Phil Powell
apps gives me slightly different apps complaining about different models. Very weird. Has anyone experienced anything similar? -Phil --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. T

Re: "cannot import" error when doing an import of an app's models

2007-01-29 Thread Phil Powell
my part, I've revisited the structure of the models involved, and the final outcome is a much more elegant and intuitive application. [1] http://groups.google.co.uk/group/django-users/browse_thread/thread/c9f6e581cf03057d?tvc=2&q=django+validate+cannot+import&hl=en On 26/01/07, Phil P

Re: Cent OS Deployment

2007-01-29 Thread Phil Powell
I've currently got a large-scale app in development on CentOS (but to be deployed on Red Hat), but it's running on Python 2.3. Aside from your Python install, there are also a few pre-requisites you might need to install alongside Django, such as MySQL-Python. Don't know if it's any help, but he

Re: models, composite primary keys

2007-01-30 Thread Phil Davis
el, using a primary key with username and url > or a integer id and have a unique constraint to username and url? Sorry if you already knew this but it was not clear from the above. The normal way would be to simply use the "unique_together" model Meta attribute which automatica

Newforms MultiValueField

2007-02-06 Thread Phil Powell
), forms.CharField(max_length=4))) But all I ever get rendered in my template (using {{ form.postcode }}) is a single text input. Any advice would be much appreciated. -Phil --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: Newforms MultiValueField

2007-02-07 Thread Phil Powell
t, but I understand a lot more about how this code functions. -Phil On 06/02/07, canen <[EMAIL PROTECTED]> wrote: > > > Phil, > > Thought an example might help. > > class VacationBudgetField(MultiValueField): > def __init__(self, required=True, label=None, wid

Comment options not appearing in admin

2006-05-10 Thread Phil Powell
nything which allows me to administer comments for my models.  Am I missing something completely obvious?  Or have I missed out a step? Thanks in advance.-Phil --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users&q

Re: Comment options not appearing in admin

2006-05-11 Thread Phil Powell
g out the form for posting acomment to that object:{% free_comment_form for blog.posts object.id %}You can find out more about how the comment tags work in thetemplatetags library in django.contrib.comments: http://code.djangoproject.com/browser/django/trunk/django/contrib/comments/templatetags/c

Re: Comment options not appearing in admin

2006-05-11 Thread Phil Powell
Waylan Limberg <[EMAIL PROTECTED]> wrote: On 5/11/06, Phil Powell <[EMAIL PROTECTED]> wrote:> Thanks for the clarification - always useful while the documentation is in a> state of flux.> > I've now got the front-end comments working as expected, and I'm mightily>

Re: Problems with setup of Django with Apache and mod_python

2006-05-12 Thread Phil Powell
Hi Gunnar,I had a few issues when setting up my first Django project through mod_python, the main tricky bit being the setup of the correct PythonPath variable.  However, seems you've got that right.The only other thing I can think of is that Apache doesn't have permission to access your Django pro

Re: ManyToManyField reverse lookup not working

2006-05-16 Thread Phil Powell
chart documenting the old vs. new syntax here: http://code.djangoproject.com/wiki/RemovingTheMagic Hope that might at least lead you in the right direction for solving your problem. -Phil On 16/05/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hello Gunnar, > > I am sorry, that w

Re: Dreamhost - does anyone know a better webhosting?

2006-05-16 Thread Phil Powell
ango-based sites and have seen very good performance. If by chance you use them, do me a favour and tell them you were recommended by ppowell - they have a very open-source friendly "thank you" scheme going (and are general open-source advocates all round). -Phil On 16/05/06, Pythonist

Re: Django and static files URLs

2006-05-17 Thread Phil Powell
use a BASE tag in the head of your HTML to set a a full or partial base path to preceed all relative resources. Hope that helps. -Phil On 17/05/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hi, > > My templates refer to CSS and images with absolute URL. I > cannot ser

Re: How to write a module level method rather than a instance method

2006-05-22 Thread Phil Powell
ng a lot of effort into getting documentation in order and I'm sure he'd appreciate our help by providing a simple link to *where* mistakes our out-dated documents reside, rather than posting cynical RTFM-like Google replies. It's about contribu

Re: How fix the "feature" of not serving static files?

2006-05-24 Thread Phil Powell
There's one very good reason why Django (and any other framework / CMS worth it's salt) deliberately avoids serving static files, and that reason is "performance". Your content serving mechanism should be about retrieving and manipulating content data, and performance can be haevily impacted if a

Comment URLs hardcoded?

2006-05-24 Thread Phil Powell
is hardcoded to /comments/ I could do some really hacky URL manipulation, but I'd rather not - would seem to me that a more sensible solution would be to provide an overide for the standard path to comments. Anyone else run into the same problem? Found a

Re: Comment URLs hardcoded?

2006-05-24 Thread Phil Powell
is what I'm finding great about Django: conventions allow you to make assumptions which just work! -Phil On 24/05/06, Phil Powell <[EMAIL PROTECTED]> wrote: > I just wanted to pose this question before raising a ticket, or > starting to work on a patch, just incase someone&#

Re: Comment URLs hardcoded?

2006-05-24 Thread Phil Powell
And in addition, for anyone who's interested, if you change the default path from /comments/ for your commenting, you'll need this patch: http://code.djangoproject.com/ticket/1997 It will rectify an issue with posted forms redirecting to the wrong location. -Phil On 24/05/06, P

Admin widgets - where are they invoked?

2006-06-14 Thread Phil Powell
ldtype working fine, with a customised form class, and I've tracked the code up to the point where fieldsets are generated, but am at a loss now as to how those are wrapped in the "widget" templates? Any pointers much appreciated! -Phil --~--~-~--~~~--

Re: Admin widgets - where are they invoked?

2006-06-14 Thread Phil Powell
s if a template doesn't exist. -Phil On 14/06/06, James Bennett <[EMAIL PROTECTED]> wrote: > > On 6/14/06, Phil Powell <[EMAIL PROTECTED]> wrote: > > I'm playing around with extending field types, but I've hit a bit of a > > wall when trying to create cus

Re: Processing Image on Save

2006-06-16 Thread Phil Powell
basis for an ImageFromUrlField, using the data from the URL instead of the POST data? Just out of curiosity: why have images uploaded from URLs rather than a standard form upload? -Phil On 16/06/06, mwtb <[EMAIL PROTECTED]> wrote: > > > Hi, > > I've asked a couple of

Re: Settings Model

2006-06-16 Thread Phil Powell
an instance already exists (which would be a bit confusing for an admin user, and probably a bad idea) -Phil On 16/06/06, bradford <[EMAIL PROTECTED]> wrote: > > I need a model called settings that has some application settings the > user can edit in the admin. How should I set this

Re: Processing Image on Save

2006-06-16 Thread Phil Powell
On 16/06/06, mwtb <[EMAIL PROTECTED]> wrote: > Okay, I haven't looked at that, so at least it's a new options, thanks. > My Python ability gets a bit stretched when reading some of the code in > that area, but I guess that's a good thing. I've just been playing around with creating new field type

Triple Store / RDF

2006-06-19 Thread Phil Powell
Hi all, Just out of pure curiosity: has anyone had any experience / know of any work around using RDF / triple stores with Django? -Phil --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Re: Existing database into django models?

2006-06-19 Thread Phil Powell
This ought to do the job: http://www.djangoproject.com/documentation/legacy_databases/ -Phil On 19/06/06, Mike Crowe <[EMAIL PROTECTED]> wrote: > > Hi folks, > > I'm just starting looking at a django backend for a system we need to > redo. The existing db is MSSQL (

Re: manipulating images

2006-06-20 Thread Phil Powell
automatic thumbnail generation working recently, using template filters. -Phil On 20/06/06, Sasha <[EMAIL PROTECTED]> wrote: > > Hello, > > I'd like to create a thumbnail for an image after it has been uploaded. > I have seen two possible approaches descibed here - su

Re: Triple Store / RDF

2006-06-22 Thread Phil Powell
nd have an object-based API translate to SQL without a middle-man? -Phil On 19/06/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > On Mon, 2006-06-19 at 12:35 +0100, Phil Powell wrote: > > Hi all, > > > > Just out of pure curiosity: has anyone had any experience

Re: Triple Store / RDF

2006-06-22 Thread Phil Powell
name => 'Doe'}, :subject => 'rdf' }) I wonder how that would look in Python...? > In my infinite spare time, perhaps... Hmmm, spare time? What an interesting concept ;) -Phil --~--~-~--~~~---~--~~ You received this message because you a

Re: FileBrowser Test Version

2006-07-11 Thread Phil Powell
This is fantastic stuff! I'll be taking a look at testing it out and possibly implementing for a current project (thousands of image files to manage). Any plans for a SVN address? -Phil On 08/07/06, patrickk <[EMAIL PROTECTED]> wrote: > > today we´ve finished the test vers

Checking whether a Foreignkey object has been assigned to anything

2006-07-12 Thread Phil Powell
t of Categories, but ONLY those Categories which have been assigned to one or more Photos. I can think of plenty of ugly ways to work around this, but wondered whether anyone had a graceful solution? -Phil --~--~-~--~~~---~--~~ You received this message because

Re: FileBrowser Test Version

2006-07-12 Thread Phil Powell
Thanks for the update Patrick. I've got this part working, but having trouble with makethumb on existing files on the server - not had time to delve too deeply yet to see what the problem is though. -Phil On 11/07/06, va:patrick.kranzlmueller <[EMAIL PROTECTED]> wrote: > > a n

Re: FileBrowser Test Version

2006-07-12 Thread Phil Powell
dering the response, but with no context returned. Any ideas? -Phil On 12/07/06, patrickk <[EMAIL PROTECTED]> wrote: > > makethumb works for me - although the makethumb-image is not > displayed correctly (I´ve already changed that). > > change line 170 of filebrowser/views.py fr

Re: Checking whether a Foreignkey object has been assigned to anything

2006-07-12 Thread Phil Powell
Jorge - that is exactly what I was after - thanks very much! I don't have too many categories, and don't expect there to be more than 100 or so - so the convenience outweighs the overhead. This way, I'm even able to add filters before doing the iteration. -Phil On 12/07/

Caching in Django admin

2006-07-19 Thread Phil Powell
anged which might have an effect on this. Is there a simple way to disable caching for admin? Or should it happen automatically? Thanks, -Phil --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Re: Caching in Django admin

2006-07-20 Thread Phil Powell
any of the core developers on this? -Phil On 20/07/06, Axel Steiner <[EMAIL PROTECTED]> wrote: > > Hi, > > > It looks like the right way to deal with this is to implement per page > > caching, but that doesn't look too simple to me. I hope that someone > > will p

Re: Caching in Django admin

2006-07-20 Thread Phil Powell
That's excellent - strange I came across the problem right at the same time you were fixing it ;) -P On 20/07/06, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote: > > On Jul 20, 2006, at 4:45 AM, Phil Powell wrote: > > It seems odd that this doesn't seem to have popped

Batch record processing

2006-07-26 Thread Phil Powell
standard ImageField gives me problems: even though the image is referenced, it gets saved in the DB with it's full filesystem path. Anyone have any pointers on how I might be able to implement this gracefully? Or am I just being too hack

Re: Batch record processing

2006-07-28 Thread Phil Powell
Hi guys - thanks for the replies. I guess what I'm trying to do is get the file references inserted into the DB so that I don't have to do any custom procesing when retrieving data. Parsing the path once it's retrieved is an option, but creates complications when viewing stuff in admin etc. At

Using a session variable in templates

2006-08-01 Thread Phil Powell
purpose of selecting one of a number of different style sheets). I've looked at using middleware, but that would require me to set the variable in each of my views? I want to have this available for *every* template, including flatpages. Is there a simple way to

Re: Using a session variable in templates

2006-08-02 Thread Phil Powell
That sounds like just the thing I need - to hook into every request and inject into the context dictionary. Will give it a try. Thanks Chris! On 01/08/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Context processors might work: > http://www.djangoproject.com/documentation/templates_pytho

ComboBox

2022-05-31 Thread Phil Parkin
doing this with a Choicefield plus a separate Charfield, but is there a better way? Thanks -Phil -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to dj

Re: ComboBox

2022-06-05 Thread Phil Parkin
-off, or infrequent which they will not want to clutter their options list with but still need to record against a transaction. *Ryan *- thanks, the datalist looks like it might be right option. I will look at custom widgets. All the best - Phil On Wednesday, 1 June 2022 at 09:13:11 UTC+1 rgam

<    1   2   3   >