building an application interface

2008-12-30 Thread Michael
? thanks, michael --~--~-~--~~~---~--~~ 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 dj

Deleting a session variable

2009-01-10 Thread Michael
Hello, I'm sure this is a easy question. In one of my views I need to delete the session variable 'request.session['percent']'. However, sometimes 'request.session ['percent']' never gets created. When this is the case I get an error when I do 'del request.session['percent']'. How do I check t

How do I add my template content to my html email?

2009-01-10 Thread Michael
Hello, I able to send an html email using the code below: /// def emaildiscount(request): subject, from_email, to = 'hello', 'u...@domain.com', 'u...@domain.com' text_content = 'This is an important message.' html_content = 'This is an important message.' msg = EmailMultiAlternat

Getting a 'too many values to unpack' error

2009-01-14 Thread Michael
Hello, Here is my code: filter = {} if request.GET.get('color', '').isdigit(): filter['color_cat'] = request.GET['color'] if request.GET.get('origin', '').isdigit(): filter['collection__origin'] = request.GET['origin'] styles = Style.objects.select_related().filter(**filter).disti

Re: Models - getting specific attributes question

2008-10-02 Thread Michael
On Thu, Oct 2, 2008 at 12:02 PM, WillF <[EMAIL PROTECTED]> wrote: > > > Michael, Thanks for the response. > > I understand that part but what if i wanted to make it arbitrary. In the > case of an arbitrary variable called "attribute". Something like > > use

Re: Catching Exceptions thrown in .save() - django 1.0

2008-10-02 Thread Michael
> > > Thank you for your input. > I'd rather use forms and clean_ method, but I need to get > object's pk (it object exists in db), > is there any proper way to get it? > I know I can override form's __init__ and pass the model, but I can't > figure out which method creates the form and if I can pa

Re: Catching Exceptions thrown in .save() - django 1.0

2008-10-02 Thread Michael
On Thu, Oct 2, 2008 at 6:23 PM, bruno desthuilliers < [EMAIL PROTECTED]> wrote: > > On 2 oct, 16:51, Michael Newman <[EMAIL PROTECTED]> wrote: > > Kurczak; > > > > Short of this is, catching specific errors in the save method and > > displaying

Re: Template tag testing

2009-06-23 Thread Michael
On Tue, Jun 23, 2009 at 11:53 AM, brianmac44 wrote: > > I tried to test template tags with doctests and unittests but I'm not > sure what token and/or context to use. What's the best practice for > testing template tags? > I don't know if this is best practice, but here is the way I test my temp

Re: email for user name in Authentication

2009-06-24 Thread Michael
ng the model and overriding the field. Here are a few snippets to help you: http://www.djangosnippets.org/snippets/74/#c195 http://www.djangosnippets.org/snippets/686/ Hope that helps, Michael --~--~-~--~~~---~--~~ You received this message because you are subs

Re: Rendered output from a template tag

2009-06-25 Thread Michael
gs are pretty good examples to look at: http://code.djangoproject.com/browser/django/trunk/django/template/defaulttags.py Hope that helps, Michael --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django use

Re: Rendered output from a template tag

2009-06-26 Thread Michael
On Fri, Jun 26, 2009 at 5:17 AM, Brian May wrote: > > On Thu, Jun 25, 2009 at 02:03:16PM -0400, Michael wrote: > > Inclusion tags might help you out with the template idea, but generally > for > > variables like this I like to put them in context like this: > > > ht

Re: What do you think about here lambda function to configure TEMPLATE_DIRS with relatives values ?

2009-06-30 Thread Michael
t to read, and personally in this situation, I just put: os.path.normpath(os.path.join(os.path.dirname(__file__), 'otherapp', 'templates')) inside of TEMPLATE_DIRS directly. I find that clearer to see what is happening, it is all in one line and still really simple. But what

Re: Using email as username for django auth

2009-07-05 Thread Michael
recommendation is to extend the auth module a touch by adding less than 40 LOC to your code base. You could also rewrite the auth module if you would like. I would not recommend relying on the undocumented behavior. Michael --~--~-~--~~~---~--~~ You received this me

Re: Deletion of individual rows i formset

