Re: get for errors as string and not as HTML

2008-04-29 Thread Mike Chambers
specific field? Thanks again for the help... mike chambers Ronny Haryanto wrote: > On Wed, Apr 30, 2008 at 12:03 PM, Mike Chambers <[EMAIL PROTECTED]> wrote: >> >> Name >> {{ form.user_name }} {{ form.user_name.errors }} >>

feed api : why have templates t specify item and description fields

2008-05-01 Thread Mike Chambers
d how and why django is built the way it is. thanks... mike --~--~-~--~~~---~--~~ 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 uns

Re: feed api : why have templates t specify item and description fields

2008-05-01 Thread Mike Chambers
Thanks. On #1, there is already similar information in the class (such as the overall feed description, url, etc... #2 makes sense though. mike chambers Rajesh Dhawan wrote: > On May 1, 2:11 pm, Mike Chambers <[EMAIL PROTECTED]> wrote: >> I am using the feed api, and it work

Re: Pass extra data to a view

2008-05-03 Thread Mike Chambers
Could you just specify the data in the URL that you redirect to? mike Jay Parlar wrote: > On 5/2/08, Jay Parlar <[EMAIL PROTECTED]> wrote: >> I must be missing something super obvious here, but I can't figure out >> how to pass data to a new view, from the old one.

Re: Get first_name from User Model in to my Model

2008-05-04 Thread Mike Chambers
user.firstname user.lastname ?? Is that what you are looking for? mike chiefmoamba wrote: > Hi, > > I am having a problem getting data from the user model in to my model > (below). I can get the usernames easy enough using "user = > models.ForeignKey(User)",

Re: Filefield upload_tol

2008-05-05 Thread Mike H
er is told there is an error. I think there are a number of tickets logged, but the official word is to wait until newforms-admin is complete. (I think, anyone know better?) Cheers, Mike On 5 May 2008, at 14:52, Ben Eliott wrote: > > Hi kg, > > Class HIP has a 1-to-many with Pr

one-to-many design question

2008-05-09 Thread Mike Chambers
model this relationship? Thanks for any input... mike --~--~-~--~~~---~--~~ 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 unsubsc

Re: one-to-many design question

2008-05-09 Thread Mike Chambers
Thanks for confirming. Book.chapter_set.all() gets all of the chapters for the book. Thanks! mike [EMAIL PROTECTED] wrote: > The first way is the correct way, to get all the chapters for a given > book you would do book_obj.chapter_set.all() , you can set what this > attribute is

Re: How to modify contrib.auth models etc

2008-05-09 Thread Mike H
then be accessible through user.get_profile() Hope that helps, Mike On 9 May 2008, at 15:14, Marcin Gorczyński wrote: > > Well basicly I want the groups to have more data associeted with them > - like a image filename, extracting the numer of users, one-to-one > relations with a mod

dynamic default values for Forms

2008-05-12 Thread Mike Chambers
I missing something already built in? mike chambers --~--~-~--~~~---~--~~ 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

handling form errors in separate app

2008-05-12 Thread Mike Chambers
nts is being worked on. However, I am doing this in part to learn more about django. Thanks for any thoughts... mike chambers --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To po

wrong URL after invalid form submission

2008-05-12 Thread Mike Chambers
hack, and ties the form handling too closely to that particular view. Any suggestions? mike --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send e

do sessions work when redirecting?

2008-05-13 Thread Mike Chambers
rowser is redirected. If I do: -- request.session['a'] = '' render_to_response(...) -- Then the session is available as expected. I have tried to set: request.session.modified = True but that does not change the behavior. Can sess

Re: do sessions work when redirecting?

2008-05-13 Thread Mike Chambers
REFERER']) this outputs: -- -- However, it it still not actually saved and available during a seperate request. mike Rajesh Dhawan wrote: > > > On May 13, 3:23 pm, Mike Chambers <[EMAIL PROTECTED]> wrote: >> I am running into an issue where my sessi

Re: do sessions work when redirecting?

