Django template language bundle for TextMate

2005-09-29 Thread Wilson
I've started a very rudimentary TextMate language bundle for Django templates. It's just a bunch of snippets for tab-completion of the standard template tags and a very basic language definition for syntax coloring. Everything is extremely basic and naive right now, but if anybody out there is ed

Re: Django template language bundle for TextMate

2005-09-29 Thread Wilson
> Indeed, back on 7/29, someone added "Django templates" to the wishlist > for supported bundles: > http://macromates.com/wiki/pmwiki?n=Main.Bundles Yeah, that was me. I got tired of waiting. :)

Re: Django logo

2005-12-04 Thread Wilson
I've been meaning to put plain versions of the logo up with usage guidelines. I'll try to get those up this week.

Re: Ellington CMS

2006-01-03 Thread Wilson
There's not a public marketing site right now (I know, it's ridiculous - but we've been so busy installing Ellington and working with new clients, I've dropped the ball on getting it out the door). Ellington is a CMS for online news sites, with support for news stories, all kinds of multimedia, a

Re: Ellington CMS

2006-01-03 Thread Wilson
I know - that's what I haven't had time to do! ;)

Re: ANN: "Snakes and Rubies" (Django/Rails meetup) video/audio available

2006-01-06 Thread Wilson
It would be useful if there were a gag reel with clips of Simon making vomiting gestures at Adrian from across the room. :)

Re: Django and MS SQL

2006-01-10 Thread Wilson
Django supporting MSSQL strikes me a bit like iTunes running on Windows. As in it's a great thing for the platform. If somebody locked in to a MSSQL environment has the chance to try a real project with Django and be exposed to great, useful open-source software that doesn't turn its nose up at th

OS X 10.4.4 update breaks filter_interface in Safari

2006-01-11 Thread Wilson
The Safari/WebKit updates in 10.4.4 seem to be rendering the many-to-many filter interface unusable. The select element for "available choices" never receives focus. When you click on the available choices, Safari focuses on the filter input field instead. The end result is that you can't select

Re: OS X 10.4.4 update breaks filter_interface in Safari

2006-01-11 Thread Wilson
Found it! line 88 of SelectFilter2.js: addEvent(from_box, 'focus', function() { filter_input.focus(); }); Fix on its way from Jacob. Carry on!

Re: repository with apps

2006-01-25 Thread Wilson
Tim, There are plans for an app repository once Django 1.0 is officially released. Stay tuned!

Re: Some thoughts about slug and slugify

2006-01-26 Thread Wilson
If I'm understanding correctly, this is how prepopulate_from works for SlugField : http://www.djangoproject.com/documentation/model_api/#field-types

Re: Guido on Django

2006-01-27 Thread Wilson
If I see another post on that thread that says "i'm very impressed with how fast turbogears is coming along! it should be actually useful in a few months now!" Django is useful (and proven, and stable) now. And it's getting better fast. Don't be shy about hammering that point!

Re: Guido on Django

2006-01-27 Thread Wilson
I'll lose my train of thought and trail off! That's what! I'm crazy like that.

Re: How to implement this fucntionality ? (current page higlighting)

2006-02-25 Thread Wilson
If you don't want to set the section variable in your template context you can also do something similar by just defining a new block to contain your section id. Something like this: [...] etc... --~--~-~--~~~---~--~~ You received this message because you are

Re: Ecommerce & Django

2006-04-14 Thread Wilson
Call it "Brubeck" --~--~-~--~~~---~--~~ 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 PROTECT

Anyone have any good solutions for site navigation?

2008-10-24 Thread Matt Wilson
My site has a global-navigation header, with links to 5 sections of the site. I highlight the section that the viewer is currently viewing in the global header. Other than the highlighting, the header is the same on every page of the site. Then I also have a "local" navigation that shows differ

Are a lot of people using SQLAlchemy with Django?