2009-07-06 Thread Michael
ideas to accomplish the deletion of individual > rows i formset. > > Thanks in advance, > Sonal. > Take a look at the formset documentation: http://docs.djangoproject.com/en/dev/topics/forms/formsets/#can-delete Hope that helps, Michael --~--~-~--~~~-

Re: Error validating the model

2009-07-10 Thread Michael
On Fri, Jul 10, 2009 at 5:54 PM, sjtirtha wrote: > Hi, > > I have a problem calling manage.py syncdb for my models. > Here is my models: > from django.db import models > from django.contrib.auth.models import User > > # Create your models here. > class DocumentType(models.Model): > name

Re: Error validating the model

2009-07-10 Thread Michael
On Fri, Jul 10, 2009 at 6:08 PM, Michael wrote: > On Fri, Jul 10, 2009 at 5:54 PM, sjtirtha wrote: > >> Hi, >> >> I have a problem calling manage.py syncdb for my models. >> Here is my models: >> from django.db import models >> from django.contrib.a

Re: Count from 1 to 50

2009-07-14 Thread Michael
On Tue, Jul 14, 2009 at 10:48 AM, Shawn Milochik wrote: > > > On Jul 14, 2009, at 10:27 AM, The Danny Bos wrote: > > > > > Is there a way to create a simple list using Django to go from 1 to > > 50. > > Eg: > > > > 1, 2, 3, 4, 5 ... 49, 50 > > > > I figured it'd be easy, but I can't get it. > > I

Re: Saving Data To Your DB. Simple?

2009-07-14 Thread Michael
d of thing. To fix this chunk of code, get rid of the try: except statement. There is an error occurring in you code after the try statement, and you have a catch all there, so you are bound not to se it happen. That doesn't really help in debugging, Hope that helps, Michael --~--~-

Re: Image Field Validation

2009-07-14 Thread Michael
one. This is the case for all browsers and all internet forms. The only thing I can offer is to separate your uploading from the rest of the form so you can save the image even if someone types in a wrong phone number. Hope that helps, Michael --~--~-~--~~~---~--~---

Re: Using the @login_required() decorator with #hash url's

2009-07-16 Thread Michael
ion + location.hash // I think that works across all browsers, but I am being lazy and not looking Then when a user submits the post and the browser gets a redirect, the fragment identifier or named anchor stays with the browser. This information isn't transmitted to the

Re: Using the @login_required() decorator with #hash url's

2009-07-16 Thread Michael
On Thu, Jul 16, 2009 at 12:00 PM, Javier Guerra wrote: > > On Thu, Jul 16, 2009 at 3:51 PM, Michael wrote: > > This information isn't transmitted to the server in anyway so short of > what > > you described above, Django can't really solve your issue. > >

Re: never_cache doesn't work for login page

2009-07-17 Thread Michael
there was a recent fix put in for caching of all pages[3], but otherwise, the best I can tell, this is a browser issue, and not something Django can easily fix. 3] http://code.djangoproject.com/ticket/11416 I hope that helps, Michael --~--~-~--~~~---~--~~ You rec

Re: A question about reverse url lookups for admin site in svn version

2009-07-17 Thread Michael
all updated and it still doesn't work, posting your admin site, model admin and where the urlreversing is happening, we can help you. Also, sometimes you can get a more helpful error message from the shell. The reverse() function that you can use is available in d

Re: never_cache doesn't work for login page

2009-07-17 Thread Michael
On Fri, Jul 17, 2009 at 11:19 AM, Ronghui Yu wrote: > > > Michael 写道: > > 2009/7/17 Ronghui Yu > >> Hi, All, >> >> I have a project that have CsrfMiddleware enable, all forms work fine, but >> the login form doesn't, for all browsers(IE,Chrome,Fire

Re: about a web site

2009-07-17 Thread Michael
ite up a detailed proposal of costs. Given that everyone here is volunteer and working on the same thing, I doubt they are going to build a business plan for you. We can help with specifics, but given that Django itself is free (as in beer) costs are up to you. Michael --~--~-~--~~-

Re: A question about reverse url lookups for admin site in svn version

2009-07-17 Thread Michael
s. Pretty exciting, huh? FYI the admin uses 'admin' as the default app instance. I am not sure what this will do if you have two apps that are named the same and try to reverse. It might just be unpredictable as to which URL is going to be returned or might throw an error. I am not sure. Y

Re: never_cache doesn't work for login page