2008-05-13 Thread Mike Chambers
ttp import QueryDict q = QueryDict(request.session['form_post_query_string']) comment_form = CommentForm(q) -- Anyone know why I cant store request.POST.copy() in the session? Is that a bug? mike Mike Chambers wrote: > Thanks for the input. > > I am narrowing down the issue.

Re: do sessions work when redirecting?

2008-05-13 Thread Mike Chambers
['form_post_data'] = request.POST.copy() request.session['foo'] = "bar" Then, in another request: print request.session.keys() prints [] But: request.session['foo'] = "bar" then in another request: print request.session.keys() prints ['f

Re: do sessions work when redirecting?

2008-05-13 Thread Mike Chambers
fyi, bug logged here with test case: http://code.djangoproject.com/ticket/7233 mike Mike Chambers wrote: > ok. more info on this. (Sorry about all of the emails, but I am really > trying to track this down, and see if it is a bug). > > If I try to include the request.POST data

encrypting form data

2008-05-15 Thread Mike Chambers
data? I know how to hash it using MD5, and SHA1, etc... but that is only a one way hash. I dont want to have to loop through all of the possible values to compare the hashes as that could get to be expensive. Any suggestions? mike --~--~-~--~~~---~--~~ You

Re: encrypting form data

2008-05-15 Thread Mike Chambers
also store the hash in the DB, but then if for some reason my secret key changes, all of that data becomes useless. The values would not be viewable. Instead of: it would be And searching on google and this list, only turned up one way hashes. mike Richard Dahl wrote: > I am not sure w

Re: encrypting form data

2008-05-15 Thread Mike Chambers
The value is encrypted in the form. The secret key, used to either decrypt or hash the value, is on the server, and not in the form. My application does not have the concept of logged in users. mike jonknee wrote: > > How would that help if the "secret" value was in the form

Re: encrypting form data

2008-05-15 Thread Mike Chambers
I am not concerned if they can send the hash back. I dont want them to be able to access the underling value that the hash is based on. I am also not concerned about spam, but rather just dont want to expose raw database ids to the public. mike Richard Dahl wrote: > Mike, > I concu

Re: encrypting form data

2008-05-15 Thread Mike Chambers
suggestions. mike Gabriel wrote: > Mike Chambers gmail.com> writes: > >> >> I am not concerned if they can send the hash back. I dont want them to >> be able to access the underling value that the hash is based on. >> >> I am also not concerned about sp

Re: Uploading files to subdirectories

2008-05-16 Thread Mike Hjorleifsson
what happens in your example if sally has a holiday.rtf ? On May 16, 3:00 am, James McGill <[EMAIL PROTECTED]> wrote: > Hi All, > I'm new to Django and I'm not sure how best to achieve the following: > > Users may upload files - each uploaded file is tied to a user in the > database using a Fore

Re: reloading models in the shell

2008-06-12 Thread Mike H
That does indeed work, just remember you can only reload modules, not individual classes you've imported from a module. Mike On 12 Jun 2008, at 09:52, Gregor Müllegger wrote: > > Maybe the builtin function ``reload`` might help you: > http://docs.python.org/lib/built-in-fu

Re: problem getting mod_python to serve application..

2008-06-27 Thread Mike Caldwell
I've had a very similar problem and it turned out to be a permission problem. I had used svn to get the latest django in my home directory and then linked django from there to /usr/lib/python2.4/site-packages. The apache user had read/execute privileges up the /usr/lib pathway to django/core/hand

removing page from cache (memcache)

2008-07-02 Thread Mike Chambers
getting the cached version. Does anyone see what I might be doing wrong? Am I removing the page from the cache correctly? mike --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" gr

Re: streaming upload

2008-07-03 Thread Mike Axiak
Hi jm, I've been trying to reproduce your problem with no success. Can you please post your nginx configuration (a safe version, obviously)? Also, if you stop by #django, my username is axiak. It might be easier to track this down in IRC. Cheers, Mike On Jul 2, 6:26 pm, umrzyk &l

Re: removing page from cache (memcache)

2008-07-03 Thread Mike Chambers
takes a request, but I need to delete the cache for a specific page (which isnt the one being requested). mike Mike Chambers wrote: > I am using memcache for my site, and it is working well except for one > issue. > > When a user enters a comment, I redirect them to the page th

Re: removing page from cache (memcache)

2008-07-03 Thread Mike Chambers
based on the hashed path, but I dont want to branch the django source. mike Mike Chambers wrote: > Upon looking at the source, it looks like I am using an out of date way > to generate the cache key: > > http://code.djangoproject.com/browser/django/trunk/django/utils/cache.py >

Re: removing page from cache (memcache)

2008-07-03 Thread Mike Chambers
h page caching (and not path / cookie page caching). mike chambers Norman Harman wrote: > http://www.djangoproject.com/documentation/cache/#using-vary-headers > > http://www.djangoproject.com/documentation/cache/#the-low-level-cache-api > --~--~-~--~~~--

Re: Inserting html into a page dynamically

2008-07-07 Thread Mike Caldwell
Why not just use AJAX, and then have a save button to submit and save in your database. On Mon, Jul 7, 2008 at 2:48 PM, Bear <[EMAIL PROTECTED]> wrote: > > Hi > > I'm new with Django and I can't figure out a method to do what I want, > that is to say inserting html dynamically in my page (I'm not

How to do dynamic lookup of variables.

2007-02-14 Thread Mike Lake
Hi all Im trying to place into a list of experiments the number of procedures for each experiment. >From within the views.py I can save the number of procedures in an experiment >into either a list of tuples (e.id, count) or a dictionary {'e.id': count}. >But when I come to access them in the

Re: Database changes

2007-02-20 Thread Mike H
generation to add the new columns. Perhaps if I get some time to read through and understand the syncdb code I can produce an add_missing_columns command... MIke On 2/20/2007, "Adrian Holovaty" <[EMAIL PROTECTED]> wrote: > >On 2/19/07, kbochert <[EMAIL PROTECTED]> wrote:

Re: Using HTML/CSS as templates

2007-02-27 Thread Mike H
n/ You need to tell your webserver where your static files, such as images and css, are so that python+django can be bypassed and your webserver can serve them. HTH Mike On 2/27/2007, "MattW" <[EMAIL PROTECTED]> wrote: > >Dear Group, > >I've got an HTML page wi

Re: About to defect, need MS SQL Server patch for 0.96pre or 0.95

2007-03-01 Thread Mike H
On 3/1/2007, "Sean De La Torre" <[EMAIL PROTECTED]> wrote: >With the exception of dataset paging, it is feature complete and stable. Excuse the dumb question, but does that mean that generic paginated views will not work, or will just be quite inefficient? Thanks, Mike

Re: About to defect, need MS SQL Server patch for 0.96pre or 0.95

2007-03-01 Thread Mike H
Wow, slightly stunned that SQL Server 2000 doesn't have that, at least Oracle has ROWNUM...! Thanks for the clarification though :) Mike On 3/1/2007, "Sean De La Torre" <[EMAIL PROTECTED]> wrote: >Mike, > >Sorry for the confusion. The generic paginated views wi

Outputting navigation

2007-03-05 Thread Mike H
ategory? Thanks for any help! Mike --~--~-~--~~~---~--~~ 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

Re: Outputting navigation

2007-03-05 Thread Mike H
Actually, after a nice strong cup of coffee, I figured I was doing this completely the wrong way. I added a get_pages method to the category which returns a queryset, then I supply the categories to the template and let the template ask the category for the pages. Mike On 3/5/2007, "M

Re: QueryDict instance is immutable

2007-03-12 Thread Mike Axiak
Hello, That particular QueryDict instance is immutable, so you won't get what you want. Try the following: new_data = request.POST.copy() new_data['author'] = "Username I want" This will create a mutable instance and fill it with the correct data. You can then use new_data in whatever context yo

Schema evolution

2007-03-19 Thread Mike H
Hi all, Does anyone know what the plans for the schema evolution branch are? Can we expect to see its ideas and code in 1.0? I ask as having to write a patch runner to update live schemas is the only part of working with Django that is an annoyance :) Mike

Can I write standalone Python app that uses Django auth, DB and models?

2007-03-22 Thread Mike Stoddart
Hi folks, I was hoping someone could let me know if it's possible for Django models, authentication and database access (among others) can be used by a standalone application (i.e. not a web app)? For example, I have a web app that defines a number of models. People use the web interface but

Re: Another Django CMS customization question

2007-04-04 Thread Mike Axiak
if it's just a CMS you want, why don't you like something already created? Cheers, Mike Axiak On Apr 4, 7:20 pm, "Joshua" <[EMAIL PROTECTED]> wrote: > Hello all, > > I am completely new to the Django project and have some initial > questions that I hope someone

Re: Django app serves PDFs but browser doesn't render them

2007-04-05 Thread Mike Axiak
ugMiddleware is available at http://www.djangosnippets.org/snippets/157/ Hope this helps you, Mike Axiak On Apr 4, 11:41 pm, queezy <[EMAIL PROTECTED]> wrote: > Ah, the light just went on (finally!). I will put the http variable in > where pdfbytes is found. > > Thanks

RowLevelPermissions: show_all_rows = False doesn't seem to work

2007-04-06 Thread Mike Hostetler
search_fields=('organization',) show_all_rows = False grant_change_row_level_perm=True grant_delete_row_level_perm=True class Meta: row_level_permissions=True any ideas what is wrong? -- Mike Hostetler http://mike.hostet

Most efficient way to handle two level deep relationships

2007-04-06 Thread Mike H
els deep like that? Thanks for any pointers you can give! Mike --~--~-~--~~~---~--~~ 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 unsu

Re: Most efficient way to handle two level deep relationships

2007-04-06 Thread Mike H
Hi Ben, Thank you, I had overlooked that! It works exactly as I wanted it to! Mike On 4/6/2007, "Benjamin Slavin" <[EMAIL PROTECTED]> wrote: > >Hi Mike, > >You'll probably want to check-out select_related. [0] > >With that feature, you could use: >po

Dumb URL question

2007-04-14 Thread Mike Hostetler
p/mymodel it has ignored my pattern and went to the default admin change_list view. How do I know this? There is no views.pyc file, and I put in an error in the myapp.views to make sure I knew if I hit it. Anyone please let me know what did wrong . . -- Mike Host

Re: Dumb URL question

2007-04-14 Thread Mike Hostetler
at pattern is probably > checked first. It's never getting to your pattern because it's matching > the admin pattern. > > Todd > > On Sat, 2007-04-14 at 09:34 -0500, Mike Hostetler wrote: > > I've been looking at this for a couple of hours and I have no idea

Dynamic International Fields Available

2007-04-14 Thread Mike Axiak
18ndynamic/. Cheers, Mike Axiak --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [EMAIL PROTECTED] To unsubscribe from this group, send email to [EMAIL

Re: Dumb URL question

2007-04-14 Thread Mike Axiak
Mike, You probably don't have APPEND_SLASH=True in your settings configuration. (Or you don't have commonmiddleware enabled.) This means that the common middleware won't take http://foo/bar and automatically redirect it to http://foo/bar/ to match your regex. Just a thought,

Re: request for generic views functionality...

2007-04-14 Thread Mike Axiak
ntext processor to get the information you need? Note that it may be the case that neither of these appropriately match your problem. In that case, why not write your own 4-line view? You can even use function wrappers (in python > 2.3, decorator syntax) to maintain DRY. Hope this helps. Chee

Django Schema Migration

2007-04-19 Thread Mike H
un 'python migrate.py' - any migrations on any of the installed applications that have not been run would automatically get run and a log kept so that migrations do not run twice. Does this sound useful to anyone who is doing automate

Re: Django Schema Migration

2007-04-20 Thread Mike H
thing released by the end of today, if not, by the end of Monday. Thanks for your comments! Mike On 4/20/2007, "Ned Batchelder" <[EMAIL PROTECTED]> wrote: > >Just one comment on this: At Tabblo, we've found it very useful to have >not only SQL migrations, but Python m

Re: Django Schema Migration

2007-04-20 Thread Mike H
Hi all, Release 0.01 of the migration module can be downloaded from http://www.aswmc.com/dbmigration/ as well as a patch to integrate it into the syncdb command. It seems to be working well for the developers here, so here's hoping it's useful for some other people too :) MikeH --~--~

Re: Django Schema Migration

2007-04-20 Thread Mike H
code I can reuse... and if any of the guys who did work on them feel like submitting a patch, I'd be very happy :) Mike On 4/20/2007, "Oliver Charles" <[EMAIL PROTECTED]> wrote: > >Hey, this is neat! > >It's just a shame that it doesn't use Python mod

Re: Django Schema Migration

2007-04-20 Thread Mike H
the migration code. Mike On 4/20/2007, "Mike H" <[EMAIL PROTECTED]> wrote: > > >Ah, thanks for the heads up! > >Unfortunately, syncdb will install the latest SQL for all installed >applications (as far as I am aware). Is there a way just to install the >schem

Re: Django Schema Migration

2007-04-20 Thread Mike H
ed to run to complete the migration goes here # e.g. from django.contrib.auth.models import User users = User.objects.filter(email_address__endswith='@aol.com') for user in users: # do something to the user here and save Hope that helps. Mike On 4/20/2007, &quo

Re: Django Schema Migration

2007-04-20 Thread Mike H
o a server the migrator can check to see if it has been installed before. If not, it can use django to generate the sql and install it. If it has been installed before it can see what revision was installed previously and run the migrations that are flagged with the intermediate revision numbers...

Re: Django Schema Migration

2007-04-20 Thread Mike H
all your sql through migrations. If you create a migration that sets up your table structure do the tests run ok? Mike On 4/20/2007, "David Marko" <[EMAIL PROTECTED]> wrote: > >Thanks for an advice. I found problem with migrations when running >tests - python manage.py

Re: Django Schema Migration

2007-04-20 Thread Mike H
Hi again, The docs have been updated with the points you raised. Cheers! Mike On 4/20/2007, "Mike H" <[EMAIL PROTECTED]> wrote: > > >Ah, yes, the docs aren't clear on this at the moment, but the automatic >schema creation does not run if you use migrati

Re: Django Schema Migration

2007-04-22 Thread Mike H
h outloud ;) 1) Mike wants to add " favourite_colour" attribute to a Profile object, and Jeremy wants to add "shoe_size". There are two migrations that CAN be applied out of order - they do not depend on each other at all. When Mike updates, he will get the code and migr

