Re: Easiest way to access MySQL from Django on Mac OS X?...

2012-09-23 Thread Fred Stluka
Chris, Good info. Thanks! I'm hearing lots of good things about Homebrew. If I go to a package manager, I may try it instead of MacPorts. For now, I've succeeded with just installing setuptools and MySQLdb, as described below, and not re-installing MySQL or Python. I installed MacPorts, but

Re: Easiest way to access MySQL from Django on Mac OS X?...

2012-09-23 Thread Fred Stluka
Andrew, Good info. Thanks! I'm hearing lots of good things about Homebrew. If I go to a package manager, I may try it instead of MacPorts. For now, I've succeeded with just installing setuptools and MySQLdb, as described below, and not re-installing MySQL or Python. I installed MacPorts, but

mysql varchar datatype limit?

2012-09-23 Thread Navnath Gadakh
name = models.CharField(max_length=100) and if if give actual name of only 50 characters ,then it will occupy all 100 chars of only 50? -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit

Re: Easiest way to access MySQL from Django on Mac OS X?...

2012-09-23 Thread Chris Streeter
When I'm setting up a new Mac OS system, the process I go through to install Python and MySQL. First, I install Python using this guide: http://docs.python-guide.org/en/latest/starting/install/osx/ The guide also installs Homebrew, which works great for me so far and is easily removable. After

Re: Does django's built-in comments component support pagination?

2012-09-23 Thread Scarl
Thanks for the answer! I have found something on django's official website. https://code.djangoproject.com/ticket/18143 It seems that the comments component are not paginateable with django's own paginator... 在 2012年9月24日星期一UTC+8上午1时28分45秒,Pablo Sanfilippo写道: > > Sorry, i thought that views

Re: Easiest way to access MySQL from Django on Mac OS X?...

2012-09-23 Thread Andrew Macgregor
Hi Fred, I've also found HomeBrew to be useful. Here's a good setup guide: http://www.thisisthegreenroom.com/2011/installing-python-numpy-scipy-matplotlib-and-ipython-on-lion/ Cheers, Andrew. On Monday, September 24, 2012 2:02:37 AM UTC+8, Fred Stluka wrote: > > Resolved this on my own.

Re: How to separate data having the same model but belonging to different users?

2012-09-23 Thread Rohit Banga
How about maintaining one database per department and then using "using" parameter to select the appropriate database? There are not too many departments. I know it may not scale or seem elegant but keeping data in separate tables or databases is a requirement. Using the following command I feel I

Re: Beginner problem linking pages from homepage?

2012-09-23 Thread Vincent Fulco
Thanks all. Just getting up to speed on regex, need to re-read some chapters. Changing these to the suggested above, fixing the mismatched from "mysite.views import hello" by importing * in the urls.py and removing the quotes around the func got me to my targeted basic site. Best, V. On

BDD 4 Django

2012-09-23 Thread Daniel França
Hi guys, I just created a package for a better integration between Morelia(BDD)/Splinter(Browser Test) and Django. So you can create the features for BDD tests just thinking about the browser interaction. You just need to create a class based in BDDTestcCase. The BDDTestCase already comes with

Re: Beginner problem linking pages from homepage?

2012-09-23 Thread jirka . vejrazka
Hi Vincent, Django is telling you what the problem is - none of strings in urls.py matches the requested URL. All lines in your file say that the regular expression fas nothing before the "foo" (the "^" character says that). However the URL you are trying has "homepage/" before "foo". Hence

Re: Incorrect string value when running GeoDjango tutorial

2012-09-23 Thread Ron Broberg
I solved this by changing the encoding in the line in the tutorial for world/load.py from this ... #lm = LayerMapping(WorldBorder, world_shp, world_mapping, # transform=False, encoding='iso-8859-1') To the following ... lm = LayerMapping(WorldBorder, world_shp,

Re: Beginner problem linking pages from homepage?

2012-09-23 Thread Vincent Fulco
Addendum: the views.py also has the required 'from django.foo import" lines naturally. On Sunday, September 23, 2012 2:47:39 PM UTC-5, Vincent Fulco wrote: > > Thank you for the timely advice. Before I move my "base/homepage" site to > its own app dir, thought I would give it another pass

Re: Beginner problem linking pages from homepage?

