Re: Foreign Key with a default key

2008-11-13 Thread Steve Holden
tat, default=Stat(),) > > irregular = models.BooleanField() > > Have you tried reading a Stat instance in from the database and using that as the default value? The one you currently use hasn't been saved anywhere, and therefore has a None primary key (thoug

Re: Read/Create Excel xls files using django

2008-11-13 Thread Steve Holden
alled (which we don't have installed on our >> Win32 servers, let alone our Linux servers hosting Django). >> > > Not trying to start a flame war, but pyexcelerator/xlwt support these > as well... I think Tim's point is that with XML you can use Excel visually to c

Re: Simple date issue ...

2008-11-14 Thread Steve Holden
dbee wrote: > DateField and Postgresql > > Thanks > > On Nov 13, 6:53 pm, Steve Holden <[EMAIL PROTECTED]> wrote: >> dbee wrote: >>> I'm having a simple issue here trying to pull dates out of a database. >>> I can only pull out double digit

Re: how to print a data structure in django template

2008-11-14 Thread Steve Holden
{ key } > > # this will give me father / son > > { % endfor %} > > My problem how do I access parts like family['f'']['first'] should > give me "Mahesh" and family['s']['last'] should gibe me 'Swami; > {{ family.f.f

Re: Views triggering twice

2008-11-14 Thread Steve Holden
made. > > The moral is (again) "don't put style elements in your HTML", I > guess. :-) > Nice piece of debugging! regards Steve -- Steve Holden+1 571 484 6266 +1 800 494 3119 Holden Web LLC http://www.holdenweb.com/ --~--~-~--~~

Re: general problems with installing downloaded django apps

2008-11-16 Thread Steve Holden
ou can pick them up by having 'django.template.loaders.app_directories.load_template_source' in your settings.TEMPLATE_LOADERS, in the latter case you can put the templates pretty much wherever you want. regards Steve -- Steve Holden+1 571 484 6266 +1 800 494 3119 Holden Web LL

Re: general problems with installing downloaded django apps

2008-11-16 Thread Steve Holden
webcomm wrote: [Please don't top-post ... I've moved your answer down] > On Nov 16, 1:01 pm, Steve Holden <[EMAIL PROTECTED]> wrote: >> webcomm wrote: >>> Maybe I'm starting to get the idea... can apps be installed anywhere, >>> as long as they are

Re: general problems with installing downloaded django apps

2008-11-16 Thread Steve Holden
webcomm wrote: [yet again at the top of the message, so I have yet again moved the response down to where it reads logically ...] > On Nov 16, 2:35 pm, Steve Holden <[EMAIL PROTECTED]> wrote: >> webcomm wrote: >> >> [Please don't top-post ... I've moved your a

Re: populating database model with form model

2008-11-16 Thread Steve Holden
Beware, though, of assuming exact parallels. The django on GAE is a) somewhat out of date, and b) modified to adapt it to the Google App Engine hosting environment. Good luck with your project. regards Steve jtobe wrote: > thanks for trying to help. > > app engine models use .put(

Re: Order of Middleware

2008-11-17 Thread Steve Holden
ionalGetMiddleware', > # 'django.middleware.gzip.GZipMiddleware', > 'django.middleware.common.CommonMiddleware', > ) > > Order is declared to be important so which is the correct order? > > I'd assume that they are installed in the correct order

Re: Items tree in Django

2008-11-19 Thread Steve Holden
think > they're good measures, but at various ends of the scale (and, let's be > serious here: 500 is small), alternative strategies work very well. > In RDBMS terms 500 is *tiny*, and handling the complexity in Python is a very viable strategy at that level unless th

Re: Using generic view to insert a simple model in the DB

2008-11-19 Thread Steve Holden
don't worry about it. If you can handle Python then your major problem is going to be keeping things simple enough to be representable as a template: the language is deliberately designed to be *not* a programming language, so it's more natural for content designers than Python prog

Re: serving static file via django

