Re: potential bug with defer() & only()

2014-12-23 Thread Russell Keith-Magee
Hi Will, On Tue, Dec 23, 2014 at 3:56 PM, William Earp wrote: > > Hi all, > > I'm writing some tests #18586) for defer() and only() and there appears to > be a bug when it comes to chaining these two in a single query. > > If you look at the docs ( > https://docs.djangoproject.com/en/dev/ref/mode

Re: Poll Tutorial (for Django 1.7) Files Available?

2014-12-23 Thread Russell Keith-Magee
Hi Ken, No - the full tutorial code isn't available anywhere (at least, not in an official capacity). If you need help debugging a problem, let us know what error you're getting, and we might be able to help you; if you're looking for some immediate feedback, try the #django IRC channel. There's u

django problem with mysql and apache

2014-12-23 Thread th . granier
Hello i have just installed Django on Ubuntu 14.04 and i'd like to know 1 how to do a multilingual site? 2 how to do a forum or use one existent 3 during the installation i have this probleme about mysql root@linux-pc:/home/siteweb# python3.4 manage.py migrate Traceback (most recent call la

Re: Template Not Applying - Django Polls Tutorial (Newbie Question)

2014-12-23 Thread Ken Wayne
Hmmm, that is one of the directories I tried, C:\Python34\Scripts\mysite\templates\admin with the file base_site.html On 12/23/2014 5:07 PM, Néstor wrote: You might need to make for admin mysite/templates/admin/base_site.html for regular html files for the polls only mysite/polls/templates/pol

Re: Template Not Applying - Django Polls Tutorial (Newbie Question)

2014-12-23 Thread Néstor
You might need to make for admin mysite/templates/admin/base_site.html for regular html files for the polls only mysite/polls/templates/polls/index.html That is how I got it to work. Good luck!!! :-) On Tue, Dec 23, 2014 at 2:13 PM, Ken Wayne wrote: > Windows 8 > Django 1.7.1 > Python 3.4.2

Template Not Applying - Django Polls Tutorial (Newbie Question)

2014-12-23 Thread Ken Wayne
Windows 8 Django 1.7.1 Python 3.4.2 Google Chrome Version 39.0.2171.95 m Bottom of part 2 of the the tutorial https://docs.djangoproject.com/en/1.7/intro/tutorial02/ it indicates how to customize the admin template but when I follow the directions it doesn't show any change in my browser. I've

Re: Two Django projects with common models and business logic

2014-12-23 Thread Javier Guerra Giraldez
On Tue, Dec 23, 2014 at 1:22 PM, andy wrote: > Now, both the projects have some models and some business logic common > between them. I don't want to duplicate the code and data which shall be > chaotic going forward. Also, I want the models and code (business logic) to > be in sync (when models/c

Re: Database queries location

2014-12-23 Thread pythonista
Can this be used with a complex query in which multiple tables (classes) are being joined? I also have to pass multiple post values to the query. Thanks for the example On Monday, December 22, 2014 8:52:04 PM UTC-5, Collin Anderson wrote: > > Hi, > > There's a good example of creating a cust

Django url issues, append slash and case insensitvity

2014-12-23 Thread pythonista
I am having some issues with trailing slashes. The application is working fine from my local machine whether I add a trailing slash or not. It is not working as expected on the servers. The link is being redirected to localhost for some reason. I thought that SLASH_APPEND= True was on by def

Two Django projects with common models and business logic

2014-12-23 Thread andy
Hi, I have two Django Projects that have different use cases. There are reached using different domains. They are hosted in two different servers. Also each Django project has it's own database. Now, both the projects have some models and some business logic common between them. I don't want

Optimizing admin change view with inlines