2009-07-20 Thread Michael
On Sun, Jul 19, 2009 at 9:08 AM, Ronghui Yu wrote: > It proves that it is introduced by > django.middleware.http.ConditionalGetMiddleware. > It returns 304 when requesting the same login page, so at last the browser > uses the former one. > It works fine after removing this middleware. > I beli

Re: middleware cache problem

2009-07-21 Thread Michael
r headers<#controlling-cache-using-other-headers> section for more on these decorators. So all you need to do is make the cache on the view different (never_cache decorator might be good here). Read more on that page for the per-view cache. Hope that helps, Michael --~--~-~--~~

Re: Strange things happening with reverse url lookups

2009-07-21 Thread Michael
I use??? What will stick in django > 1.1 final??? Judging by the docs for the admin it should be the second > one, but I'm confused. > The second version JUST was implemented less then a week ago. It will ship in the 1.1 final. Try updating your svn copy on the the laptop, it should

Re: Slugs, why would you ever need to store one in the database?

2009-07-23 Thread Michael
On Thu, Jul 23, 2009 at 10:30 AM, nbv4 wrote: > > I'm looking into adding prettier URLs into my site with the help of > slugs. I've never done something like this before, so I'm doing a lot > of reading and am having trouble "getting" slugs. When creating URLs, > couldn't you just do do something

Re: how to use the url tag with optional arguments?

2009-07-27 Thread Michael
; > > > yes, I suppose so. I am now working around having two patterns - one for > no > > id and the other with id. > > but will work with your suggestion once I get the deadline monkey off my > back > -- > regards > kg > http://lawgon.livejou

Re: standalone script

2009-08-04 Thread Michael
On Tue, Aug 4, 2009 at 10:46 AM, Vitaly wrote: > > Hey there > > For running our test script we are using standalone script. > > Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41) > [GCC 4.3.3] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from django

Re: standalone script

2009-08-04 Thread Michael
t it should give you a better error message). Let me know how it goes, Michael --~--~-~--~~~---~--~~ 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@googlegr

Re: standalone script

2009-08-04 Thread Michael
gt; Why not just: from django.conf import settings from fg import settings as my_settings settings.configure(my_settings) Could make your life easier. Hope that helps, Michael --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Custom manager and delete()

2009-08-07 Thread michael
and use raw SQL? Thanks, Michael. --~--~-~--~~~---~--~~ 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, se

Re: Javascript with built-in templates tags

2009-08-11 Thread Michael
able }}') Now when you view source, that is what Django is sending to your browser and your browser then executes the javascript. I hope that helps, Michael --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups &quo

Re: showing templates error to user

2009-08-14 Thread Michael
t an > "Internal Server Error" > Would form validation work? http://docs.djangoproject.com/en/dev/ref/forms/validation/ You can check the form and then return the form with errors, so everything is validated. Hope that helps, Michael --~--~-~--~~~---~--~--

Re: template syntax

2009-08-18 Thread Michael
The template language is purposefully simple. So try: {{ dict.key }} This will give you the value if the key exists and by default will be blank if it does not. Simple, Hope that helps, Michael --~--~-~--~~~---~--~~ You received this message because you are subscri

Re: template syntax

2009-08-18 Thread Michael
hat is what views are for. This kind of logic should stay out of the templates. Hope that helps, Michael --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send emai

Re: PIL & imagefield validation

2009-08-18 Thread Michael
On Tue, Aug 18, 2009 at 4:37 PM, zayatzz wrote: > > Nobody knows? Any wild guesses? Cause im all out of ideas. > > Alan. > > On Aug 17, 9:24 pm, zayatzz wrote: > > Hello > > > > On sunday i had problems with python when i installed stackless > > python. Now i have compiled and installed : > > se

Re: PIL & imagefield validation

2009-08-18 Thread Michael
o see where that file might be. You'll also want to check anywhere in your sys path. I cannot take responsibility if you break anything though. I am grasping FYI. I really have no idea what is going on, nor have you given too much information. Sorry I can't

Python/Django web programmer needed

2009-08-24 Thread Michael
I own a web based medical recertification company and we are looking for a Python/Django web programmer to do some work for us. The site is written in Python using Django 1.0. We need to switch from using Paypal to Authorize.net and would like to add content to our site. We are based in Greensbo