2008-11-19 Thread Steve Holden
tter for a (one-pixel?) graphics. Whether what the Django server *does* provide is sufficiently secure for your needs only you can decide. But you can't say you weren't warned if everything goes pear-shaped ;-) regards Steve -- Steve Holden+1 571 484

Re: serving static file via django

2008-11-20 Thread Steve Holden
Graham Dumpleton wrote: > > > On Nov 20, 1:41 pm, Steve Holden <[EMAIL PROTECTED]> wrote: [...] >> The drawbacks are that the Django web servers aren't designed to the >> same rigorous security standards that are applied to production web >> servers lik

Re: Django install

2008-11-20 Thread Steve Holden
waltbrad wrote: > Hi folks. I'm trying to install on my pc Django without success. I > was using instantdjango, but I'm told that there is some danger > because of it's internal webserver? > Anyway, I downloaded django and put the folder into C:\Python25\Lib > \site-packages. I also put the path

Re: Django install

2008-11-20 Thread Steve Holden
want you to install Apache. I > did that last year, so I guess I'll have to do that again. This is > where I get really confused because I don't understand why I need > Apache. Should I install Apache before I continue with the tuto

Re: Is it possible to bind two forms to a single method?

2008-11-20 Thread Steve Holden
e HTML you have put around the forms. One possible way would be to have two different submit buttons with the same name and different values, then use the value to distinguish between them. This presumes you only want to action the form whose submit button is clicked? A fur

Re: indentation problem in file

2008-11-20 Thread Steve Holden
s.ForeignKey(Poll) > choice = models.CharField(max_length=200) > votes = models.IntegerField() > def __unicode__(self): > return self.choice > == > > Is there something wrong with this. I

Re: ImportError: No module named psycopg2 on XP

2008-11-20 Thread Steve Holden
built with Visual Studio 2003; extensions must be built with a compiler than can generate compatible binaries. Visual Studio 2003 was not found on this system. If you have Cygwin installed, you can try compiling with MingW32, by passing "-c mingw32" to setup.py. I believe for Python

Re: ImportError: No module named psycopg2 on XP

2008-11-20 Thread Steve Holden
Steve Holden wrote: > dj wrote: > >> Hello All, >> >> I am trying to use PostgreSQL database and am I an stuck in the >> install of psycopg2. >> > [...] > > Hope this helps, though it may not ... > regards > Steve > PS: Bin

Re: Request object from models

2008-11-21 Thread Steve Holden
ces of the model are created in response to a web request (i.e. when a view is running). At that time, obviously, yo have access to the web request and so can get hold of the user's identity. But there is no way to know that information in advance, so you can't specify it as a default

Re: New Django user: How do I return the server's IP address?

2008-11-21 Thread Steve Holden
[EMAIL PROTECTED] wrote: > Where can I get the Host server's IP address? > > request.META['SERVER_NAME'] simply returns localhost instead of > whatever my ip address is > > Try import socket socket.gethostbyname(request.MET

Re: dynamic method calling

2008-11-22 Thread Steve McConville
r it more elegant but it doesn't use getattr :) -- steev http://www.daikaiju.org.uk/~steve/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to d

Re: Dynamic columns in admin changelists

2008-11-22 Thread Steve Phillips
For me the #django IRC chat logs have given me much success as a reference point as I am a beginner with django. That search on there for me is a goldmine. Steve On 11/21/08, AndyB <[EMAIL PROTECTED]> wrote: > > I basically would like some way for staff users to choose which &

Re: Django ORM and phpMyAdmin

2008-11-24 Thread Steve Holden
-- > >>>> u3.status >>>> > > --- no, nothing --- > > I want to know why? > > And I want to solve this, please! > thank you, come again! > At the very least you would need to read the database again, as there is nothing that wo

Re: parameter not getting passed to view function

2008-11-24 Thread Steve Holden
m.group(0) hello/TEST/ The problem is not that your URL pattern isn't matching, it's that the named group matches the empty string and TEST is matched by the "\S+". regards Steve --~--~-~--~~~---~--~~ You received this message because you

