help with idea

2014-10-03 Thread carlos
Hi i need have this in my views! but not working dicc_one = {'string1': 'fieldsFK__total_one__gt=0', 'string2': 'fieldsFK__total_two__gt=0', 'string3': 'fieldsFK__total_three__gt=0', 'string4': 'fieldsFK__total_four__gt=0', }

Re: Query s in django 1.7

2014-10-03 Thread dk
yes,that did the trick, odd that on .all does work fine, i wish the error was more descriptive. On Friday, October 3, 2014 7:52:40 AM UTC-5, Collin Anderson wrote: > > You need to call django.setup(). > > I can confirm, though, that using Model.objects.all() somehow sometimes > seems to work

Re: How to filter results that are not part of a ManyToManyField?

2014-10-03 Thread Collin Anderson
This may look totally crazy, but does this do what you want? People.objects.filter(people=None) It may make more sense to do this: class Person(models.Model): children = models.ManyToManyField('self', blank=True, related_name= 'parents') Person.objects.filter(parents=None) -- You received

Re: Failure to get data from database and onto template.

2014-10-03 Thread Malik Rumi
I just wanted to report back and see if you had any additional ideas to offer. I did change the meta from id to pk, but there was no change. Then I took reverse off the template for loop and (almost) everything was the way I wanted it. For some reason, Article 4 came out Sections 3,4,1,2, in

Re: Site specific additional configuration - extending Django Sites model

2014-10-03 Thread Rakan Alhneiti
It seems like the issue was with my app naming ("site") with south actually creating the migration into Django's site package directory. Table inheritance seems the way to go. Thanks again, Rakan Best Regards, *Rakan AlHneiti* Find me on the internet: *Online Blog*: http://rakan.me Rakan

Re: Site specific additional configuration - extending Django Sites model

2014-10-03 Thread Rakan Alhneiti
Hello Collin, The problem with the second approach is that it's ugly, i prefer the first one instead. However, i've got to figure out how to prevent South from creating the migration in the "django.contrib.site" directory in my virtualenv. Thanks, Rakan On Friday, October 3, 2014 5:14:34 PM

How to filter results that are not part of a ManyToManyField?

2014-10-03 Thread Neto
Hello, I have it model: class People(models.Model): > children = models.ManyToManyField('self', blank=True, null=True) I want to filter the first of each family tree. *Knowing that children can have children How I do it? People.objects.filter() -- You received this message because

Re: CSRF Token: is it okay if it is attached to my url when I enter my form?

2014-10-03 Thread Collin Anderson
> > However you would have that behavior when you are submitting a form with a > GET. You should use POST to submit your form instead of GET. > Yes, use: -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and

Re: Setting up Apache to be the web server for apache for Django 1.7 and python 3.3

2014-10-03 Thread Collin Anderson
Here's your requested document: https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/modwsgi/ If you're using ubuntu (though I assume you're not, based on your python version,) you just run: sudo apt-get install apache2 libapache2-mod-wsgi-py3 > What should the settings.py reflect to

Re: Setting up Apache to be the web server for apache for Django 1.7 and python 3.3

2014-10-03 Thread robert brook
The requirements of the organization is to use Apache On Friday, October 3, 2014 8:42:29 AM UTC-4, robert brook wrote: > > Can someone point me to a document on how to perform a setup for Apache. > > What modules would it be good to install ( I presume as a site package for > Python)? > > What

Re: CSRF Token: is it okay if it is attached to my url when I enter my form?

2014-10-03 Thread Babatunde Akinyanmi
I don't think its risky to have csrf token in the url since its in open view in the page's source anyway (I'm not a security expert so that with a very large bag of salt). However you would have that behavior when you are submitting a form with a GET. You should use POST to submit your form

Re: Unable to import 3 modules when running tests

2014-10-03 Thread Collin Anderson
So there's no tracebacks for the error messages? The test runner likes to search for tests in your current directory. Is trying to run code it shouldn't be running? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this

Re: Site specific additional configuration - extending Django Sites model

2014-10-03 Thread Collin Anderson
> > 1) Create a model that extends Site model: this would result in South > adding the migration into django itself rather than the app extending the > Site model. I haven't got any further with this option as i hit this road > block. I think i understand that given the Site model is not

Re: Please help: urgent deployment problem with django post office

2014-10-03 Thread Brad Pitcher
If you want to simply disable logging, you could try setting the LOG_LEVEL to 0: POST_OFFICE = { 'LOG_LEVEL': 0 # Don't log anything } On Fri, Oct 3, 2014 at 4:55 AM, Sabine Maennel wrote: > Hello Collins, I need post office for other purposes not for error >

CSRF Token: is it okay if it is attached to my url when I enter my form?

2014-10-03 Thread Sabine Maennel
Please help: I am confused whether it is okay that it is showing in the url like this: http://netteachers.de/bewerbung/formular?csrfmiddlewaretoken=2jKsplZsQx5XpBfltUaDmgJjhRiCllxQ This happens when I enter my form ( a CreateView Model Form)? Is that oky or a security risk of any kind? --

Re: Setting up Apache to be the web server for apache for Django 1.7 and python 3.3

2014-10-03 Thread Timothy W. Cook
Of course http://www.giyf.com/ but unless you have some very compelling need to use Apache. This may be a better choice. http://michal.karzynski.pl/blog/2013/06/09/django-nginx-gunicorn-virtualenv-supervisor/ I found it to be much easier to setup and maintain. On Fri, Oct 3, 2014 at 9:42 AM,

Re: Query s in django 1.7

2014-10-03 Thread Collin Anderson
You need to call django.setup(). I can confirm, though, that using Model.objects.all() somehow sometimes seems to work without calling django.setup(). -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

Setting up Apache to be the web server for apache for Django 1.7 and python 3.3

2014-10-03 Thread robert brook
Can someone point me to a document on how to perform a setup for Apache. What modules would it be good to install ( I presume as a site package for Python)? What should the settings.py reflect to accept calls from Apache? What do I need to configure in the apache config file? What port should

Re: Please help: urgent deployment problem with django post office

2014-10-03 Thread Sabine Maennel
Hello Collins, I need post office for other purposes not for error logging. I worte an issue in their issue queue, this is what they wrote back: >>As explained by @RafRaf , the emails are sent by BrokenLinkEmailsMiddleware, you can disable it insettings.py if you

Re: Unable to import 3 modules when running tests

2014-10-03 Thread Mike Cameron
Also, I have re-created my virtualenv from scratch, but the error persists. -- 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

Site specific additional configuration - extending Django Sites model

2014-10-03 Thread Rakan Alhneiti
Hello all, I am currently trying to develop a blog engine which uses the sites framework provided by Django in order to add blog-specific settings. Such preferences could be something like blog_description, the user's twitter handle, pagination settings, widgets .. etc. Looking at the sites

Query s in django 1.7

2014-10-03 Thread dk
*i am trying to query base on the id of the table and i get a big error, when i do it using .all() i can get the objects* *>>> Restaurant.objects.all()* [, , , ] this works for looping and getting the information such for i in Restaurant.objects.all(): print i.id print i.name 1