Re: Python/Django web programmer needed

2009-08-24 Thread Michael
Where are you located? On Aug 24, 12:17 pm, ankit rai wrote: > can do for  u .. > > > > On Mon, Aug 24, 2009 at 11:30 PM, Michael wrote: > > > I own a web based medical recertification company and we are looking > > for a Python/Django web programmer to

Re: Python/Django web programmer needed

2009-08-24 Thread Michael
Thank you for the help. On Aug 24, 12:18 pm, Daniel Roseman wrote: > On Aug 24, 7:00 pm, Michael wrote: > > > I own a web based medical recertification company and we are looking > > for a Python/Django web programmer to do some work for us.  The site > > is written in

Re: Fastest http+sql server combination

2009-08-24 Thread Michael
On Mon, Aug 24, 2009 at 3:57 PM, Léon Dignòn wrote: > > Hello, > > there are plenty of possible combinations out there. The suggested one > is apache and mod_wsgi, but in the docs is also mentioned, that > fastcgi could be faster if configured properly. Unfortunately it's not > mentioned, what pr

Re: How to check which form was submitted?

2009-08-27 Thread Michael
On Thu, Aug 27, 2009 at 7:58 AM, Maksymus007 wrote: > > On Thu, Aug 27, 2009 at 1:41 PM, David Zhou wrote: > > > > On Thu, Aug 27, 2009 at 7:33 AM, Maksymus007 > wrote: > >> > >> On Thu, Aug 27, 2009 at 1:22 PM, David Zhou wrote: > >>> Post the part of your view that handles your forms. > >> > >>

Re: Generating slugs

2009-08-27 Thread Michael
u could make the slug field hidden by adding the attribute in the field. Just add slug into the fields in the model admin and it will work for you, Michael --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Djan

Re: Generating slugs

2009-08-27 Thread Michael
On Thu, Aug 27, 2009 at 11:02 AM, RubenK wrote: > > Thanks for the help! It worked! How would I go about hiding the field? > I think you would have to go all the way and put the form on the model admin, which really isn't difficult. Follow this: http://docs.djangoproject.com/en/dev/ref/contrib/a

Re: urlpatterns helper

2009-04-08 Thread Michael
On Wed, Apr 8, 2009 at 5:16 PM, Rit wrote: > > On Apr 8, 1:41 pm, Michael Newman wrote: > > On Apr 8, 2:31 pm, Rit wrote: > > All you would need then is a method to register views to the durl > > module and then make sure the the views get imported before the > >

Re: Help beginner again: templatetags.

2009-05-01 Thread Michael
load arts_tag %} > The time is {% current_time "%Y-%m-%d %I:%M %p" %}. > {% endblock %} > > And it does not work. > > Alan Hi Alan; Just glancing over this, I am not seeing any issues in this code. Maybe you could paste the actual error that you are getting, it might he

Re: Help beginner again: templatetags.

2009-05-01 Thread Michael
emplate tag the paragraph text would still show up. My bet is that you don't have a Block 'arts' in the "front/index.html." You will need that if you want it to display. See http://docs.djangoproject.com/en/dev/topics/templ

Re: Help beginner again: templatetags.

2009-05-02 Thread Michael
till think that is the problem. If it isn't that, than there is a CSS or some other styling that is hiding your markup. You can look and see if that is case by viewing the page source and seeing if your markup is there. I hope that helps, Michael --~--~-~--~~~---

Re: Loading a filter module for all templates: possible?

2009-05-02 Thread Michael
rs, they allow you to place variables in the context that you might want on every template. Hope that helps, Michael --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Re: Altering database object

2009-05-02 Thread Michael
registry = template.Library() @register.filter def fr_date(value): return DateFr(value) and in your templates you just do a filter call like so: {{ s.moment|fr_date }} Simple and easy. http://docs.djangoproject.com/en/dev/howto/custom-template-tags/ Hope that helps,

Re: models.py general help

2009-05-03 Thread Michael
ation: http://docs.python.org/tutorial/classes.html and the property builtin: http://docs.python.org/library/functions.html#property Other than that, that appears to be the right idea to accomplish what you are looking for. I hope that helps, Michael --~--~-~--~~~---~

Re: TIME_ZONE problem