2008-10-01 Thread Matt Wilson
I've been working with TurboGears 1.0 (kid and SQLObject) and I have some time to do a rewrite. I'm considering either going to TG 2.0 (genshi and SQLAlchemy) or Django. I'd love to be able to use SQLAlchemy with Django. I've heard some people are working with this, but I want to know if people

Combining Model Forms

2009-03-05 Thread Andy Wilson
ld be applied to both instances. -- [][][] Andy Wilson| mob: +44 (0)7739 908 253 [][] Managing Director | tel: +44 (0)20 7729 7060 [] [] LShift Ltd | web: www.lshift.net --~--~-~--~~~---~--~~ You received this message because you are subscri

Admin Inlines astray

2009-04-11 Thread Andy Wilson
has anyone any idea why the inlines might go missing? I have a model 'song' and a model 'recording'. I've created a recordingInline class, and in the modelAdmin I set: inlines = [recordingInline] this all works fine on my Ubuntu installation running python 2.5.2 and django 1.0.2, but on another

Re: Admin Inlines astray

2009-04-11 Thread Andy Wilson
ps. I used the 'song' and 'recording' models as an example, in fact I have several apps that use inlines, and on the one installation they are missing in every case. No errors are thrown and I can see nothing relevant in the logs. On Sat, 2009-04-11 at 19:50 +0100, Andy

Re: Admin Inlines astray

2009-04-11 Thread Andy Wilson
fixed after trying all sorts of approaches I finally got it to work by chmod'ing o+r to the files under the django/contrib/admin directory. Most of them already had read permissions but I could see that a few didn't. a On Sat, 2009-04-11 at 19:58 +0100, Andy Wilson wrote: > p

Authenication for django.views.generic Views

2009-04-16 Thread Col Wilson
I'm using generic views to render my pages (django.views.generic.date_based, django.views.generic.list_detail etc) and they're very handy. However, the app I'm trying to build would like a security and on reading the "User Authentication in Django" document, it just talks about adding authenticat

Re: Authenication for django.views.generic Views

