Re: Why does django use mysqldb over mysql-connector?

2014-11-04 Thread Larry Martell
What about mysqlclient? The django site says that is "the recommended choice for using MySQL with Django" but I can't seem to find that package. Does anyone have a link for that? On Mon, Nov 3, 2014 at 8:57 PM, wrote: > > Hi all, > > I notice that python-mysql-connector(1) is almost 30% slow tha

Re: Why does django use mysqldb over mysql-connector?

2014-11-04 Thread lzanuz
Are you talking about this? https://github.com/PyMySQL/mysqlclient-python I didn't tried that. Someone use it? Em terça-feira, 4 de novembro de 2014 09h08min38s UTC-2, larry@gmail.com escreveu: > > What about mysqlclient? The django site says that is "the recommended > choice for using M

Re: Why does django use mysqldb over mysql-connector?

2014-11-04 Thread Larry Martell
Yes, thanks for the link. For some reason google wasn't finding that for me. On Tue, Nov 4, 2014 at 6:59 AM, wrote: > > Are you talking about this? > > https://github.com/PyMySQL/mysqlclient-python > > I didn't tried that. Someone use it? > > > Em terça-feira, 4 de novembro de 2014 09h08min38s U

Re: Get form from modelformset by the model associated in template

2014-11-04 Thread Luigi Cirillo
Yes, thank you Collin On Monday, November 3, 2014 2:14:53 AM UTC+1, Collin Anderson wrote: > > Hi Luigi, > > Do you want something like this? > > {% for form in modelformset %} > The object: {{ form.instance }} > The form: {{ form }} > {% endform %}} > > Collin > > -- You received this m

Beginner: ManyToManyFields error creating the model / adding values by the Admin Module or the Shell

2014-11-04 Thread lnzy35en
Hi, Unfortunately I have not found any Intel at the django documentation, in the Getting Started With Django book or the Two Scoops of Django book.  So I hope someone in the community will sacrifice his nerves and time, and gives me a hint / explanation of my misunderstanding.   I have the follo

Can Django be used to create a survey website?

2014-11-04 Thread Tobias Dacoir
I need to create a survey like website. Users should be able to register and then are presented with different images which they are asked questions about. So essentially I have multiple Sets of Images, a set of questions (not all questions are valid for all sets of images) and a set of answer

Re: Can Django be used to create a survey website?