2009-05-05 Thread Michael
;     SetHandler python-program >>     PythonPath "['/path-to-my-project/'] + sys.path" >>     PythonHandler django.core.handlers.modpython >>     SetEnv DJANGO_SETTINGS_MODULE portal.settings >>     PythonDebug Off >> >> >> Does someone facing th

Re: contrib.comments as admin inline: hide fields?

2009-05-05 Thread Michael
en/dev/ref/contrib/admin/#form And you can change the save method in the form: http://docs.djangoproject.com/en/dev/topics/forms/modelforms/#the-save-methodor you can add an initial value to the field: http://docs.djangoproject.com/en/dev/ref/forms/fields/#initial I hope that helps, Michael --~--~--

Re: Admin page with my own themes/skins

2009-05-07 Thread Michael
I don't really see the point, but I don't know your project either. If you have the time, go for it! If your successful, a write up or blog post about how you did it would be a very interesting read. Good luck and I hope this helps, Michael --~--~-~--~~~--

Re: contrib.comments as admin inline: hide fields?

2009-05-08 Thread Michael
On Wed, May 6, 2009 at 4:16 PM, ringemup wrote: > > Well, this still isn't working. I was able to get rid of the > exception described above by creating a custom form to attach to the > Inline. But now I'm just getting a "Please correct the errors below" > error message whenever I submit the fo

Re: Display an URLField as a Link

2009-05-08 Thread Michael
named url_formatted that will give you the output you desire. I hope that helps, Michael --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-

Re: mymodel.save() does not work django view but works in python shell

2009-05-11 Thread Michael
ls and make sure that the url matches what you are trying to get and then make sure that it passes to testit. Then I would look at your traceback and start figuring out where things are. Basic debugging is finding a solution that works and slowly make it more complicated until you find

Re: images on development server versus production server

2009-05-11 Thread Michael
eb server deal with those files. Read more here: http://docs.djangoproject.com/en/dev/howto/static-files/ Hope that helps, Michael --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To po

Re: Display an URLField as a Link

2009-05-11 Thread Michael
On Mon, May 11, 2009 at 4:29 PM, Tom wrote: > > Thank you Michael, > > Can you explain me the "Clean" way to do that ? > Sure, you create a view (or use a generic view) that calls a template and has one of your models like so: from django.shortcuts import render_to_res

Re: django.contrib.auth tests fail

2009-05-13 Thread Michael
ans on some templates in django.contrib.admin for the tests. This is known, though not ideal. If you added django.contrib.admin to your installed apps, the failures should go away. I hope that helps, Michael --~--~-~--~~~---~--~~ You received this message because you are

Re: need help in query set

2009-05-14 Thread Michael
m. If you want a queryset or multiple items you want to use filter instead of get. Hope that helps, Michael > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post t

Re: how to work with web service in django

2009-05-14 Thread Michael
. You will have a better feel after a few hours of hacking around than sitting here waiting for people to respond. Hope this helps, Michael --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users&qu

Re: Allow only superusers to log into admin

2009-05-14 Thread Michael
and a 'staff' member. You might be better off creating a staff group and putting all the people you are trying to have as staff there and then use the is_staff boolean for whether or not they can log into the admin, as it was supposed to do

Re: Parsing the arguments in HTTP GET

2009-05-16 Thread Michael
at ? > > > > > > thanks > > mohan Those parameters are just parameters in a get request. In your view you can access the dictionary containing all those values from request.GET http://docs.djangoproject.com/en/dev/ref/request-response/#attributes I hope that helps, Michael

Re: displaying image in a template

2009-05-17 Thread Michael
g and if you get a 404, it's not there. If you get an image it is. If you go to: "/static/barcodeimages/image.png" my bet is that the image is there. I hope that helps, Michael --~--~-~--~~~---~--~~ You received this message because you are subscribed

Re: Counting pageviews

