Re: adding html5 field attributes to a model form

2012-04-09 Thread BlackKnight
Custom widget would be enough in your forms.py from django.forms import Input class EmailInput(Input): input_type = 'email' class AddressForm(ModelForm): contact_email = forms.CharField(widget=EmailInput) On Apr 9, 11:37 pm, Lee Hinde wrote: > Thanks. I'll check

Django admin - How to disable "Delete each record" option for all the models at once

2012-04-09 Thread girish shabadimath
Hi all, Is there a way to remove "Delete each record" option for all the models in admin? We have option to disable delete_selected action using - "admin.site.disable_action('delete_selected')". Looking for same feature to do on each record (other then altering ModelAdmin's has_delete_permission

YAML Fixture is not working. DeserializationError

2012-04-09 Thread abisson
Good afternoon, I am trying to do: python manage.py syncdb and I always get this error: Problem installing fixture '.../translations/fixtures/initial_data.yaml': Traceback (most recent call last): File

Re: Django tutorial

2012-04-09 Thread Ed McLaughlin
_mysql.so is in there. When I try using sqlite I get this: Eds-MacBook-Air:mysite3 edmclaugh76$ python manage.py syncdb Traceback (most recent call last): File "manage.py", line 10, in execute_from_command_line(sys.argv) File "/Library/Python/2.7/site-packages/django/core/management/

Re: adding html5 field attributes to a model form

2012-04-09 Thread Lee Hinde
Thanks. I'll check that out. On Apr 9, 2012, at 7:32 PM, creecode wrote: > Ah I see. I haven't looked deeper in the code I'd guess the type is being > set after you set it deeper in the machinery based on field class? Perhaps a > custom field could accomplish your goal? > > On Monday, April

Re: adding html5 field attributes to a model form

2012-04-09 Thread creecode
Ah I see. I haven't looked deeper in the code I'd guess the type is being set after you set it deeper in the machinery based on field class? Perhaps a custom field could accomplish your goal? On Monday, April 9, 2012 7:17:56 PM UTC-7, Lee Hinde wrote: > > > Thanks for the response, Creecode,

Re: adding html5 field attributes to a model form

2012-04-09 Thread Lee Hinde
On Apr 9, 2012, at 6:53 PM, creecode wrote: > Hello Lee, > > On Monday, April 9, 2012 6:14:08 PM UTC-7, Lee Hinde wrote: > > I'm trying to edit the field type in a form that is using the html5 doctype. > I've tried two ways: > > Neither works. > > Am I looking in the wrong place? > > I

Re: Django tutorial

2012-04-09 Thread Mario Gudelj
Go to /Library/Python/2.7/site-packages/MySQL_python-1.2.3-py2.7-macosx-10.7-intel.egg/ on your Mac and see if _mysql.so is int there. You may need to re-install MySQL_python connector. Maybe this can help

Django tutorial

2012-04-09 Thread Ed McLaughlin
Hello! I am working through the Django tutorial ( https://docs.djangoproject.com/en/1.4/intro/tutorial01/ ) and I have hit a roadblock in the 'database setup' portion of part 1. When I enter the command 'python manage.py syncdb' I get the error below. I believe I properly installed MySQL Community

Re: adding html5 field attributes to a model form

2012-04-09 Thread creecode
Hello Lee, On Monday, April 9, 2012 6:14:08 PM UTC-7, Lee Hinde wrote: I'm trying to edit the field type in a form that is using the html5 > doctype. I've tried two ways: > > Neither works. > > Am I looking in the wrong place? > I use both those techniques and they work great for me. I've

adding html5 field attributes to a model form

2012-04-09 Thread Lee Hinde
I'm trying to edit the field type in a form that is using the html5 doctype. I've tried two ways: class AddressForm(ModelForm): contact_email = forms.TextInput(attrs={'type': 'email'}) and class AddressForm(ModelForm): def __init__(self, *args, **kwargs):

Re: Much the same code, different businesses

2012-04-09 Thread Nick Mellor
Doug, Many thanks for your response. I'm leaning towards your 3rd option, initially using subdomains rather than full domain names for each business. Best wishes, Nick On Mar 27, 10:48 am, Doug Ballance wrote: > There are a few choices that I'm familiar with. > > 1) Create

Re: Advice on installing Django in a fresh OSX Lion machine

2012-04-09 Thread Paulo
So I follow your advice and did sudo easy_install pip and sudo pip install virtualenvwrapper. Then I instaled homebrew and wget as mentioned in the site. And then I hit the wall. When I tried to python setup.py install --prefix=~/.local the return was a error: Before install bootstrap.

Re: Upgrading django on a mac

2012-04-09 Thread Larry Martell
On Mon, Apr 9, 2012 at 4:53 PM, William Deegan wrote: > Larry, > > Why not use virtualenv? Or buildout? I am not familiar with either one of those. I use my mac for development for a specific client. I need my environment to match their's as much as possible. They had been

Re: Upgrading django on a mac

2012-04-09 Thread William Deegan
Larry, Why not use virtualenv? Or buildout? -Bill On Apr 7, 2012, at 3:02 PM, Jonathan Baker wrote: > Ah, good to know. Apologies, but I glanced over your original code to quickly > and thought you renamed the directory. Glad it worked out. > > On Sat, Apr 7, 2012 at 3:54 PM, Larry Martell

Re: Advice on installing Django in a fresh OSX Lion machine

2012-04-09 Thread Paulo
Thanks for the reply. Segunda-feira, 9 de Abril de 2012 16:23:09 UTC+1, shacker escreveu: > > On Monday, April 9, 2012 5:19:28 AM UTC-7, Paulo wrote: >> >> Im new both to Python and Django and I'm afraid of messing thins up >> before I even start. >> Lion ships with Python 2.7.1 but I see that

Re: ModelForm based on User allows any username without checking

2012-04-09 Thread Bastian
Yes that's what I ended up doing but isn't it supposed to be automatic, coming from the restrictions of the model since it's a ModelForm? On Thursday, April 5, 2012 7:51:14 PM UTC+2, Pavan Verma wrote: > > Hi Bastian, > you need to define the restrictions on the username field. It can be >

Re: How to install django-mce?

2012-04-09 Thread Roy Smith
On Sunday, April 8, 2012 4:34:26 PM UTC-4, Roy Smith wrote: > > I'm trying to install django-tinymce 1.5.1b2 into a django-1.3 site. The > installation instructions say: > > "Copy the jscripts/tiny_mce directory from the TinyMCE distribution into > a directory named js in your media root. You

Re: How to install django-mce?

2012-04-09 Thread Roy Smith
> > docs are little out of date but should work. > http://django-tinymce.readthedocs.org/en/latest/installation.html > Thanks for the help. The critical item was, "If you are using django-staticfiles you can skip this step". I added 'tinymce' to INSTALLED_APPS, set TINYMCE_DEFAULT_CONFIG =

Re: Hosting Django website

2012-04-09 Thread megaBos
I recommend using webfaction, they have excellent documentation and are very flexible. http://bit.ly/Hnbm6A -- 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

Re: Question about threading a view[REPOSTED]

2012-04-09 Thread Shawn Milochik
The best solution for this, in my opinion and experience, is to use supervisord. It's easy, requires no root access, and allows you to control all your long-running processes (Django app, celery, Redis, MongoDB, etc.) from one place. -- You received this message because you are subscribed to

Re: UnboundLocalError: local variable 'KeyError' referenced before assignment

2012-04-09 Thread Casey Greene
Great point Karen. It hadn't occurred to me that it could be a later occurrence that could lead to python thinking it was local. Later: except ValueError, KeyError After changing it to: except (ValueError, KeyError) the issue is resolved. Thanks so much! Casey On Mon, Apr 9, 2012 at 11:20 AM,

Re: Advice on installing Django in a fresh OSX Lion machine

2012-04-09 Thread shacker
On Monday, April 9, 2012 5:19:28 AM UTC-7, Paulo wrote: > > Im new both to Python and Django and I'm afraid of messing thins up > before I even start. > Lion ships with Python 2.7.1 but I see that 2.7.2 is available in the > official site. Should I download .dmg file from the site to update to

Re: UnboundLocalError: local variable 'KeyError' referenced before assignment

2012-04-09 Thread Karen Tracey
On Mon, Apr 9, 2012 at 11:09 AM, Casey Greene wrote: > I have this very baffling error that I'm dealing with at the moment. > I'm maintaining someone else's code and I'm getting this error for > some queries with a try, except block in a view.  It seems that the > queries

Re: Question about threading a view[REPOSTED]

2012-04-09 Thread Arruda
Thanks everyone, I'd like to say that I ended up using django-celery + RabbitMQ server. But had some problems trying to make celery run as daemon. After sometime I discovered what need to be done(didn't like the docs in this part... found them misleading), everything is working great. Even made

