Load base test data outside Django framework

2013-09-02 Thread Jani Tiainen
Hi, I would like to conduct unit testing using complex test data that I do not want to reload for every test again and again. In broken down steps to what I would like to do: 1. Create test database 2. Load initial data using database's own tools instead of Django fixtures 3. Record state of

Re: Django-registration reset password templates not getting picked up

2013-09-02 Thread Kelvin Wong
Check that your 'homepage' app is above the 'registration' app: INSTALLED_APPS = ( 'homepage', # Order matters, this is loaded before others 'registration', 'django.contrib.auth', ... ) Order of the apps is significant. Review https://docs.djangoproject.com/en/dev/ref/templates/a

Re: Django-registration reset password templates not getting picked up

2013-09-02 Thread Vibhu Rishi
Essentially the below should work (and is working for all) as I have the following template loader: TEMPLATE_LOADERS = ( 'django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader', ) Vibhu On Tue, Sep 3, 2013 at 7:21 AM, Vibhu Rishi wrote: > I have a

Re: Django-registration reset password templates not getting picked up

2013-09-02 Thread Vibhu Rishi
I have a module called homepage and they reside in that. Path is as follows : $ ls homepage/templates/registration/ *activate.htmlpassword_change_form.html *activation_complete.html password_reset_complete.html *activation_email_subject.txt password_reset_confirm.html *activa

Re: MongoDB and Django

2013-09-02 Thread Christiano Anderson
Russ, you are right! I have used Django MongoDB Engine. It works fine, but requires an older version of Django and can't be updated. Some Django features (like many-to-many, some admin features or strong ORM related) doesn't work fine with MongoDB (and makes sense, it is NoSQL). Today this is not

Re: Django-registration reset password templates not getting picked up

2013-09-02 Thread Kelvin Wong
If you are not using a templates folder in your project root, where are your registration templates located? K On Monday, September 2, 2013 9:42:50 AM UTC-7, Vibhu Rishi wrote: > > > So far, all the other template html files get picked up - except the ones > related to the password management

Re: I really about to give up Django

2013-09-02 Thread Mike Dewhirst
On 2/09/2013 11:58pm, Andre Terra wrote: /Non sequitur/. Obscure variable names can happen regardless of the coder's language choice, ... which reminds me that I need to refactor more aggressively to make sure my variables and especially column names (and verbose_name) more closely match/ref

Re: quick question: RE model relations

2013-09-02 Thread Andre Terra
How about posting both models.py from galleryview and event to something like https://gist.github.com/ ? Maybe we can work from there. Cheers, AT On Mon, Sep 2, 2013 at 2:07 PM, Bobby Roberts wrote: > i tried doing that and now get this error: > > Error: One or more models did not validate:

Re: quick question: RE model relations

2013-09-02 Thread Bobby Roberts
i tried doing that and now get this error: Error: One or more models did not validate: galleryview.galleryphoto: Accessor for field 'GalleryId' clashes with related field 'Gallery.Gallery_Id'. Add a related_name argument to the definition for 'GalleryId'. galleryview.galleryphoto: Reverse query

Re: quick question: RE model relations

2013-09-02 Thread Bobby Roberts
thanks for the info... yes the name is funny for the model isn't it? I try to write confusing code. Always test in production On Monday, September 2, 2013 12:24:41 PM UTC-4, Bobby Roberts wrote: > > I'm creating an event module and want people to be able to associate a > picture gallery with

Re: Django-registration reset password templates not getting picked up

2013-09-02 Thread Vibhu Rishi
Thanks Kelvin for the response. However, I am not sure I understand why this is to be done. currently my TEMPLATE_DIRS is not having anything. it is as follows: TEMPLATE_DIRS = ( # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". # Always use forward slash

Re: quick question: RE model relations

2013-09-02 Thread Andre Terra
As per the current docs[0], you need to provide a dotted path to your model in the form app.ModelName when defining a ForeignKey. So try this instead: GalleryId = models.ForeignKey('galleryview.Gallery', verbose_name=_('Gallery Id'), related_name='Gallery_Id',blank=True, null=True, help_text=_("Y

quick question: RE model relations

2013-09-02 Thread Bobby Roberts
I'm creating an event module and want people to be able to associate a picture gallery with the event: from django.utils.translation import get_language, ugettext, ugettext_lazy as _ from django.contrib import admin from django.db import models from django.contrib.auth.models import User from

Re: I really about to give up Django

2013-09-02 Thread Andre Terra
*Non sequitur*. Obscure variable names can happen regardless of the coder's language choice, and most definitely do not encourge the use of one's native tongue. As others have said in the thread, if you're writing *in English* to ask for help, you should probably code in English as well. It's not

Re: Why does the save form order make any difrance?

2013-09-02 Thread Tom Evans
On Mon, Sep 2, 2013 at 2:36 PM, Tom Evans wrote: > All the forms don't save because all the forms are not valid. This isn't what I meant at all - take two: "All the forms don't save because not all the forms are valid." Same words, different order :( -- You received this message because you a

Re: I really about to give up Django

2013-09-02 Thread Tom Evans
On Sat, Aug 31, 2013 at 4:33 AM, Aaron C. de Bruyn wrote: > Feel free to use whatever names you'd like in models. > > def Ikhouvanjou(models.Model): > #whatever field names you want... You can use whatever language or naming scheme you like for your code, but if you want to ask for help from pe

Re: Why does the save form order make any difrance?

2013-09-02 Thread Tom Evans
On Sat, Aug 31, 2013 at 9:01 PM, Gerd Koetje wrote: > Hi, > > > Why does this save sometimes not save all forms > If i set form8 at the top it doesnt save form 8 > When i set it at the bottom it does save form 8, but not any others > > without the form8 all works > > > if request.POST: > >

Re: Warning about old install when upgrading via pip

2013-09-02 Thread Russell Keith-Magee
On Mon, Sep 2, 2013 at 5:23 PM, Darren Spruell wrote: > Running Django in a virtualenv, have another instance of Django > installed system-wide on the system > > When upgrading the virtualenv Django using 'pip install -U', I see > that the old version is uninstalled and the new version installed.

Re: Stuck with TemplateDoesNotExist at /

2013-09-02 Thread vogernewsletters
Well, this is embarrassing but the file wasn't in the path after all. A simple ls would reveal that. It was one level higher than that. So I moved the directory templates inside the microblog and now it works. On 09/02/2013 04:07 PM, Sandro Dutra wrote: Django cannot load the template, probably

Re: Stuck with TemplateDoesNotExist at /

2013-09-02 Thread Sandro Dutra
Django cannot load the template, probably the path is wrong, try to put this in your settings: TEMPLATE_DIRS = (os.path.join(os.path.dirname(__file__), '..', 'templates').replace('\\','/'),) About the views, I think you don't need to code it if in your urls.py you already used the TemplateView.as

Stuck with TemplateDoesNotExist at /

2013-09-02 Thread vogernewsletters
Hi I am new to both Python and Django. I am studying various tutorials and now I am following the tutorial from http://gettingstartedwithdjango.com where the author walks through the creation of a simple microblog. I tried to follow the tutorial to the p

Stuck with TemplateDoesNotExist at /

2013-09-02 Thread Voyager
Hi, I am total newbie when it comes to both Python and Django. I followed few tutorials but still can't get things to click at all. Now I am trying to follow the tutorial from http://gettingstartedwithdjango.com. I use PyCharm as an ide and generated from there the starting project. My problem

Re: MongoDB and Django

2013-09-02 Thread Russell Keith-Magee
On Sat, Aug 31, 2013 at 6:22 PM, Timothy Makobu wrote: > Hi, > > Is MongoDB support coming to standard Django? > There's nothing official being planned, and I'm not aware of any active efforts to add the features to Django's core. Christiano pointed you at some third-party projects that have at

Re: Why no locale (formats.py) for Australia en_AU or Canada en_CA?

2013-09-02 Thread Russell Keith-Magee
On Sat, Aug 31, 2013 at 6:30 AM, Justin Hill wrote: > https://github.com/django/django/tree/master/django/conf/locale > > Does anyone have an idea as to why Australia doesn't have a locale format? > en_GB is there, but no en_CA, or en_AU. My code is in seven countries and > my forms are working

Performance - takes the view many records

2013-09-02 Thread Hélio Miranda
Hi I'm making an application where I'm using client-server architecture. Where am using mongodb as a database, then I'm using django with the rest api Tastypie and client-side angle. With some records, so far so good, but I've been doing some testing and introduce 10 000 records in DB In my appl

Warning about old install when upgrading via pip

2013-09-02 Thread Darren Spruell
Running Django in a virtualenv, have another instance of Django installed system-wide on the system When upgrading the virtualenv Django using 'pip install -U', I see that the old version is uninstalled and the new version installed. At the end of the upgrade, the package reports having been insta