2009-05-17 Thread Michael
bases just by its nature. Google Analytics is set up to deal with this with thousands of servers. Google Analytics has an API now that I think could be used to accomplish this same style of thing (not really sure, haven't gotten a chance to mess with it). I hope that helps, Michael --~

Re: check_constraints module error

2009-05-17 Thread Michael
properly installed. Have you installed the check_contraints module? It doesn't come with django itself. If you have installed it, check and see if it is on your python path (from sys import path; print path) I haven't used this module in the past but that look

Re: how to work with web service in django

2009-05-18 Thread Michael
On Mon, May 18, 2009 at 10:55 AM, LiLi wrote: > hey satchmo is really great solution..thank you for that.. but I don't have > to do e-shop.. only page that will list information of some product from > other page.. In fact that is only parsing but I don't know how to do it.. do > you think that I

Re: Expert

2009-05-23 Thread Michael
questions that you might have in the next 3 months. I hope that helps, Michael --~--~-~--~~~---~--~~ 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

Re: please provide a html download of the doc

2009-05-23 Thread Michael
ttitude here, but because it isn't a difficult thing to do. http://media.mnjournal.com/django-docs-1.0-html.tgz I hope this helps, Michael --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: Expert

2009-05-24 Thread Michael
On Sun, May 24, 2009 at 1:17 PM, hankie wrote: > > Michael, > > can you point out some of the 3rd party apps you're referring to? > > Thank you! > No problem. James Bennet's apps are very well written, documented and tested and are a great place to look for best

Re: Problem with performance on a django site

2009-05-28 Thread Michael
you out with objects in memory as well. Caching certain parts of the page might also help you out. You can cache fragments of the template. You could also create globals that will stay in the python process as long as it lives, but that might increase memory usage as well. You can also put a debugg

Re: Prevent ImageField from trying to load the file automatically on model load?

2009-05-28 Thread Michael
On Thu, May 28, 2009 at 8:21 AM, Andrew Ingram wrote: > > Hi all, > > Some of our models make use of ImageFields, but our admin app is > hosted on one server (which the images are also served from) whilst > the main web app is served from another. > > The problem is that when the web app loads a m

add parameter to url

2009-05-28 Thread Michael
Hello, I would like to create a list filter in my site just like the one in the admin app. If I am correct I can do by adding a paramter to my url. In my view I can capture the parameter with request.GET.get ('category', '') and filter my object_list. Everything works just fine but it doesn't fe

Re: add parameter to url

2009-05-29 Thread Michael
> On May 28, 1:04 pm, Michael wrote: > > > If I look to the admin is see that for example spaces are replaced by > > a '+' sign and & is replaced by '%26'. I have just white spaces and > > the & sign in my parameters. To avoid this I have put t

Re: add parameter to url

2009-06-05 Thread Michael
I don't know if it's the right solution but I made a custom filter. import urllib @register.filter def custom_urlencode(url): return urllib.urlencode({'category': url}) Seems to work just fine. Spaces are now replaced by a '+'. On May 29, 10:08 pm, Micha

Re: Bulk get

2009-06-06 Thread Michael
would have to loop through it and create an ordered list based on your arbitrary ordering. Hope that helps, Michael --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To po

Re: Admin Sites on Admin

2009-06-07 Thread Michael
On Sun, Jun 7, 2009 at 11:41 AM, Peter2108 wrote: > > On the Admin top-level page there is an app called 'Sites'. Where do I > find out what this for? > In the documentation: http://docs.djangoproject.com/en/dev/ref/contrib/sites/ --~--~-~--~~~---~--~~ You receiv

Re: Seeing form validation errors

2009-06-07 Thread Michael
.djangoproject.com/en/dev/topics/forms/ . This also has examples in it. if form.is_valid(): # do stuff with a valid form here else: print form.errors # will display the validation errors from the form It looks like your form is valid, it just doesn't have any data because the clean function

Re: Seeing form validation errors

2009-06-07 Thread Michael
> > That would occur if you tried to subscript form.cleaned_data before > having > > testd if form.is_valid(), since cleaned_data doesn't exist until after > the > > form has been validated. > > > You have to return cleaned_data from the clean method (like I said i

Re: Seeing form validation errors

2009-06-08 Thread Michael
ngoproject.com/en/dev/ref/forms/fields/#required Also for the last issue, here are the docs: http://docs.djangoproject.com/en/dev/ref/forms/validation/ Hope that helps, Michael --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: Seeing form validation errors

2009-06-08 Thread Michael
. There will always be pwd in cleaned_data, if it is empty, it will be an empty string. Hope that works for you, Michael --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to t

Re: IFEQUAL takes two arguments error on Django 0.91

2009-06-10 Thread Michael
since Django .91 but if I were to see this error I would think that object.caption|lower|truncatewords:"1"|cut:": ..." is not return anything (is there a object.caption that doesn't have a value?) When you just place {{ object.caption|lower|truncatewords:"1"|cut:&q

Re: Open Sourcing a Website [dangerous?]

2009-06-11 Thread Michael
ng that can help out the community without needing to release the entire codebase, is to write your apps with reuseable code and release several reusable apps. There are lots of examples out there for reusable apps. I hope that helps, Michael --~--~-~--~~~---~--~~ Y

Re: floatformat tag and cmemcache

2009-06-12 Thread Michael
the speed up in queries between the 2 modules is 1.5 on our code base, but it wasn't worth the error logs and my paranoia wondering what the problem has been. Let me know if you get anywhere else with this, Michael --~--~-~--~~~---~--~~ You received this m

Re: can you have a flatpage with url of "/" when Debug=True?

2009-06-13 Thread Michael
l and 404.html templates in your template directory? That is the only thing that I can think that would behave differently here. How is it not working? A little more specifics will help us out greatly, Michael --~--~-~--~~~---~--~~ You received this message becau

Re: can you have a flatpage with url of "/" when Debug=True?

2009-06-14 Thread Michael
On Sun, Jun 14, 2009 at 2:37 AM, Dj Gilcrease wrote: > > On Sat, Jun 13, 2009 at 7:24 PM, Michael wrote: > > On Sat, Jun 13, 2009 at 1:30 PM, josebrwn wrote: > >> > >> If Debug = True, you can have a flatpage with URL = "/" that is &g

Re: can you have a flatpage with url of "/" when Debug=True?

2009-06-15 Thread Michael
round your system, Django has the ability to send e-mails with errors that include the traceback. Here is the documents regarding that: http://docs.djangoproject.com/en/dev/howto/error-reporting/#howto-error-reporting Hope that helps, Michael --~--~-~--~~~---~--~~ Yo

Re: Does Django have to run with Python-2.5 ?

2009-06-17 Thread Michael
execute_manager > ImportError: No module named django.core.management > l...@lab ~/online $ > Nope. It can run on 2.6, however your python 2.6 is going to have a different python path than your python 2.5 and you will need to put Django on that path or reinstall D

Re: IGNORABLE_404 woes

2009-09-26 Thread Michael
robots.txt is redirected to robots.txt/. You'll have to add that url to the Ingorable_404 something. I have been debating about filing this into trac as a bug. If you decide to, please include the ticket number here. Thanks, Michael --~--~-~--~~~---~--~~ You re

Re: QuerySet hang

2009-09-28 Thread Michael
is working on something. I would like to figure out what that something is. Before digging into Django's source code, can we get this down to a simplest case. Can you create a fixture of the database? Can you create the lines that hang? I would like

Re: QuerySet hang

2009-09-30 Thread Michael
What kind of field is timestamp? Is it a datetimefield or textfield? I would love to reproduce this, but need as much info as you can give me. Thanks, Michael --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Djang

Re: Is django comment's honeypot really useful?

2009-10-08 Thread Michael
any form that you think might get spammed. It helps out, and it doesn't harm anything. I would still use another service for spam as well, but this is the most base check I can think of. Hppe that helps, Michael --~--~-~--~~~---~--~~ You received this message

Re: Problem - sometimes I get blank pages

2009-10-11 Thread Michael
of connections to the server just bounce empty 500 responses back. These won't show up in logs and are a pain to diagnose. Just up the number of connections for that virtualhost and that should fis your problem (at the expense of CPU cycles). I hope that fixes it for you. Michael --~--~

Re: Errors with forms submitted with whitespace

2009-10-13 Thread Michael
On Tue, Oct 13, 2009 at 8:03 PM, coolis_willis wrote: > > Has anyone run into this a problem with forms throwing 500 errors > when forms are submitted with just whitespace for a text field? > > Django 1.1 > Not here. What is the error? It would help to figure out a d

Re: Forms ForeignKeyField does not populate with initial value

2009-12-08 Thread Michael
^ Thanks for that. Have been scratching my head for a while as .id is not a field/property for model.user, according to the doco I am reading anyway (http://docs.djangoproject.com/en/dev/topics/auth/ #topics-auth). I should have just tried .id in the first place : \ ... actually you'd think chil

  1   2   3   4   5   6   7   8   9   10   >