Re: django documentation

2008-11-24 Thread Steve Phillips
places. Give the IRC chat logs a look. Search through them. It's almost a guarantee that what you are doing has already been done and someone already asked for help on it. I practically never ask for help anymore unless I am truly stuck. Steve On 11/24/08, ReneMarxis <[EMAIL PROTECTED

Re: Injecting stuff to an existing list?

2008-11-25 Thread Steve Holden
erson changes with time, and you are introducing unnecessary redundancy into the data model. When do you suggest the current age columns should be updated? regards Steve -- Steve Holden+1 571 484 6266 +1 800 494 3119 Holden Web LLC

Re: Injecting stuff to an existing list?

2008-11-25 Thread Steve Holden
David Zhou wrote: > On Tue, Nov 25, 2008 at 9:05 AM, Steve Holden <[EMAIL PROTECTED]> wrote: > >> David Zhou wrote: >> >>> On Tue, Nov 25, 2008 at 3:55 AM, sajal <[EMAIL PROTECTED]> wrote: >>> >> [...] >> >>&

App Name in Admin

2008-11-25 Thread Steve Phillips
Hi All I have been searching through the list and IRC archives all day and haven't found anything recent about changing the name that's displayed for a app on the admin page? Before I go and just 'write my way around it', does anyone know of a shortcut to do it? Than

Re: App Name in Admin

2008-11-26 Thread Steve Phillips
ke it a 1 or 2 liner in future projects. Thanks Steve On 11/26/08, Kurczak <[EMAIL PROTECTED]> wrote: > > > I believe the only way to do this is to edit admin index template. > > > On Nov 26, 10:15 am, "Alex Koshelev" <[EMAIL PROTECTED]> wrote: > >

Re: Best IDE for Django and python?

2008-11-26 Thread Steve Phillips
I personally use Komodo Edit along with IDLE. Also instead of using "manage.py shell" I use IDLE. I am so spoiled by the autocompletions. On 11/26/08, Chagel <[EMAIL PROTECTED]> wrote: > > > anyone know when NB has Django project support? > > > On Nov 25, 8:26 pm, bedros <[EMAIL PROTECTED]> wrot

Re: Adding new forms dynamically to the page?

2008-11-30 Thread Steve Bergman
then expect and validate that number of forms when the user submits. -Steve --~--~-~--~~~---~--~~ 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@goog

Re: Adding new forms dynamically to the page?

2008-11-30 Thread Steve Bergman
modifying the management form. But like I say, I'm no whiz at this. -Steve --~--~-~--~~~---~--~~ 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@googleg

App Name In Admin

2008-12-03 Thread Steve Phillips
n't and won't have to touch the default sites.py. Now I am interest in what some others in the group have done for this issue(if they wanted or needed to). Not the code directly but sort of the procedures as I am open to other ideas. I don't think I want to use this as a permnent solut

Django Training

2008-12-08 Thread Steve Holden
uch a rich platform it would be possible to write several classes: what material do readers regard as the "essentials of Django", and what should be relegated to more advanced classes? What can I do to put a compelling introductory class together?

Re: missing admin documentation

2008-12-09 Thread Steve Phillips
Right in your urls.py there should be commented out lines that's specifically tells you what to do to get the docs working. Once you do that then you will see the link. Steve On 12/9/08, aparajita <[EMAIL PROTECTED]> wrote: > > Hi, > > I am using django release 1.0.2, not

Re: Django Training

2008-12-11 Thread Steve Holden
ents there expressed an interest in Django training second only to "more advanced Python". So I think there's likely to be a market. It's just a question of the content and sequencing. regards Steve On Dec 10, 2:28 am, "Skylar Saveland" wrote: > +1, Perhaps build

Re: Django form HTML is rendered as TEXT