2014-12-23 Thread 'Petros Moisiadis' via Django users
Hello people :) I am struggling with optimizing an admin with inlines which causes too many database requests. My model structure is like this: class ExampleA(models.Model): ... class ExampleB(models.Model): aexample = models.ForeignKey('ExampleA', related_name='bexam

Re: Raw access to cache table

2014-12-23 Thread Collin Anderson
Hi Russ, Makes sense. Thanks. Collin On Sunday, December 21, 2014 5:41:34 PM UTC-6, Russell Keith-Magee wrote: > > > On Sun, Dec 21, 2014 at 12:55 PM, Collin Anderson > wrote: >> >> Hi Erik, >> >> If you want a nicer interface, I just ran manage.py inspecdb on one of my >> databases and got th

Difference between Q and filter and exclude

2014-12-23 Thread Anssi Kääriäinen
These queries should be equivalent. - Anssi -- 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 post to this group, s

Re: Problem with google calendar on ancient django version

2014-12-23 Thread Roy Smith
Heh, I figured it out (a good night's sleep helped). I've got Privacy Badger installed. Disabling that lets the the file load properly :-) I guess for completeness, the answers to my questions are: 1) Probably not 2) No clue 3) "Will not fix -- working as designed" :-) 4) No On Dec 22, 20

Re: django.core.exceptions.AppRegistryNotReady: Models aren't loaded yet.

2014-12-23 Thread Jani Tiainen
On Tue, 23 Dec 2014 02:23:16 -0800 (PST) su...@janakitech.com wrote: > I have following model. > > class CampaignTemp(models.Model): > campaign_modules = Module.objects.filter(active=True) > choices = > ... > ... # other fields > > I get following error when I try `python m

not select_relelated records

2014-12-23 Thread Jose Ignacio Berreteaga
Hi Some records on "son" table haven´t their parent record on "parent" table. How to know are they? Thanks in advace. Jose I. -- 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,

Re: (yet another) Custom templatetag raising KeyError when DEBUG=False

2014-12-23 Thread Alexandre Provencio
Hi Collin, thanks for answering. Yes this is the home view, but just to clarify, almost all of the views of the project follow this pattern of a function that returns the render shortcut. The templates of the views also follow the a pattern in the sense they all extend from base.html, which is whe

potential bug with defer() & only()

2014-12-23 Thread William Earp
Hi all, I'm writing some tests #18586) for defer() and only() and there appears to be a bug when it comes to chaining these two in a single query. If you look at the docs (https://docs.djangoproject.com/en/dev/ref/models/querysets/#django.db.models.query.QuerySet.only), it says this: # Final

django.core.exceptions.AppRegistryNotReady: Models aren't loaded yet.

2014-12-23 Thread suren
I have following model. class CampaignTemp(models.Model): campaign_modules = Module.objects.filter(active=True) choices = ... ... # other fields I get following error when I try `python manage.py`. ... File "/home/auser/aproject/src/apps/anapp/models.py", line 35, in Campai

defer() and only() chaining bug

2014-12-23 Thread William Earp
Hi all, I'm currently writing unit tests for defer() and only() under issue #18586. But there appears to a bug when it comes to chaining the two together. The docs gives the following example for only(): # Final result loads headline and body immediately (only() replaces any existing set of fi

Re: makemigrate adds multiple migrations.AddField for same model (django 1.7.1)

2014-12-23 Thread pjotr
Sorry, all the ALTER statements are identical except the FIELDNAME. It adds 6 new fields. On Tuesday, December 23, 2014 4:46:42 AM UTC+1, Collin Anderson wrote: > > Hi, > > You're just using one database? > > Are all 6 ALTER statements identical? > > Collin > > On Sunday, December 21, 2014 5:27:0

Re: Model form with optional fields issue

2014-12-23 Thread marcin . j . nowak
On Tuesday, December 23, 2014 3:49:07 AM UTC+1, James Schneider wrote: > > Have you looked at the Django REST Framework module? > Yes, I have. They wrote own serializers and fields for validation, and they don't use builtin forms. Personally I don't like DRF API, because it is too heavy and not

Re: Thinking about EAV database model for flexibility. How (in)compatible is it with the django model?

2014-12-23 Thread Felipe Faraggi
You guys are really active on this board! Thanks so much for your time once again. My question has been answered at its fullest. On Monday, December 22, 2014 11:00:46 PM UTC+1, Jamie Lawrence wrote: > > Well, Django, in the role of an ORM, is necessarily pretty coupled to SQL. > I know people h