Re: Database design question

2007-04-25 Thread Mike Caldwell
I don't think there is a "right(tm)" way, but there are some things to consider. A lot of people would argue that a unique characteristic makes a very good primary key, I think I might be one of them. But, remember that data reflects the real world. In general, a person's name isn't very unique.

Re: Finding out which fields changed

2007-04-26 Thread Mike H
et(pk=self.id) if in_db.width is not self.width (if I've understood pre_save correctly, that is. I override the save method, myself.) Hope that helps, Mike On 4/26/2007, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > >Hello, > >I have a smal

Re: Newforms Captcha 0.1 release

2007-04-26 Thread Mike Axiak
We're working on it: http://code.google.com/soc/django/appinfo.html?csaid=BA8EE19AE8DC2ECA -Mike On Apr 26, 12:19 pm, Henrik Jensen <[EMAIL PROTECTED]> wrote: > Jay Parlar wrote: > > On 4/26/07, Brandon Low <[EMAIL PROTECTED]> wrote: > >> 16 hours ago I post

Example of passing initial value to SelectDateWidget?

2007-04-29 Thread Mike Thompson
Is anyone able to provide an example of passing initial data to the SelectDateWidget in newforms.extras.widgets (or to the DateField that uses that widget)? I've tried many different approaches, but am totally stuck. Thank you! --~--~-~--~~~---~--~~ You received

Re: Example of passing initial value to SelectDateWidget?

2007-04-29 Thread Mike Thompson
s to view django source > code. > > On Apr 29, 8:59 pm, Mike Thompson <[EMAIL PROTECTED]> wrote: > > > Is anyone able to provide an example of passing initial data to the > > SelectDateWidget in newforms.extras.widgets (or to the DateField that > > uses

Re: Example of passing initial value to SelectDateWidget?

2007-04-29 Thread Mike Thompson
Thanks Henrik - I'm actually trying to pass initial data (a default date). Right now, the widget defaults to 'January 1, 2007'... and renders HTML with 'selected' form attributes on that month, day and year. I would like to pass, for example, '2007-04-15', to the render method of the SelectDate

Re: Example of passing initial value to SelectDateWidget?

2007-04-29 Thread Mike Thompson
Thank you Malcolm - and thanks for the suggestions on requesting help. I appreciate it. On Apr 29, 6:45 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Mon, 2007-04-30 at 01:04 +0000, Mike Thompson wrote: > > Thanks Henrik - > > > I'm actually trying to pass

Using Django outside of Django

2007-04-30 Thread Mike H
TECTED]:~/dukebox$ python manage.py shell < streamer.py I'm wondering if there is a less hackish way of interfacing with Django outside of the context of a web request? Cheers, Mike --~--~-~--~~~---~--~~ You received this message because you are subscri

Re: Preselected drop-down menu value with oldforms...

2007-05-02 Thread Mike Axiak
ey are in fact the same object. Instead of errors = new_data = {}, write out: errors = {} new_data = {'drop_selection': 'US'} I hope this helps! Cheers, Mike Axiak On May 2, 9:34 pm, dbee <[EMAIL PROTECTED]> wrote: > Guys, I'm trying to preselect a value for a

Re: QueryDict variables with multiple levels

2007-05-03 Thread Mike Axiak
Actually, doing something similar to this was actually a source of a DoS attack on PHP [1]. It does seem to me one of the features of Django that there is little processing done to the actual request. Cheers, Mike Axiak 1: http://www.php-security.org/MOPB/MOPB-03-2007.html On May 3, 11:58 am

Re: Dictionaries of dictionaries in a template

2007-05-03 Thread Mike Axiak
Hi Will, When you do {{ site }}, it should follow the rules and print str(ts_data[...]), which is probably not what you want. A more pythonic way to do what you want: {% for site in ts_data.items %} Site: {{ site.0 }} Rank: {{ site.1.rank }} ... {% endfor %} Cheers, Mike Axiak On May

Re: Adding fields dinamically to a model

2007-05-03 Thread Mike Axiak
lazy/magical, you can write careful __getattribute__ and __setattribute__ to emulate fields. Cheers, Mike Axiak On May 3, 12:50 pm, Gulopine <[EMAIL PROTECTED]> wrote: > I know of one way of going about this, but it relies on a Django patch > (#4144) that hasn't been int

Re: Is it possible to redirect with POST data?

2007-05-03 Thread Mike Axiak
ponse(data) conn.close() raise Http404 This is a very rough sketch of the shadiness you can do. Cheers, Mike Axiak 1: http://docs.python.org/lib/module-httplib.html On May 3, 4:24 pm, "Bob T." <[EMAIL PROTECTED]> wrote: > Hi All, > > I have a situation where I would

Re: Bug with __str__(self) if we use "return %s %s" ???

2007-05-04 Thread Mike Axiak
Hi, I copied the code exactly as you have it and tested, and -- as I expected -- it worked fine. Are you sure you set the first_name and last_name fields correctly? Perhaps you're looking at the wrong object? Cheers, Michael Axiak On May 4, 7:19 am, Nicolas Steinmetz <[EMAIL PROTECTED]> wrote:

Re: Newforms and foreign keys

2007-05-04 Thread Mike Caldwell
You can pass it in the URL, mywebsite.com/14/add. You can pass it field. Assuming you have another page for selecting bar, you can pre-populate a bar field in the add foo page. That way the user knows what bar he selected earlier. Then it comes back with the form. You can use a select control w

Re: manipulator.do_html2python(new_data) not working?

2007-05-23 Thread Mike Axiak
If you have checkbox fields you also need to run ``prepare``:: ... manipulator.prepare(new_data) manipulator.do_html2python(new_data) ... I hope this helps, -Mike On May 23, 12:11 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Can you post your manipulator

Re: {{ perms }} seems to be empty

2007-05-23 Thread Mike Lake
+ {{ permission }} > > {% endfor %} > > > > {% if perms.lab %} > > yes you have permissions > > {% else %} > > no permissions > > {% endif %} > > > > On output I get: > > > > Permissions: > > + l

Re: Sorting on calculated fields

2007-05-24 Thread Mike Axiak
tzian transform for efficiency, just put it in a list: query_list = [(x.calculated_field, x) for x in queryset] query_list.sort() query_list = [x[1] for x in query_list] All of these solutions, however, do not scale as well as they would if you could express them in SQL. Cheers, Mike

Re: newbie asks how to filter QuerySet of authors using first and last name at the same time

2007-05-24 Thread Mike Axiak
rList]) Authors.objects.filter(Q_user_search) -Mike On May 24, 10:53 pm, jmborr <[EMAIL PROTECTED]> wrote: > Please help the newbie! > I have a list of authors: > authorList=( ('john','doe') , ('jane','smith') ) > If I want to filter a table of authors (

Feisty-updates now contains Python-2.5.1final

2007-05-26 Thread Mike Axiak
there already): deb http://archive.ubuntu.com/ubuntu feisty-updates main restricted Issue the following commands: $ apt-get update $ apt-get install python2.5 Cheers, Mike 1: https://launchpad.net/ubuntu/+source/python2.5/2.5.1-0ubuntu1 --~--~-~--~~~---~--~