2008-12-25 Thread Steve Phillips
Hi, Is it some html that's generated by Django or do you have something generating it? SP On 12/25/08, s4shre...@gmail.com wrote: > > Hi Guys, > I am new to Django . My Django form HTML is rendered as TEXT . It > does not display the HTML as such. > > Please assist. > > Thanks in Advance > Reg

Re: deploying in server and templates folder is wrong:

2009-01-10 Thread Steve Potter
preciated. > > Many thanks in advance. > > Alans. You need to edit your settings.py file and change your TEMPLATE_DIRS to point to the new location. Steve --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Group

Re: Serving static content using Apache

2008-08-18 Thread Steve Holden
ories because the original design didn't conveniently lump everything under /static/. YMMV, of course, but it's a thought. regards Steve -- Steve Holden+1 571 484 6266 +1 800 494 3119 Holden Web LLC http://www.holdenweb.com/ --~--~-~--~~~--

Re: modelforms: getting field object in clean_ method

2008-08-18 Thread Steve Holden
and field_2 > # PROBLEM: don't know how to raise validation errors on fields > raise forms.ValidationError('field_1 error msg') on field_1 > raise forms.ValidationError('field_2 error msg') on field_2 > > return self.cleaned_data

Re: ifequal doesn't evaluate expressions

2008-08-18 Thread Steve Holden
zdmytriv wrote: > 2 Steve: > > >> That's no way to endear yourself to the Django community. The >> development team has some pretty good brains. >> > > I agree, I was too aggressive, sorry about that. Just can't believe > that bug like thi

Re: Custom meta data to models

2008-08-19 Thread Steve Holden
Torsten Bronger wrote: > Hallöchen! > > In > , > custom metadata to models were discussed. Has there been any > progress in this, or has been another approach to this proposed? > FYI, when I ask Thunderbird to follow that link it brings up an email compose wi

Re: Invalid block tag: 'autoescape'

2008-08-19 Thread Steve Holden
alternative for > {% autoescape off %}{{ abc.text|truncatewords:100 }}{% endautoescape > %} > > I don't suppose a private install of the trunk would work for you? You don't *have* to import Django from the standard site-packages lo

Re: Custom meta data to models

2008-08-19 Thread Steve Holden
post the HTTP link. At that >> point, we might be able to see what you're referring to and help >> you. >> > > It depends on your client. Many clients understand the "news:"; > notation and save you from switching to the browser wh

Re: manager select_related()

2008-08-19 Thread Steve Holden
n a row. You could either change this to t = Acct.objects.all().filter(id= self.id)[0].name or, more comprehensibly, to t = Acct.objects.get(pk=self.id).name I think. Though this would seem to make sense as a __unicode__() method too. regards Steve --~--~-~--~~---

Re: ifequal doesn't evaluate expressions

2008-08-19 Thread Steve Holden
If they aren't sufficiently essential for you to use them as custom tags, they surely can't be essential for the core. regards Steve Zinovii Dmytriv wrote: > You didn't convince me. > > If somebody ask you "When I should write my custom tags?" - the answer &g

Re: Renaming of mailing lists to avoid user confusion

2008-08-20 Thread Steve Holden
appropriate factor. I'm not convinced that renaming would actually improve the situation. FWIW python-dev has exactly the same issue, and it's handled without these continuous navel-contemplation exercises. As far as splitting up django-users into multiple groups, wouldn't the &qu

Re: how to locate the OS currently logged in user??

2008-08-20 Thread Steve Holden
t to examine the server environment for REMOTE_USER: if present, this should be the user name by which the user authenticated when they logged on to the client (which we are assuming is also the server). regards Steve -- Steve Holden+1 571 484 6266

Write Caching

2008-08-23 Thread Steve Potter
? Thanks, Steve --~--~-~--~~~---~--~~ 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: Write Caching

2008-08-24 Thread Steve Potter
er in this case the database is initiating some of them instead of Django. Steve On Aug 24, 5:59 am, TiNo <[EMAIL PROTECTED]> wrote: > Maybe this could be a > solution:http://www.stardata.it/articoli_en/triggers_on_select_articoli_en.html > > No idea how much overhead that wou