UnboundLocalError: local variable 'KeyError' referenced before assignment

2012-04-09 Thread Casey Greene
I have this very baffling error that I'm dealing with at the moment. I'm maintaining someone else's code and I'm getting this error for some queries with a try, except block in a view. It seems that the queries that lead to the error are ones where there is, in fact, a KeyError. I've actually

Re: Hosting Django website

2012-04-09 Thread eduardoorige
I using heroku for host my django sites. Good and free. Try it. www.heroku.com Em domingo, 8 de abril de 2012 10h59min51s UTC-3, KasunLak escreveu: > > Hi all, > > I have created a website using django. I want to host it now. Can you > suggest me a best way to host it? I have noticed it is

Re: Hosting Django website

2012-04-09 Thread rockvilla
I myself was finding it hard to find nice and easy hosting service for Django. I use OpenShift Cloud for hosting my Django powered website. Its free to use that service and really very easy. You just have to register yourself there. If you need any further

Web Application Engineer opening - Boston MA or Managua, Nicaragua

2012-04-09 Thread Sanjay Jain
Django developers may be interested in this opening in Boston or Managua. http://www.quoininc.com/quoin/quoin-about/jobs/python-django-rails-engineer-boston.html -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Re: admin page and basic view not showing

2012-04-09 Thread LordMaKo
hey guys, got it working! the problem was the path for my db, i changed it in settings.py and it works now! /home/ubuntu/djangoProj/micopiloto/ so all working now ;) ok here we go! On Apr 9, 11:05 pm, LordMaKo wrote: > hi thanks!, > yes, > I can see the hello world