2012-09-23 Thread Vincent Fulco
Thank you for the timely advice. Before I move my "base/homepage" site to its own app dir, thought I would give it another pass using your changes. Verified 'mysite.urls' in settings.py, added 'mysite' to the urlpatterns arg and put quotes around the hello func. I have had debugging from the

Re: Can I simply disable the CSRF? crazy

2012-09-23 Thread puneet loya
Hi I was trying to disable csrf . I am calling post using ajax. I have used the csrf token placed it below the form. In my views file i m using the csrf exempt. I am still getting the network forbidden error. :( If you require more information i will share it :) On Thursday, 19 August

Re: Easiest way to access MySQL from Django on Mac OS X?...

2012-09-23 Thread Fred Stluka
Resolved this on my own. Here's what I did: - Downloaded and installed MacPorts, but decided not to use it because I have too much software already installed that MacPorts doesn't know about and wants to reinstall (MySQL, Python, OpenSSL, etc.) - Downloaded and installed Python

Re: Does django's built-in comments component support pagination?

2012-09-23 Thread Pablo Sanfilippo
Sorry, i thought that views handle comments. I see now that comments are handled by the framework itself. El domingo, 23 de septiembre de 2012 11:12:10 UTC-3, Scarl escribió: > > I wonder is it possible to display 10 comments on one page? If it can, how > to do it? Using the

Setting up Django 1.4 for a production environment

2012-09-23 Thread Zach
I am new to django and I am having trouble following the instructions on setting up django with apache and mod_wsgi. Apache 2.2.22, Python 2.7.2 and mod_wsgi are all install on my machine running Mac os X 10.8.2 (mountain lion). I have imported a conf file to my httpd file with the following

Re: Setting an unusable password on an existing user

2012-09-23 Thread Nandakumar Chandrasekhar
Thanks Russ for your explanation. You are right I did not understand Andrew correctly. Forgive me for my ignorance. :-) I did not know there were so many ways to do the same thing. Thank you very much for the example. nav On Sunday 23 September 2012 05:16 AM, Russell Keith-Magee wrote:

Re: Does django's built-in comments component support pagination?

2012-09-23 Thread Scarl
Should I rewrite django.contrib.comments.models? Or I just need to rewrite my_django_project.myapp.models? 在 2012年9月23日星期日UTC+8下午10时38分41秒,Pablo Sanfilippo写道: > > > https://docs.djangoproject.com/en/dev/topics/pagination/?from=olddocs#using-paginator-in-a-view > This > is a perfect example.

Re: Using a drop down list as widget for filter in admin

2012-09-23 Thread Ibrahim Lawal
Here's how I achieved it. {% load i18n %} {% if choices|length > 9 %} {% blocktrans with title|escape as filter_title %} By {{ filter_title }} {% endblocktrans %} {% for choice in choices %} Re: Does django's built-in comments component support pagination?
https://docs.djangoproject.com/en/dev/topics/pagination/?from=olddocs#using-paginator-in-a-view This is a perfect example. You have to replace de model by the model of your comments. On Sunday, September 23, 2012 11:12:10 AM UTC-3, Scarl wrote: > > I wonder is it possible to display 10

Re: custom upload handlers

Have you read the entire Note under https://docs.djangoproject.com/en/1.4/topics/http/file-uploads/#modifying-upload-handlers-on-the-flywhich discusses how the CSRF protection accesses request.POST and therefore prevents changing upload handlers in a view which is CSRF protected? It includes an

Does django's built-in comments component support pagination?

I wonder is it possible to display 10 comments on one page? If it can, how to do it? Using the django.core.paginator? please help! thx! -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit

ForeignKey save method admin panel

Hi! One question about the topic above. I'm just wandering what's going on in the admin panel when creating an instance of a ForeignKey in a special case. I've got two models. One regular one with the regular fields (like name, date etc.) an one who holds the ForeignKey to that class. the

Re: Installing a django project, database issue ?

Hi, Are you sure brisket was installed properly? Try importing it from your python console. Also, can you show your settings.py INSTALLED_APPS setting? On 9/22/12, new_user wrote: > I am installing the sunlight fondation's brisket and I am really new to > python, and

Re: Django: language in field description in forms won't change

Tomas, you are right. This fixed the problem for me. Thanks so much! Op zondag 23 september 2012 03:18:53 UTC+2 schreef Tomas Neme het volgende: > > you probably are using ugettext and should be using ugettext_lazy > > On Sat, Sep 22, 2012 at 8:44 PM, Patrick > wrote: >