2014-11-04 Thread Andreas Kuhne
2014-11-04 11:23 GMT+01:00 Tobias Dacoir : > I need to create a survey like website. Users should be able to register > and then are presented with different images which they are asked questions > about. > > So essentially I have multiple Sets of Images, a set of questions (not all > questions ar

Re: Multiple site package directories for Python and question about apache configuration

2014-11-04 Thread robert brook
I see that there are 2 paths in my application for site packages. How do I configure Apache to use the 2 packages. A typical entry in Apache is WSGIPythonPath /path/to/mysite.com:/path/to/your/venv/lib/python3.X/site-packages Can I specify 2 paths to represent the 2 locations of site packages.

Re: django1.7, python3.4 and MySQL

2014-11-04 Thread Tim Graham
mysqlclient is available here: https://pypi.python.org/pypi/mysqlclient I just fixed the missing links in Django's database documentation -- sorry for the confusion. On Monday, November 3, 2014 12:56:27 PM UTC-5, larry@gmail.com wrote: > > On Mon, Nov 3, 2014 at 12:42 PM, Leandro Zanuz > wr

Re: django1.7, python3.4 and MySQL

2014-11-04 Thread Larry Martell
Thanks. On Tue, Nov 4, 2014 at 7:37 AM, Tim Graham wrote: > mysqlclient is available here: https://pypi.python.org/pypi/mysqlclient > > I just fixed the missing links in Django's database documentation -- sorry > for the confusion. > > On Monday, November 3, 2014 12:56:27 PM UTC-5, larry@gmai

Re: Multiple site package directories for Python and question about apache configuration

2014-11-04 Thread Aliane Abdelouahab
i dont know how to do that, but the easied way is to just copy the whole packages and paste them in only one directory, since python packages are just folders/eggs Le mardi 4 novembre 2014 13:26:12 UTC+1, robert brook a écrit : > > I see that there are 2 paths in my application for site packages

Fwd: Global Variable

2014-11-04 Thread Sudipta Sen
-- Forwarded message - From: Sudipta Sen Date: Tue Nov 04 2014 at 6:46:17 PM Subject: Global Variable To: Hi folks, I am very new to django and facing some problems. 1. I need a global variable, which I can use throughout the application. Like let's say base_url. - I tried

Re: Global Variable

2014-11-04 Thread Andreas Kuhne
2014-11-04 14:18 GMT+01:00 Sudipta Sen : > > > -- Forwarded message - > From: Sudipta Sen > Date: Tue Nov 04 2014 at 6:46:17 PM > Subject: Global Variable > To: > > > Hi folks, > > I am very new to django and facing some problems. > > 1. I need a global variable, which I can use

Re: Global Variable

2014-11-04 Thread Sudipta Sen
By the way I am using virtual environment and my django version is *1.7.1* -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.

Re: Beginner: ManyToManyFields error creating the model / adding values by the Admin Module or the Shell

2014-11-04 Thread Erik Cederstrand
> Den 04/11/2014 kl. 10.57 skrev lnzy3...@gmx.de: > [...] > Now I try to add some User with an Interest using the Admin module or the > Shell to find out how to do that (real syntax and model) by the “site”. But > unfortunately both the shell and furthermore the graphical admin module give > me

running unit tests with legacy database: Error 1050, Table already exists

2014-11-04 Thread dpalao . python
Hello, I'm relatively new to Django, so it might well be a silly question... I'm using Django-1.7 with Python-3.3. I'm working with a legacy MySQL database. I tried both pymysql and mysql-connector-python, the errors are similar. When I run the unit tests, for instance, with mysql-connector-pytho

Development using django: wireframes enough to begin?

2014-11-04 Thread Dave
I'm trying to understand how using django for development works. Can a backend developer begin with just a wireframe? Isn't it possible to develop scripts while someone else is writing the html/css code? (like working on the front end and back end at the same time) For example: Creating a for

urlize filter does not handle trailing 'dot-dot-dot' correctly

2014-11-04 Thread will
Hi, new guy around here. I am an engineer for a startup (www.agolo.com, check us out :P). We work heavily with twitter content, and i've discovered that the urlize template tag/filter does not handle trailing 'dot-dot-dot' (which is common in tweet content due to all the truncation and whatnot)

Beginner: ManyToManyFields error creating the model / adding values by the Admin Module or the Shell

2014-11-04 Thread lnzy35en
Hi, Sorry, via the admin interface (Web-GUI) I have inserted the following values: My Actions en Language mike.test // t...@test.de User   Dan Brown Author   If I now try to add an Interest (“Dan Brown” and “en”) via the GUI selection I get: TypeError at /admin/BookReminder/interest/add/

Re: Development using django: wireframes enough to begin?

2014-11-04 Thread Mike Dewhirst
On 5/11/2014 3:04 AM, Dave wrote: I'm trying to understand how using django for development works. Can a backend developer begin with just a wireframe? Yes. Start with your models and give them methods and fields you know will be needed. Importantly you should write unit tests to prove your m

Re: Beginner: ManyToManyFields error creating the model / adding values by the Admin Module or the Shell

2014-11-04 Thread Erik Cederstrand
> Den 04/11/2014 kl. 19.16 skrev lnzy3...@gmx.de: > > Hi, > Sorry, via the admin interface (Web-GUI) I have inserted the following values: > My Actions > en > Language > > mike.test // t...@test.de > User > > Dan Brown > Author > > If I now try to add an Interest (“Dan Brown” and “en”) via the

Aw: Re: Beginner: ManyToManyFields error creating the model / adding values by the Admin Module or the Shell

2014-11-04 Thread lnzy35en
  Hi Erik,   the idea was, that one Author can write in more than one language (eg. en and de), or no one at all. This was the background to use the ManyToManyField.  But the "error" Message must have an other reason?   Best Regards, Mike Gesendet: Dienstag, 04. November 2014 um 22:42 Uhr

Re: urlize filter does not handle trailing 'dot-dot-dot' correctly

2014-11-04 Thread Aliane Abdelouahab
you can base64 encode it, and decode it after (as a temporary solution) Le mardi 4 novembre 2014 17:13:33 UTC+1, wi...@agolo.com a écrit : > > Hi, new guy around here. > > I am an engineer for a startup (www.agolo.com, check us out :P). We work > heavily with twitter content, and i've discovered

Re: urlize filter does not handle trailing 'dot-dot-dot' correctly

2014-11-04 Thread Russell Keith-Magee
Hi Will, If you want to know if a problem has been reported before, the place to start is the ticket tracker: here's a search of all tickets that mention urlize: https://code.djangoproject.com/search?q=urlize&noquickjump=1&ticket=on >From a quick scan, I can't spot anything related to ellipses;

Re: A migration in one app that adds a field to another

2014-11-04 Thread Justin Myles Holmes
Hey Carl. Missed you so very much at DjangoCon. :-) > I'm not sure why the mezzanine docs don't mention using the SOUTH_MIGRATION_MODULES setting (or Django 1.7 equivalent MIGRATION_MODULES) to override the location of the mezzanine app's migrations to a package in your project, where you can fr