Re: Feisty-updates now contains Python-2.5.1final

2007-05-26 Thread Mike Axiak
ay (5/25) Feisty-updates has 2.5.1-final. Anyone running 2.5.1c1 should upgrade to avoid unnecessary bugs when using Django. Cheers, Mike [1]: http://mail.python.org/pipermail/python-dev/2007-April/072573.html [2]: http://code.djangoproject.com/ticket/3765 On May 26, 10:30 pm, Forest Bond &l

Custom validation for models in admin

2007-09-11 Thread Mike H
there yet, and the online documentation points to a .validate() on the model which is marked as experimental. If it's possible, where can I put custom validation like that, that the admin area will pick up on? I'm currently using 0.96 but could easily upgrade to the svn trunk if neede

Re: Custom validation for models in admin

2007-09-11 Thread Mike H
admin area will display as an error and let the user correct the data? Cheers, Mike Collin Grady wrote: > You need to write a validator and use validator_list in the field > attributes to do custom validation in admin. > > http://www.djangoproject.com/documentation/mod

Re: Derived, read-only attributes in the admin

2007-09-16 Thread Mike H
al/ Hope that helps, Mike [EMAIL PROTECTED] wrote: > Hi > > I have a fairly simple use-case which I feel should be achievable, but > which I'm not able to pull off. What I want is the ability to modify > the base query used by the admin to add some derived properties. For > exa