Re: Admin problems :(

2008-08-24 Thread Steve Potter
What Erik is saying is that in recent versions of Django you no longer use the same syntax to activate the admin. This happened when the newforms-admin branch was merged. Steve On Aug 24, 10:13 am, Shadow <[EMAIL PROTECTED]> wrote: > ah... :P thanks > > But what about the &

Re: help implementing search in django

2008-08-25 Thread Steve Potter
I really don't have any experience with this. However if I was trying to implement a search, the first thing I would do is look at the Django Admin code and see how it was done there. Steve On Aug 25, 1:15 pm, chefsmart <[EMAIL PROTECTED]> wrote: > Please seehttp://dpaste.co

Re: Strategies for staying current with django development

2008-08-25 Thread Steve Potter
worked. If you look in the django-users archive I think I remember a few other people having the same auth problems you are describing, however I don't remember the solution. Steve On Aug 25, 3:43 pm, Gremmie <[EMAIL PROTECTED]> wrote: > I checked out the latest django from SVN so

Re: Inconsistencies/Bug in ModelForm

2008-08-28 Thread Steve Holden
= ( > (0, 'Zero'), > (1, 'One'), > ) > So wouldn't it be possible to put another choice, {"", "") at the top of your list? [...] regards Steve -- Steve Holden+1 571 484 6266 +1 800 494 3119 Holden Web LLC

Re: Inconsistencies/Bug in ModelForm

2008-08-29 Thread Steve Holden
Malcolm Tredinnick wrote: > > On Thu, 2008-08-28 at 21:32 -0400, Steve Holden wrote: >> lingrlongr wrote: >>> Submitted ticket #8663 for the following: >>> >>> When a ModelForm? is used to display a form for a Model, the fields >>> defined with a

Re: Revised: datetime formatting (mysql vs. django)

2008-08-29 Thread Steve Potter
I can't say for sure, but I believe that the now button in the admin is a javascript. So I think that is where you need to look to control the output. Steve On Aug 29, 4:14 pm, Gerard Petersen <[EMAIL PROTECTED]> wrote: > Hi All, > > Im *still* :-( trying to get the date

Re: spanning relationships

2008-08-31 Thread Steve Holden
son) def __unicode__(self): return self.name class Admin: pass In [3]: Org.objects.filter(person__address__city__exact='Fairfax') Out[3]: [] I should point out, however, that this gives you only one person per organization, which I suspect is *not* what you want. r

Re: External link hit counter

2008-08-31 Thread Steve Potter
Your best bet would be to achieve this using Ajax. Check out these basic tutorials: http://www.b-list.org/weblog/2006/jul/31/django-tips-simple-ajax-example-part-1/ http://www.b-list.org/weblog/2006/aug/05/django-tips-simple-ajax-example-part-2/ Steve On Aug 31, 8:00 pm, Yury Lifshits

Re: Filtering related field attributes is not working

2008-09-07 Thread Steve Holden
Robocop wrote: > Thank you for the suggestion, but first (with the right answer) come > first serve. > So no fine romantic dinner for you, Wojtek. regards Steve -- Steve Holden+1 571 484 6266 +1 800 494 3119 Holden Web LLC http://www.hold

Re: Forms across multiple pages?

2008-09-07 Thread Steve Holden
deas? Basically what you describe is the essence of Ajax. Ajax requests are no different from any other as far as Django is concerned, though: the client-side Ajax code will typically replace some page element's InnerHTML with the response from the server. regards Steve -- Steve Holden+1

Re: DateTimeFields not showing up in Admin page

2008-09-07 Thread Steve Holden
Since the whole point of those options is to ensure that the datetime values are inserted automatically it would seem a little perverse to want to make manual entries in the fields to which you have applied them. regards Steve Guillermo wrote: > > I was using the "auto_now" a

Re: Determining the type of object with model inheritance