Re: admin page and basic view not showing

2012-04-09 Thread LordMaKo
hi thanks!, yes, I can see the hello world view now! views.py: from django.http import HttpResponse def view(request): return HttpResponse('Hello Worlsss9d!') but still cant see the admin site page, i have chmod 777 the db and the root folder for the db, and chown root too this

Re: admin page and basic view not showing

2012-04-09 Thread kenneth gonsalves
On Mon, 2012-04-09 at 02:24 -0700, LordMaKo wrote: > so what im i missing?, as stated before i can see the "it worked" > page, but not the admin site or the basic view, have you created admin.py? and registered the models there? -- regards Kenneth Gonsalves -- You received this message

Advice on installing Django in a fresh OSX Lion machine

2012-04-09 Thread Paulo
Im new both to Python and Django and I'm afraid of messing thins up before I even start. Lion ships with Python 2.7.1 but I see that 2.7.2 is available in the official site. Should I download .dmg file from the site to update to version 2.7.2? I found this tutorial [1] and I really like the idea

Re: Hosting Django website

2012-04-09 Thread samuelm...@gmail.com
You can try the hosting Alwaysdata [1], I have several projects with this server and it's great. The characteristics of the hosting you can see on the same page [2]. You have a free web space from 10 MB to start testing Django, but you could have a greater capacity for a low cost. [1]

admin page and basic view not showing

2012-04-09 Thread LordMaKo
hi, I have a django test in an amazon ec2 server, the "it worked!" page shows fine , http://ec2-107-20-20-19.compute-1.amazonaws.com/ but i only get this "it worked page" I have already setted my db, and uncommented the necessary lines in settings to see the admin site [but cannot see it!]

any golfers around?

2012-04-09 Thread kenneth gonsalves
hi, I have developed and for the past 4 years been maintaining a golf scoring and handicapping app - http://bitbucket.org/lawgon/djangogolf , this was developed for my club and is now in use in three clubs. We have conducted over a 100 tournaments with wide variety of formats, including one at

Admin area hyperlinks to sub categories

2012-04-09 Thread Swaroop Shankar V
Hi all, I have 2 models one is Category and another one is Book. Books will be assigned to a category. So on the admin area i want to display a link on the dashboard which will take the user to a page where all the categories will be listed. On clicking on to any of the category user should be

Re: Improving Site Performance

2012-04-09 Thread Swaroop Shankar V
Thanks Phang, I have not yet checked into the query caching in django. Will check and will see if it would improve the performance. Thanks a lot for your reply :) Thanks and Regards, Swaroop Shankar V On Sat, Apr 7, 2012 at 4:04 PM, Phang Mulianto wrote: > Well.. i think