Re: Newbie: ImportError during syncdb

2014-03-05 Thread Robin Lery
What the name of the app folder? I think its just django_bookmarks. On Thu, Mar 6, 2014 at 6:43 AM, David wrote: > Dear django users, > > I am new to django and have an ImportError: No module named bookmarks > problem. > > It seems that as I tried to syncdb django does not

Re: Improving django test startup performance.

2014-03-05 Thread Andrew Farrell
Hmm. That is a good point. If there is little difference, then I suppose I'll blame buildout. $ bin/django print_time 2014-03-05T22:07:33.051634 before test 2014-03-05T22:07:40.202247 command has been run That is A difference of 7 seconds, significantly better. $ strace bin/django print_time 2>

Newbie: ImportError during syncdb

2014-03-05 Thread David
Dear django users, I am new to django and have an ImportError: No module named bookmarks problem. It seems that as I tried to syncdb django does not recognize the bookmarks module I have created before. In the past I was able to syncdb, hence my confusion. I am trying to teach myself by

Re: Improving django test startup performance.

2014-03-05 Thread Russell Keith-Magee
On Thu, Mar 6, 2014 at 4:52 AM, Andrew Farrell wrote: > Привет Djanonaughts! > > tl;dr: django with buildout spends a lot of time looking for files that > aren't there when trying to do imports. How can I reduce this? > > > > I've long been frustrated with the time it

Re: Terrible performance when dropping into raw SQL Oracle

2014-03-05 Thread junctionapps
You understood it exactly. I've been cleaning up some old SQL statements (outside of use in Django) and have seen some real benefits of restructuring to reduce execution times. Unnecessary overuse of 'distinct' was a favourite of someone in my organization a few years back. Good luck! On

Re: Terrible performance when dropping into raw SQL Oracle

2014-03-05 Thread Kurtis Mullins
Sort of off-topic as I don't have anything constructive to add to help fix your problem but I recommend not running complex (long-running) queries directly in Django views. Perhaps use Celery. I know this doesn't solve your problem (although it might help a bit if Django's environment is causing

Improving django test startup performance.

2014-03-05 Thread Andrew Farrell
Привет Djanonaughts! tl;dr: django with buildout spends a lot of time looking for files that aren't there when trying to do imports. How can I reduce this? I've long been frustrated with the time it takes my django installation to run tests. Now, I'm aware that some ways to think about to how

Re: Terrible performance when dropping into raw SQL Oracle

2014-03-05 Thread Shawn H
I can't do that, as your assumption is incorrect. I don't have a table that holds recordnumb as a unique value. Each recordnumb occurs many times, and occurs many times per case number, by design. The number is used to identify unique ownership among many properties for a particular case -

Re: django 1.6.1 raw_id_fields open a 'change' popup instead of 'select' popup

2014-03-05 Thread Vittorio
Il giorno 05/mar/2014, alle ore 03:54, Camilo Torres ha scritto: > On Tuesday, March 4, 2014 4:47:58 AM UTC-4:30, Vittorio wrote: > In an admin form I input all data for a specific invoice (client, date of > issue, number of invoice) and, by means of inlines, the ordered items. In > these

Re: Class that extends a model that is not a model

2014-03-05 Thread Javier Guerra Giraldez
On Wed, Mar 5, 2014 at 10:52 AM, Tom Evans wrote: > Your derived classes are models, and they should be models. What they > shouldn't be is have different tables for each model type, there > should be one table that all instances are stored in to, as the data > for each

Re: Class that extends a model that is not a model

2014-03-05 Thread Domagoj Kovač
Thanks Tom, this looks like something that can help me. Thanks! -- 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.com. To

Re: Class that extends a model that is not a model

2014-03-05 Thread Tom Evans
On Wed, Mar 5, 2014 at 1:03 PM, Domagoj Kovač wrote: > Hi Guys, > > I have a model called Calculation, this model has fields that are calculated > and saved to the database, this model also hold some common calculation > functions. > > I also have two other classes

Re: URL Namespaces

2014-03-05 Thread Jonathan Baker
Much like module namespacing, they allow you to group subitems in more logical and descriptive ways while preventing naming collisions. So, if a Django project has a blog, with a list of Posts at /blog/posts/, a sensible url name for that pattern might be "post_list" (and using url names in your

Re: Class that extends a model that is not a model

2014-03-05 Thread Domagoj Kovač
I did not try that, and i don't think this would help. Separation to more files doesn't have anything to do with the way works, theoretically your whole code can be just one file. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe

Class that extends a model that is not a model

2014-03-05 Thread Kelly Nicholes
Just a guess, but have you tried putting it in a file not called models.py? -- 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

Class that extends a model that is not a model

2014-03-05 Thread Domagoj Kovač
Hi Guys, I have a model called Calculation, this model has fields that are calculated and saved to the database, this model also hold some common calculation functions. I also have two other classes TrailerCalculation and TruckCalculation they both calculate values of the fields that will be

Re: Intermittent mysql connection errors

2014-03-05 Thread Nazeem S
Hi, Could you please share what was the solution, I'm experiencing the same. On Saturday, October 27, 2012 2:49:50 AM UTC+5:30, Guy wrote: > After more testing it appears that this is an O/S layer issue and not > specifically a django issue. > > On Thursday, October 25, 2012 3:07:16 PM UTC-7,

URL Namespaces

2014-03-05 Thread anubhav joshi
Can anyone explain how URL Namespaces work in django. Some examples would be great. (Apart from those in the docs.) Regards, Anubhav Joshi -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails

Django 1.7 dev: migration fails when adding a m2m (Related model cannot be resolved)

2014-03-05 Thread baptiste . goupil
Hello, I'm struggling with migrations when trying to add a m2m between two apps in Django dev. I don't know if this is a bug or if I'm doing it wrong but basically, if main.models is: from django.conf import settings > from django.db import models > > class Restaurant(models.Model): > name

Ajax Request on Admin Edit Form

2014-03-05 Thread Jonathan Querubina
Hi guys. How can i edit the Admin Default Edit Form on django to insert my custom JS on the page? I mean, when i am editing a model, i need to insert some JS code on it Is this possible? Thanks -- You received this message because you are subscribed to the Google Groups "Django users"

Re: Showing which users are viewing a given page

2014-03-05 Thread Some Developer
On 04/03/2014 13:06, Paul J Stevens wrote: On 04-03-14 13:28, Some Developer wrote: Hopefully someone here will be able to point me in the right direction. Basically I want to be able to view which users are viewing a page at any given time and I want to be able to update it in real time

Confused about ContentType

2014-03-05 Thread Robin Lery
Hello, Suppose this is a model for a user's photo: class Photo(models.Model): user = models.ForeignKey(User) title = models.CharField() image = models.ImageField() pub_date = models.DateTimeFied(auto_now=True, auto_now_add=pub_date) update = models.DateTimeFied(auto_now=False,

Re: confused about sql in django

2014-03-05 Thread Robin Lery
Thank you Alex and Tom! Its great to know something new. I think I will stick with django orm for now! Thanks again! On Wed, Mar 5, 2014 at 2:48 AM, Tom Evans wrote: > On Tue, Mar 4, 2014 at 8:08 PM, Robin Lery wrote: > > Hello, > > > > I am