2008-09-07 Thread Steve Holden
e to add a "discriminator" column in the base Animal class. The other would be to write a manager that implemented a method that introspected the individual instance attributes. There are probably other ways too. regards Steve -- Steve Holden+1 571 484 6266 +1 800 494 3

Re: ANN: Updated Django Cheat Sheet

2008-09-07 Thread Steve Holden
Fraser: I printed the sheet out in duplex and was disappointed to see that the two sides had opposite orientations. So a duplex version that would yield a useful double-sided cheat sheet would be interesting to me. regards Steve Fraser Nevett wrote: > Thanks for all the feedback both on l

Re: ANN: Updated Django Cheat Sheet

2008-09-07 Thread Steve Holden
put configuration option. When > duplexing, you usually have the choice of "long edge/side" or > "short edge/side". Swapping this option should help you out. > Right. Looks like I have about 32 variants to try now ... regards Steve -- Steve Holden+1 571 484 62

Re: Apache httpd conf with mod_python

2008-09-09 Thread Steve Holden
mport the settings, etc. > You *did* retain all the stuff from the rest of the original Apache conf file, right? And you have checked the permissions on the individual files as well as the directories? regards Steve --~--~-~--~~~---~--~~ You received this message

Re: Apache httpd conf with mod_python

2008-09-09 Thread Steve Holden
hether that will make a difference, but you could try SetHandler python-program PythonPath "['/home/chris/web/django_project/ucwv'] + sys.path" PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE settings PythonDebug On regards Steve

Re: How to retrieve forgotten password of django admin user

2008-09-10 Thread Steve Holden
your user to let them log in again: http://coderseye.com/2007/howto-reset-the-admin-password-in-django.html regards Steve -- Steve Holden+1 571 484 6266 +1 800 494 3119 Holden Web LLC http://www.holdenweb.com/ --~--~-~--~~~---~--~~ You rece

Re: comparing Model instances

2008-09-11 Thread Steve Holden
almost certainly find it quicker to define a key() function and provide that; the function is called once per model instance to create sort keys, which can be compared from within the C implementation of the sort() method without the need to call back out into Python code. I've got some timings l

Re: Displaying a list of lists?