Re: A migration in one app that adds a field to another

2014-11-04 Thread Carl Meyer
Hi Justin, On 11/04/2014 04:17 PM, Justin Myles Holmes wrote: > Hey Carl. Missed you so very much at DjangoCon. :-) Thanks :-) >> I'm not sure why the mezzanine docs don't mention using the > SOUTH_MIGRATION_MODULES setting (or Django 1.7 equivalent > MIGRATION_MODULES) to override the locatio

Re: A migration in one app that adds a field to another

2014-11-04 Thread Justin Myles Holmes
> I don't understand this use case. A ForeignKey impacts only one database table's schema; the table for the model on which the ForeignKey field is located. The schema of the model the ForeignKey points to doesn't need to change at all based on the presence or absence of some other ForeignKey point

Re: A migration in one app that adds a field to another

2014-11-04 Thread Justin Myles Holmes
> I don't understand this use case. A ForeignKey impacts only one database table's schema; the table for the model on which the ForeignKey field is located. The schema of the model the ForeignKey points to doesn't need to change at all based on the presence or absence of some other ForeignKey point

Re: A migration in one app that adds a field to another

2014-11-04 Thread Carl Meyer
Hi Justin, On 11/04/2014 04:42 PM, Justin Myles Holmes wrote: >> I don't understand this use case. A ForeignKey impacts only one database > table's schema; the table for the model on which the ForeignKey field is > located. The schema of the model the ForeignKey points to doesn't need > to change

Re: A migration in one app that adds a field to another

2014-11-04 Thread Andrew Godwin
Carl is right that this isn't a supported thing; Django models are designed to be static, and not mutate based on settings. Migrations are designed to only support one linear change history of models; swappable models are just about supported but not perfect and leads to issues. Adding in the a

How do I migrate models from one app to another with django 1.7 migrations?

2014-11-04 Thread Andy Kish
Hi gang, I'm trying to refactor the apps in my project, and I can't figure out any clean way to migrate models with their data from one app to another. I'm really looking for answers to two questions: 1. Is there any canonical way to do this? 2. I've moved my models to the new app but I have t

Re: A migration in one app that adds a field to another

2014-11-04 Thread Justin Myles Holmes
Well, as I say, I don't particularly like this field injection notion, and I'm happy to individually subclass where needed in my own projects. I'm less surefooted about issuing a pull request to mezzanine to alter their docs to suggest doing this, although the doc is currently ambiguous enough to

Re: A migration in one app that adds a field to another

2014-11-04 Thread Justin Myles Holmes
Carl: Actually, the "subclass the operation" method fails for obvious reasons here: https://github.com/django/django/blob/df0523debcc2d0984f1bc11d323f04227d4b388b/django/apps/registry.py#L202 I'm increasingly thinking that using MIGRATION_MODULES and just maintaining a local copy of Mezzanine's

AttributeError | 'Template' object has no attribute 'render'

2014-11-04 Thread Nakaya Mitsuo
I got AttributeError. Exception Value: 'Template' object has no attribute 'render' How can I fix it? Please help me. --- CODE -- from django.shortcuts import render from django.template import Context, Template class US_AccountManager(models.Manager): def update_account(self, auth_us

geodjango application in rhel 6

2014-11-04 Thread Anju SB
Friends, I have developed a geodjango application using python 2.7, django 1.4, mapnik, tilecache and postgis enabled postgresql in ubuntu 12.04. After completing the development I installed the same application in RHEL 6, but postgis query using geodjango API is not working. The query i