2009-04-16 Thread Col Wilson
Thanks all. I have some reading to do, but I have also noticed in the meantime that generic views docs (http://docs.djangoproject.com/en/dev/ ref/generic-views/#ref-generic-views) have a hook into the auth system. Look for 'login_required'. Having said that, I still have a bit of reading to do.

Re: Clean URL Design: List Views and Details Views

2009-04-17 Thread Col Wilson
/products/by-popularity/ /products/featured/ /products/page/5/ /products/add/ /products/elvis/ /product/in-the-ghetto/ /product/jail-house-rock/ /product/love-me-tender/ On Apr 16, 2:29 pm, Aidas Bendoraitis wrote: > Hello, > > Recently, we are solving a conceptual question of designing clean ur

Hosting multiple projects

2010-11-22 Thread Todd Wilson
I teach a course in which I have students developing unrelated Django projects on servers of their own choice. As we near the end of the semester, I would like to set up a single server where I can host all of these student projects together. I will obviously create a new user, as well as a new m

Django on a hosting service

2010-11-27 Thread Todd Wilson
I'm helping some friends improve a portal website they have created using PHP, but which would be ideal for Django, in the sense that a lot of the work they've already done, and would like to do as they improve the site, would be easy to do in Django. They have a hosting contract with Intermedia (

Re: Django on a hosting service

2010-11-28 Thread Todd Wilson
In response to my question about deploying Django on a shared hosting service that doesn't seem to have the necessary Apache modules installed, ... Daniel Roseman wrote, on 11/28/2010 02:10 AM: > I've never tried this, but if I understand the documentation here > correctly: > http://docs.djangopro

Choices vs. ForeignKeys (was: Django - Alternative to using NULLs? (for integer and FK fields).)

2010-11-29 Thread Todd Wilson
Mike Dewhirst wrote, on 11/29/2010 10:33 PM: > I'm keeping track of companies, divisions and people with their > relationships. For example, divisions can be traded between companies > and people consult to companies or own trading entities. I can also keep > track of pretty much any relationship o

Re: Django on a hosting service

2010-12-09 Thread Todd Wilson
can be done with an .htaccess file, and how much I will have to ask them to do for me? Thanks, --Todd Todd Wilson wrote, on 11/27/2010 07:20 PM: > I'm helping some friends improve a portal website they have created > using PHP, but which would be ideal for Django, in the sense that a lot >

Re: There's got to be a better way

2007-07-27 Thread Gary Wilson
On Jul 26, 1:22 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > In my view, I have: > future_events = Event.objects.filter(start_date__gte=now) > pacific_events = future_events.filter(club__region='Pacific') > rocky_mountain_events = future_events.filter(club__region='Rocky > Mountain

How to reuse a component in numerous templates, like turbogears widgets?

2007-08-15 Thread Matt Wilson
I'm working on a django view for my office's homemade ticket-based workflow system. I have a view that shows all tickets assigned to each employee. I also have a view that shows all tickets attached to parent tickets. I want to define just once how to render any arbitrary lists of tickets into

Re: @url tag - getting rid of urlpatterns

2007-08-30 Thread Gary Wilson
On Aug 30, 3:08 am, Ilya Semenov <[EMAIL PROTECTED]> wrote: > Second, I think the use of generic views is over-estimated. I tend to agree a bit here. I like having all my URLs in one file and all my views in another. Using generic views usually clutters the urls file too much for me. Generic v

Need help creating a composite database index

2008-01-03 Thread Matt Wilson
This is the postgresql index I want to create: CREATE UNIQUE INDEX v2category_nameIndex ON v2category (v2organization_id, parent_category, lower(name)); How do I create this index with the Django model? TIA Matt --~--~-~--~~~---~--~~ You received this message be

Re: Need help creating a composite database index

2008-01-03 Thread Matt Wilson
Thanks! On Jan 3, 1:32 pm, Rajesh Dhawan <[EMAIL PROTECTED]> wrote: > Hi, > > On Jan 3, 12:28 pm, Matt Wilson <[EMAIL PROTECTED]> wrote: > > > This is the postgresql index I want to create: > > > CREATE UNIQUE INDEX v2category_nameIndex ON v2category

Re: Template tags and python paths

2008-02-04 Thread Jon Wilson
- models.py > - settings.py > - etc... > > > The problem is with "myapp2_tags.py". That file starts with this: > from myapp2.models import MyModel > I've found that in a production environme

Re: Template tags and python paths

2008-02-04 Thread Jon Wilson
he project path included like with apache kind of defeats that purpose. However, at least in the mean time, as you had found, it works by calling that. I'll have to look and see if there is a way to fix the templatetags loading to fix that, maybe by overriding it somewhere. ... -- Jon Wilson

Re: Template tags and python paths

2008-02-04 Thread Jon Wilson
/to/trunk/myapp2/templatetags') but like you said earlier, it really should work by default. :p -- Jon Wilson --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this grou

Re: i'm tired

2008-02-09 Thread Wilson MacGyver
I think you made it more complex than it really has to be, especially for learning. For a straight OSX install when I first started messing around with django. here is what I did. Step 1: download and install macpython from the python.org url is http://www.python.org/ftp/python/2.5.1/python-2.5.

Re: i'm tired

2008-02-09 Thread Wilson MacGyver
newbiedoobiedoo wrote: > please take your instructions and put them up somewhere OFFICIAL, > because > I was following directions that were MUCH more complicated. > > I just did what you said... and now I have django. I will proceed to > try and set up Mysql > now, so that I can get to testing t

Re: tutorial 01

2008-02-09 Thread Wilson MacGyver
Jeff Anderson wrote: > the command isn't found because it isn't in your path. > Are you sure you installed it correctly? > > On mac os x, I recommend installing django through fink if you are new > to *nix commands and shells and the like. > > You can also change to the directory that has djang

Access control

2008-03-29 Thread Wilson Acha
Hello, django have any library that allows include a login and enable restrict access to different parts of the application according to roles and / or profiles Wilson --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

relationships problem

2008-05-21 Thread Col Wilson
I'm brand new to django from rails, and I'm a bit stuck trying to get relationships to work. RawPlaces table is full of place names and data already. My model looks like this: from django.db import models import sys, os class RawPlace(models.Model): name = models.CharField(max_length=64

Re: django admin - too many sql-queries

2007-02-18 Thread Gary Wilson
On Feb 18, 10:48 am, "Honza Král" <[EMAIL PROTECTED]> wrote: > On 2/18/07, Tom? Pokorn? <[EMAIL PROTECTED]> wrote: > > > models.py attached. > > > On Sun, 2007-02-18 at 16:51 +0100, Honza Kr?l wrote: > > > > that's odd can you post your Model definition? > > definitely odd, list_select_related ap

newforms and form_from_instance

2007-03-28 Thread Gary Wilson
Starting to play around with newforms and I am trying to create a form with fewer fields than the model and post-fill those fields in the view. With the following example models and form: class Book(models.Model): author = models.CharField(maxlength=100, blank=True) title = models.C

Re: a very slow view, > 30secs to load

2007-03-29 Thread Gary Wilson
On Mar 29, 2:26 pm, "Milan Andric" <[EMAIL PROTECTED]> wrote: > But in the dev environment I can see pretty well that the view is > functioning very quickly. So your hunch about the problem lying in > the templates is probably right. If you aren't seeing the slowdown on your dev server, then you

Re: Request for Leopard users

2007-10-31 Thread Wilson MacGyver
I too can confirm this. echo $LANG gives en_US.UTF-8 but using both /usr/bin/python which is the one that came with OSX Leopard, or using the MacPython downloaded from www.python.org at the path /Library/Frameworks/Python.framework/Versions/Current/bin/python in both cases, >>> import locale >

Re: Request for Leopard users

2007-10-31 Thread Wilson MacGyver
On 11/1/07, Karen Tracey <[EMAIL PROTECTED]> wrote: > On 11/1/07, Wilson MacGyver <[EMAIL PROTECTED]> wrote: > > > > I too can confirm this. > > > > echo $LANG gives en_US.UTF-8 > > > > but using both /usr/bin/python which is the one that came

Re: learning django and python

2007-11-14 Thread Wilson MacGyver
I don't know about the Instant Django on OSX, but Django itself is very easy. I use the python universal binary from http://www.python.org/download then download Django, untar it, and go into the extracted Django directory, run "sudo python setup.py install" That's it, Django is installed and r

Re: Strange Error when 404 or 500 error

2006-09-18 Thread Gary Wilson
[EMAIL PROTECTED] wrote: > File "/usr/lib/python2.4/site-packages/django/views/debug.py", line > 144, in technical_404_response > t = Template(TECHNICAL_404_TEMPLATE, name='Technical 404 template') > > TypeError: __init__() got an unexpected keyword argument 'name' > <---

Re: Setting up an new app with a models directory

2006-09-27 Thread Gary Wilson
Malcolm Tredinnick wrote: > When you have models in a deeper structure like this, you need to > explicitly tell the model what the app name is. You do this as follows: > > class SimpleTest(models.Model): > ... > class Meta: > app_label="appfolder" > > This

Re: Setting up an new app with a models directory

2006-09-27 Thread Gary Wilson
Malcolm Tredinnick wrote: > You also need to have the model in the __all__ export of > models/__init__.py, otherwise it doesn't get imported into the > appropriate namespace as part of "import myapp.models". Well, adding the model modules to __all__ doesn't work either (isn't this for when you do

Re: Importing models from each other.

2006-09-27 Thread Gary Wilson
Gacha wrote: > I have two model files, the first is: > --- > from proj.base.models import Choice > > class User(meta.Model): > ... > param = model.ForeignKey(Choice) > >

Re: Re: Why I'm giving up on Django

2006-09-29 Thread Wilson Miner
That was actually a conscious decision to keep from needing support images for the debug pages. I wanted them to be completely self-contained, which is why we used the unicode glyph for the disclosure triangle (a pretty universal UI indicator) to indicate that those sections could be expanded. On

Re: Django and Media Temple Grid Server

2006-10-17 Thread Wilson Miner
Sounds like they're leaning toward adding a Django option in the future, but I think we can help speed them along by letting them know there's plenty of demand out there. They suggest contacting their sales staff to let them know if you'd be interested in a Django grid server: http://www.mediatem

Re: Dojo vs Mochikit for Django dev?

2006-10-17 Thread Wilson Miner
Dojo is designed to be flexible, but can be too heavyweight for small tasks. Mochikit is designed to be super-lightweight but has a much more limited scope as far as what it's capable of. On 10/17/06, iain duncan <[EMAIL PROTECTED]> wrote: > > I have not dug into either Dojo or Mochikit yet and a

duplicate error messages above FileField in admin interface

2006-11-14 Thread Gary Wilson
I've got a FieldField using the RequiredIfOtherFieldNotGiven validator, and when I try to save the object without filling in the "other field," I get two duplicate error messages above the file upload box. I assume this has something to do with FileField really using two form field widgets, but i

Windows install

2007-02-08 Thread Dale Wilson
Hi, As a newbie to Django I failed to read the install doc correctly and tried to run setup.py rather than simply checking django out of svn directly into site-packages. Reading the doc more carefully solved my problem, but in the meantime I found a "buglet" in setup.py that should probably be f

Re: Admin Functionality Enhancement

2006-05-08 Thread Wilson Miner
This is actually along the lines of some of the big-picture admin changes I've been thinking about. Another side effect is that if each app has it's own dashboard/changelist/filters, it also opens up the actual index page for some additional functionality. On 5/8/06, Rudolph <[EMAIL PROTECTED]> w

Re: Django Admin CSS Problems in Safari

2006-05-09 Thread Wilson Miner
I can confirm that i'm seeing this padding issue in safari and the > > webkit inspector shows: > > padding-top:10px; > > padding-right:20px; > > padding-bottom:10px; > > padding-left:20px; > > > > I've been seeing it since wilson did the split o

Re: Django-Powered Game in Beta - MyDarkSecret.com

2006-05-09 Thread Wilson Miner
Cool! Very interesting to see a totally different kind of Django app. I'll have to try it out. On 5/8/06, ZebZiggle <[EMAIL PROTECTED]> wrote: > > Hey everyone! > > As you may or may not know (or are sick of hearing about) ... I've > been dabbling on a web-game for a while now. It's called "My Da

Re: Comment options not appearing in admin

2006-05-10 Thread Wilson Miner
With comments installed you can use the comments template tags to attach a comment thread to any object in the template. For example, for a hypothetical blog post, the template code to get the list of free comments for the object might look like this: {% load comments %} {% get_free_comment_list

Re: sites in django.contrib ?

2006-05-10 Thread Wilson Miner
It's generally used as a ManyToMany in other apps to assign objects (blog posts, stories, e.g.) to be published to one or more sites at a time. On 5/10/06, Zeuxis <[EMAIL PROTECTED]> wrote: > > Hi, > > I wonder what it the purpose of the sites app in django.contrib ? It > does not > seem

Re: authentication style select box

2006-05-17 Thread Wilson Miner
Sean, You're looking for the filter_interface argument for the ManyToManyField: http://www.djangoproject.com/documentation/model_api/#many-to-many-relationships On 5/17/06, Sean <[EMAIL PROTECTED]> wrote: > > Hi, > I was wondering if the searchable select box as used in the add user > interface

Searching on a calculated value

2006-05-23 Thread Gary Wilson
calculated full name in the database)? Something like... User.objects.filter(get_full_name__iequals="Gary Wilson") --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To pos

Re: Searching on a calculated value

2006-05-23 Thread Gary Wilson
Waylan Limberg wrote: > For an example of how the admin app does this see search_fields > http://www.djangoproject.com/documentation/model_api/#search-fields > > -- > > Waylan Limberg > [EMAIL PROTECTED] Yes, I guess I could split the text entered and then do a search for each word in both f

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

2006-05-23 Thread Wilson Miner
Is there a particular reason you can't just use the full media url in your templates? ie. "http://media.coolsite.com/files/css/shadow.css"; instead of "../css/shadow.css"? On 5/23/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I'm building a CMS for my internal use... I own a web developmen

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

2006-05-24 Thread Wilson Miner
Seems like you would get better results from your time by writing a script to replace relative paths with absolute urls. On 5/24/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Ok. > > Like I say, I understand the reason in separate the dynamic from the > static, despite the fact this is the

Re: Searching on a calculated value

2006-05-24 Thread Gary Wilson
Adrian Holovaty wrote: > On 5/23/06, Gary Wilson <[EMAIL PROTECTED]> wrote: > > Yes, I guess I could split the text entered and then do a search for > > each word in both first_name and last_name like the admin interface > > does... just seems like this would return ma

Re: Searching on a calculated value

2006-05-25 Thread Gary Wilson
Adrian Holovaty wrote: > You're best off searching by the exact fields rather than messing with > derived fields. Would you offer some insight please? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Re: confused again: a "home page" can't be some special case

2006-06-06 Thread Wilson Miner
Another option is to create it as a flat page with the url "/" and pull in all your content using template tags. On 6/6/06, James Bennett <[EMAIL PROTECTED]> wrote: > > On 6/6/06, Douglas Campos <[EMAIL PROTECTED]> wrote: > > 1) create a homepage app to aggregate it all (don't be worried, it can

Re: Additional controls in admin interface?

2006-06-06 Thread Wilson Miner
y the field you specify: http://www.djangoproject.com/documentation/model_api/#ordering Cheers, Wilson On 6/6/06, James Mulholland <[EMAIL PROTECTED]> wrote: > > Excuse me if this is a daft question -- I'm new to both Python and > Django, but I guess it's a credit to b

Re: Change cols and row in generic update page textarea

2006-06-06 Thread Wilson Miner
Or specify the dimensions in ems if you want a closer equivalent to rows and columns. On 6/6/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > On 6/6/06, tomass <[EMAIL PROTECTED]> wrote: > > Wondering if there's a way to specify how many rows and columns the > > generic update page uses for a t

Re: Django Article on Developerworks

2006-06-07 Thread Wilson Miner
Ha - that's great! On 6/6/06, Ian Maurer <[EMAIL PROTECTED]> wrote: Thanks guys for the feedback. Hopefully the changes will getincorporated tomorrow.Also, I like the art IBM put together for the front page of the linux section... http://www-128.ibm.com/developerworks/linux/I hope it meets with the

Re: Divide list in a template

2006-06-17 Thread Wilson Miner
I don't know of a way to do this by a calculated fraction of the total items in the list, but you can use the slice filter to break it up into groups of a set number: {% for object in object_list|slice:":5" %} {% for object in object_list|slice:"5:10" %} etc. There's also a handy trick if you

Re: Template variables

2006-06-20 Thread Wilson Miner
Hi Patrick, You might find some helpful responses in this thread: http://groups.google.com/group/django-users/browse_frm/thread/50ee1c147854769/a79890af3059229d?q=menu&rnum=3#a79890af3059229d On 6/20/06, Patrick <[EMAIL PROTECTED]> wrote: > > Hi i'm newbie and i want to publish my Django websit

Re: How would Django handle a large number of records

2006-06-21 Thread Wilson Miner
> The World Online admin > interface (where Django was born) has a number of content types with > tens of thousands -- if not hundreds of thousands -- of records. 393,181 stories and counting... On 6/21/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > On 6/21/06, Patrick Anderson <[EMAIL PROTE

Re: customizing admin templates

2006-08-01 Thread Wilson Miner
Try putting this in your main base_site.html template: {{ app.name|default:"Django" }} Administration I'm not sure if the app info is available in the changelist/change form contexts, but it's worth a shot. On 8/1/06, Tamara D. Snyder <[EMAIL PROTECTED]> wrote: > > I'm sorry to keep bothering t

Re: database newby question

2006-08-26 Thread Gary Wilson
[EMAIL PROTECTED] wrote: > i imported 2 users in the model LoginInfo the first is lab_id = '100' > and the second is lab_id = '200' > how do i put in the data in the class Modules ? > > what i thought i had to do was first create a object from the LoginInfo > class like > p = LoginInfo.objects.get

Re: Limit view to group members: what function for the @user_passes_test decorator?

2006-08-27 Thread Gary Wilson
cyberco wrote: > I want to limit a view to certain group members, so I'm using the > following decorator: > > @user_passes_test(lambda u: Group.objects.get(name='admin') in > u.groups.all(), login_url='/accounts/login/') > > This seems a little verbose. Is there a better way? user_passes_test is

Re: SQL initial data for auth

2006-08-27 Thread Gary Wilson
> Hence, I've put a list of users into my 'auth/sql/User.sql' file, but > ./manage.py syncdb doesn't seem to pick up the existence of the file. > I have no doubt it's in the wrong place, but my question is which is > the correct place? :-) I think the file needs to be placed at django/contrib/aut

Re: Finding entries with multiple tags

2006-08-27 Thread Gary Wilson
[EMAIL PROTECTED] wrote: > Hello - > > I'm playing around with a blog application and I want it to have a > tagging feature. I have the usual ManyToMany relationship set up with > Post and Tag (I'm not going to past my model since I think everyone is > familiar with this kind of setup). > > I have

Re: Filter "date" and FormFieldWrapper attribute error

2006-08-27 Thread Gary Wilson
Andres Luga wrote: > when displaying a form for a new object, I'm trying to set a default > value for a date field using a filter in a template, like so: > > > {{ form.somefield|date:"Y-m-d" }} > > This gives me an error: > 'FormFieldWrapper' object has no attribute 'year'. > What am I doing wron

viewing generated SQL without running the query

2006-08-28 Thread Gary Wilson
I see that there is a _get_sql_clause() method, but is there a function that will return the constructed query string? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, sen

Re: Finding entries with multiple tags

2006-08-28 Thread Gary Wilson
[EMAIL PROTECTED] wrote: > > def tags(request, url): > > # Don't need the last item in the list since it will > > # always be an empty string since Django will append > > # a slash character to the end of URLs by default. > > tags = url.split('/')[:-1] > > posts = Post.objects.

python sets and objects returned in queries

2006-08-28 Thread Gary Wilson
Why can't objects be used in python sets? Example: >>> [u.username for u in User.objects.all()] ['bar', 'foo', 'foobar'] >>> a = User.objects.filter(username__contains='foo') >>> b = User.objects.filter(username__contains='bar') >>> set.intersection(set(a), set(b)) set([]) but... >>> a [, ] >>

Re: python sets and objects returned in queries

2006-08-29 Thread Gary Wilson
Ivan Sagalaev wrote: > Gary Wilson wrote: > > Why can't objects be used in python sets? Example: > > > >>>> [u.username for u in User.objects.all()] > > ['bar', 'foo', 'foobar'] > >>>> a = User.objects.f

Re: viewing generated SQL without running the query

2006-08-29 Thread Gary Wilson
Malcolm Tredinnick wrote: > On Tue, 2006-08-29 at 03:53 +, Gary Wilson wrote: > > I see that there is a _get_sql_clause() method, but is there a function > > that will return the constructed query string? > > Deja vu. I tried to implement something like this a little wh

Re: group traffic

2006-08-31 Thread Gary Wilson
A Django forum would be another option. IMO, forums have more of a community feel, and are also probably a little more friendly for newbies. And, unlike with this mailing list, you would be able to reply to posts that are more than 30 days old. --~--~-~--~~~---~--~-

Re: Mac vs. PC for Django work.

2006-09-13 Thread Wilson MacGyver
On OSX, one of the first thing I do is download and installthe latest Python from http://www.python.org/downloadIt's straight forward and let you have up to date python so you can avoid problems like that.On 9/13/06, Eric Walstad <[EMAIL PROTECTED]> wrote: One of the developers on my team works on

Re: Use of Django logo?

2005-11-03 Thread Wilson Miner
I've got it on my list to prep some logos for distribution and external use, as well writing a simple logo usage policy. In the meantime, using the logo to reference or link to the Django site is well within fair use. In the meantime, I went ahead and uploaded the logo to Wikipedia with a fair us

Re: admin/base_site.html

2005-11-16 Thread Wilson Miner
That's just a template block which you can fill in with your own contents (or rename or remove altogether if you choose). Django doesn't do any magic management of public site navigation (unless you use it to build an app that does). See this section of the template documentation for an overview o

Re: Django logo

2005-12-14 Thread Wilson Miner
I haven't got around to posting those with guidelines, but I've attached a version you migth be able to use.Cheers,WilsonOn 12/3/05, Maniac <[EMAIL PROTECTED]> wrote: I'm writing a blog post about Django and want to use a logo as adecoration. There are number of nice badges onhttp://www.djangoproj

Re: How to implement this fucntionality ? (current page higlighting)

2006-02-21 Thread Wilson Miner
You can also do this with CSS and not change your navigation HTML at all. Just give each of your navigation items an id (#nav-about, #nav-contact, etc.) and in each section of the site, assign a class to the body tag based on the section you're in. Then you can create CSS rules for the "current"

Re: Making a Field Optional in Admin, Admin Issues

2006-02-27 Thread Wilson Miner
> I also created a super user via the admin GUI and this is not working > -- the super user cannot log in!!! Make sure the user is set to "staff" as well. The "staff" setting allows the user to log in, the "superuser" setting gives them access to all objects in the system. --~--~-~--~---

Re: Help with Django base template and CSS

2006-03-04 Thread Wilson Miner
x27;ll need to update the MEDIA_ROOT and MEDIA_URL settings in your Django settings file (see http://www.djangoproject.com/documentation/settings/#media-root ). Hope this helps! Wilson On 3/4/06, thebubblejungle <[EMAIL PROTECTED]> wrote: > > Hi, > > I'm fairly new to Django and ha

Re: Help with Django base template and CSS

2006-03-04 Thread Wilson Miner
I meant to say "that's just for development, NOT production". On 3/4/06, Wilson Miner <[EMAIL PROTECTED]> wrote: > Django doesn't serve media (images, css, etc.). The development server > handles the media necessary for the admin interface, but that's just &g

Re: ImageField nightmares

2006-03-25 Thread Wilson Miner
I've had similar problems with using an image field as the core field in an edit_inline relationship. When an object with an edit_inline relationship is saved, the admin checks if the core fields on any of th erelated objects are blank, and if so, it deletes that related object. aWhat happens when

Re: Customising Admin

2006-03-28 Thread Wilson Miner
If you only give the user permission to change your object, they will not see an add button when they log in. On 3/28/06, Rune Strand <[EMAIL PROTECTED]> wrote: > > Just to learn Django, I'm 'porting' a small CMS I wrote in PHP for a > customer. While the standard admin buttons "Save an add anoth

Re: display_inline=True?

2006-03-28 Thread Wilson Miner
AFAIK, it's not really in the scope of the admin to display information that can't be edited. Anything along those lines is probably a candidate for customization. On 3/28/06, pbx <[EMAIL PROTECTED]> wrote: > > When viewing one object in the admin (say, a Landlord) I'd like to be > able to displa

Re: moving items in admin-interface

2006-03-30 Thread Wilson Miner
Have you looked at the "order_with_respect_to" meta option in your model? On 3/30/06, patrickk <[EMAIL PROTECTED]> wrote: > > i´m just trying to implement buttons for moving up/down elements in > the admin-interface (which should be replaced with ajax-drag later on). > therefore, my model has a f

  1   2   >