2008-09-12 Thread Steve Holden
Widget 2 Widget 3 Wodgets Wodget 1 Wodget 2 Wodget 3 regards Steve Dana wrote: > You could try the template filter "unordered_list" too I believe > (haven't done it myself). > > http://docs.djangoproje

Re: Displaying a list of lists?

2008-09-12 Thread Steve Holden
Daniel Roseman wrote: > On Sep 12, 1:04 pm, Steve Holden <[EMAIL PROTECTED]> wrote: >> [OT question: Why does top-posting seem to be the default response mode on >> this list?] >> As a follow-up to this question, how would one cast the output as a table >&

Re: Help: Running 1.0 and 0.96 side by side?

2008-09-12 Thread Steve Holden
om django96. Virtualenv will give you a much cleaner separation between the two environments. regards Steve -- Steve Holden+1 571 484 6266 +1 800 494 3119 Holden Web LLC http://www.holdenweb.com/ --~--~-~--~~~---~--~~ You received this me

Re: How to prevent URL HTML encoding?

2008-09-12 Thread Steve Holden
h correctly to whatever code processes the URL. In terms of having the browser's user see the plus signs in the location bar, there is no way to do that, because of their interpretation described above. regards Steve -- Steve Holden+1 571 484 6266 +1 800 494 3119 Holde

Re: Import error: Model based on another model

2008-09-13 Thread Steve Holden
models.CharField(max_length=50) So I'd like to be able to populate drop-downs with (id, lkpValue) pairs for a given value of lkpType. The related tables might use a ForeignKey, but I certainly don't want to see all Lookups in a selection, just those of the relev

Re: Admin: design question

2008-09-13 Thread Steve Holden
k out the "ForeignKey.limit_choices_to" attribute. However, I don't know whether this would give you the correct results where no project code was specified, and I'm not sure how to do this in general applications yet. regards Steve -- Steve Holden+1 571 484 6266 +1

Re: Database Security

2008-09-13 Thread Steve Holden
a, there's nothing in the standard Django setup that requires it to *be* anywhere special. As Ross points out, as long as it can be contacted by name, or by IP address, it's perfectly OK for it to be the other side of a firewall, for example. I sometimes run Django code on my laptop a

Re: Database Security

2008-09-13 Thread Steve Holden
Mario wrote: [some stuff which I have again moved to the bottom where it belongs] > On Sep 13, 12:46 pm, Steve Holden <[EMAIL PROTECTED]> wrote: >> Ross wrote: >> [some stuff you can now find after the question] >>> On Sep 13, 9:37 am, Mario <[EMAIL PROTECTED]

Re: 3 models need to access 1 model

2008-09-13 Thread Steve Holden
ry should contain an admin.py module. In that you import your models, create your admin.ModelAdmin subclasses and register your models (with the admin.ModelAdmin subclasses as required). regards Steve -- Steve Holden+1 571 484 6266 +1 800 494 3119 Holden

Re: ***SPAM*** A trick to force autoreloading, in case of changes in views.py

2008-09-14 Thread Steve Holden
x27;s spam, why add another link to Google by quoting the URL (twice) in your message? regards Steve --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: 3 models need to access 1 model

2008-09-14 Thread Steve Holden
[EMAIL PROTECTED] wrote: > Thanks Steve. I currently don't have an admin.py file in any of my > apps. Is this as simple as creating the file and moving all > admin.site.register() and admin.ModelAdmin sections into it ? and the > file gets autoloaded ? > Pretty much,

Re: ***SPAM*** A trick to force autoreloading, in case of changes in views.py

2008-09-14 Thread Steve Holden
Steve Holden wrote: > n00m wrote: >> What is the http:[...]? >> >> Remove from your sig this link to your f**king spam-like site. >> >> On Sep 12, 4:36 pm, Thomas Guettler <[EMAIL PROTECTED]> wrote: >> >>> Thomas Guettler[...] > If you t

Re: Admin inlines and foreign keys

2008-09-15 Thread Steve Holden
lationship between Website and Plugin: many Plugins can have the same Website, each Website is associated with exactly one Plugin. Is that what you need? regards Steve -- Steve Holden+1 571 484 6266 +1 800 494 3119 Holden Web LLC http://www.holdenweb.com/ --~--~-~--~

Re: using forloop variable to get the provide special tags for the 4th element.

2008-09-15 Thread Steve Holden
lement this feature is the "cycle" tag. >{% if forloop.first %} > >{% else %} > >{% endif %} would then become However I'm not really able to understand the rest of your logic enough to determine how the remainder of the code wou

Re: 1.0 branch

2008-09-15 Thread Steve Holden
oproject.com/download/ Actually, to avoid being too much of an asshole, I did just check. You can find it under *tags*, nit branches, at http://code.djangoproject.com/svn/django/tags/releases/1.0 regards Steve --~--~-~--~~~---~--~~ You received this message beca

Re: Filtering ManyToManyField

2008-09-15 Thread Steve Howard
ccessing related_items through the property as you've got it written, just change the name of the original field to all_related_items or something so there's no name collision. Steve > > > Could anyone clarify what I need to do be doing to acheive the desired > filterin

Re: How to syncdb programatically (django standalone script) ?

2008-09-15 Thread Steve Holden
ot; > > p = Poll(question="What's up?", pub_date=datetime.datetime.now()) > p.save() > This is k=nd of a wild-assed guess. Please tell me if it works. from django.core.management import call_command call_command('syncdb') regards Steve --~--~-~--~~

Re: Problem with url tag (Caught an exception while rendering: Reverse ...)

2008-09-16 Thread Steve Holden
ually calls reverse and it > is failing to find my pattern. > In which case a solution would appear to be to replace each alternate with a separate pattern. It might seem distatsteful, but it should work ... regards Steve --~--~-~--~~~---~--~~ You received

Re: django + apache + ssl

2008-09-17 Thread Steve Holden
Host. This involves SSLEngine On SSLCertificateFile /etc/apache2/holdenweb.com.crt SSLCertificateKeyFile /etc/apache2/holdenweb.com.key regards Steve lingrlongr wrote: > Hmmm I played around a bit more. I don't think this is a Django > problem. I reduced the

Re: Can not under stand the error obtained when validating a model.py

2008-09-17 Thread Steve Holden
k about reinstalling Django. It appears to contain the keyword "class" followed by a function call: it looks as though you have accidentally pasted some of your own code into the package initializer while examining it. regards Steve --~--~-~--~~~---~--~~ Yo

Re: django + apache + ssl [OT Apache stuff]

2008-09-17 Thread Steve Holden
te I installed). If you use a specific IP you lose that ability, since it has to match (though that depends on how your network layer handles local connections to the external IP, I guess). Anyway, hope this helps. Now back to the salt mines ... regards Steve lingrlongr wrote: > It turns out