RoR vs Django - mac vs pc parody ad

2007-09-19 Thread Mike B.
RailsEnvy's outrageous parody: http://www.railsenvy.com/2007/9/10/ruby-on-rails-vs-django-commercial-7 Sorry guys, but I couldn't resist... Cheers, Mike Blass --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Goo

trouble getting django to work with fastcgi?

2007-09-27 Thread Mike Atlas
Hello, I am trying to get my django app to work using FastCGI on my host, ASmallOrange. Their guides are out of date for doing this correctly. I have established that fastcgi is working in the general case, as this test.fcgi file works from both the command line, and from the web browser (www.se

Re: trouble getting django to work with fastcgi?

2007-09-27 Thread Mike Atlas
ndex.php/Django#500_errors_and_Incomplete_Header_in_logs On Sep 27, 3:55 pm, Mike Atlas <[EMAIL PROTECTED]> wrote: > Hello, > > I am trying to get my django app to work using FastCGI on my host, > ASmallOrange. Their guides are out of date for doing this correctly. > > I have established that fastcgi is

Re: template problem in windows

2007-10-08 Thread Mike H
'', ) so you need to have TEMPLATE_DIRS = ( 'c:/myproject/template', } Hope that helps, Mike Dushyant Sharma wrote: > i have found this during working with django on windws. > if i create folder like template, backup (start characters t, b etc) >

authentication on generic views

2007-10-25 Thread Mike Maravillo
Hi, I'm using the django.views.generic.list_detail.object_list generic view because of the handy pagination. However, I need to have the user accessing the page to be authenticated first. Is there any other way than doing the check on the template? Thanks very much.

Admin Dies With White Screen

2007-11-10 Thread Mike Cantelon
' TEMPLATE_DIRS = ( # Put strings here, like "/home/html/django_templates" or "C:/ www/django/templates". # Always use forward slashes, even on Windows. # Don't forget to use absolute paths, not relative paths. ) INSTALLED_APPS = ( 'django.contr

Re: Admin Dies With White Screen

2007-11-11 Thread Mike Cantelon
Postscript: I managed to fix this, funnily enough, by upgrading the PHP on the same server to PHP 5. In the process of upgrading, MySQL also got upgraded to 5 and the MySQL-python RPM got upgraded as well. Mike > I'm trying to run the latest Subversion version of Django on Centos &g

Re: Does Hostmonster support Django?

2007-11-11 Thread Mike Cantelon
dedicated server. Mike - http://mikecantelon.com --~--~-~--~~~---~--~~ 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 fr

Simple save() override not working

2007-11-13 Thread Mike Feldmeier
f not self.publish_date and self.state == 2: > self.publish_date = datetime.date.today() > return super(BlogEntry, self).save() > This override works when in the shell, but not through the admin interface. I am just not understanding why it would fail

Re: Simple save() override not working

2007-11-13 Thread Mike Feldmeier
I should clarify: it's not failing, it just doesn't seem to be calling the custom save method... --~--~-~--~~~---~--~~ 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: Preferred Schema Evolution Tool

2007-11-25 Thread Mike H
That one is me. It's intended as a stop-gap until a more pythonic, as you say, evolution tool is officially working. Due to the complexity of automatically generating migrations and the amount of time I have to spend on it, the dbmigration tool will only ever be a way of automatically applyin

Publishing

2007-11-26 Thread Mike Feldmeier
Using: Ubuntu (gutsy) Apache (2.2.4) Python (2.5.1) mod_python (3.3.1) I have a project with two projects underneath "local_apps.general" and "shared.blog". Running the development server, everything runs great. /home/mike/www/www.test.com/ test/ setting

Re: Publishing

2007-11-26 Thread Mike Feldmeier
Thank you for your response, The 'test' is actually just a stand-in name for this posting. Thanks, Mike On Nov 26, 7:10 pm, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > FWIW, you should never call stuff that might be interpreted as a > Python module, 'test&#

Re: Preferred Schema Evolution Tool

2007-11-27 Thread Mike H
SmileyChris wrote: > On Nov 26, 1:03 pm, LorenDavie <[EMAIL PROTECTED]> wrote: > >> Not sure if SmileyChris is this guy, but I've had good success with >> this project: >> >> http://www.aswmc.com/dbmigration/ >> > > As Mike H said, d

Django Theme for Apple Keynote

2006-11-05 Thread Mike Cantelon
For anyone giving presentations about Django who wants their presentation "Django-branded", feel free to use an Apple Keynote template I created for the purpose: http://mikecantelon.com/?q=node/12 Cheers, Mike Cantelon Vancouver Open Business http://v

<    1   2   3   4   5   6   7   8   9   10   >