Re: Newbie Question: How to display only error messages when form validation fails?

2008-09-18 Thread Steve Holden
rm.errors}} in the html page, this is what i get. > > * town > o Please enter town. > * postal_code > o Please enter postal code. > > > I would like to display only the error messages. Is there anything I > am doing wrong? > > regards Steve

Re: Problem with url tag (Caught an exception while rendering: Reverse ...)

2008-09-19 Thread Steve Holden
Brian Neal wrote: > > On Sep 16, 4:09 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > >> Brian Neal wrote: >> >>> I might have found my answer. I was looking at the list of >>> incompatible changes and found this: >>>

Re: Problem with url tag (Caught an exception while rendering: Reverse ...)

2008-09-19 Thread Steve Holden
Brian Neal wrote: > > > On Sep 19, 12:45 pm, Steve Holden <[EMAIL PROTECTED]> wrote: >> That's annoying: now *I* have a (named) pattern that won't reverse with >> the URL tag: specifically, the edit profile URL from the Google code >> profiles ap

Re: Sorting list of objets in Python/Django

2008-09-21 Thread Steve Holden
function is called once to decorate each object in the list, and the C sort function compares the decorated list items without the need to call out to Python functions at all. As with all general solutions, specific circumstances can alter this general conclusion. regards Steve Rodolfo wrote

Re: Newbie Question: How to display only error messages when form validation fails?

2008-09-22 Thread Steve Holden
s out, you cannot use function calls inside Django template expressions: if the value is callable (as form.errors.items is) then it will be called automatically. And don't forget the space after the opening {% *and* before the closing %}. regards Steve --~--~-~--~~---

Re: How to simulate recursive inlines in admin?

2008-09-22 Thread Steve Holden
right word for this thing ...). Let me know if > this interests you at all, and I'd be glad to say more about it. > > This all seems rather ambitious for the admin. Isn't it supposed to be a simple application, and aren't thos

Re: Accessing Settings from Flatpages

2008-09-22 Thread Steve Holden
pages > allow you to specify what data gets passed to them, aside from the db > page data? The simplest way would be to define a template context processor. See http://www.b-list.org/weblog/2006/jun/14/django-tips-template-context-processors/ for some

Re: How can I test my api between two servers running django

2008-09-25 Thread Steve Holden
Alexander Pugachev wrote: > crazy russian > > 2008/9/23 Vitaliy <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> > > > >so they both created test db for each other > I meen for them selfs :) > We can probably do without any kind of racial slur, than

Re: importing models from other apps

2008-09-26 Thread Steve Holden
lass? If so, that will be the problem> a ManyToMany should be a field of one of the related classes. If my psychic powers have failed me then please reply with more information about the nature of the failure. regards Steve --~--~-~--~~~---~--~~ You received

<    1   2   3   4   5   6   7   8   >