Django & Zinnia installation: where's the zinnia app folder?

2014-04-09 Thread Jared Nielsen
Hi, Noob here. I'm building my first Django project and wanted to integrate a pre-existing blog app. I got zinnia set up and accessible through admin, but the process didn't create a zinnia folder in my project. Where are the html and css files for the out-of-the-box zinnia? How do I go about

Re: About Django CentOS Apache

2014-04-09 Thread Choro H
Thank you. this is my wsgi.py file: import os, sys sys.path.append("/var/www/html/ihtmks_test/test") os.environ.setdefault("DJANGO_SETTINGS_MODULE", "test.settings") import django.core.handlers.wsgi application = django.core.handlers.wsgi.WSGIHandler() from django.core.wsgi import

Re: How to remove an item from a queryset object list?

2014-04-09 Thread Mario Gudelj
Have you tried user_list.exclude(user=user)? On 10 April 2014 12:45, nobody wrote: > Hi, > > I tried following statement, but did not remove the item from the list, > appreciate any helps. > > user_list.exclude(user__username=user.username) > > Thank you. > > Kind

How to remove an item from a queryset object list?

2014-04-09 Thread nobody
Hi, I tried following statement, but did not remove the item from the list, appreciate any helps. user_list.exclude(user__username=user.username) Thank you. Kind regards. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from

Re: Fwd: Moving from 1.2 to 1.6

2014-04-09 Thread John Fabiani
If I turn off the csrf with @csrf_exempt the form works. I'm sort of a newbie so the only django code I used was as posted. I just installed the jQuery form plugin and it worked as suggested. So the code I posted is the only code I have ever coded. I do believe I understand python at a

Re: Fwd: Moving from 1.2 to 1.6

2014-04-09 Thread Nick Santos
Thanks for that. If you inspect a generated page with the form using something like Firebug or Chrome Inspector, can you confirm that there is a hidden form element named csrfmiddlewaretoken? If you're trying to serialize the values in the page to send via AJAX, you can try using that value

Re: Fwd: Moving from 1.2 to 1.6

2014-04-09 Thread John Fabiani
I have created a csrf.js added the code. I added it to the html base I've added the {% csrf_token %} in the form. Where oh where do I use the code or is it magic! Does it really work? I don't mean to be an ass but using google search I find over 20,000 hits on the django and csrf on several

Fwd: Moving from 1.2 to 1.6

2014-04-09 Thread Nick Santos
Hey John, Is this a server you could turn set DEBUG=True for and send this list the results of the error page that's produced? That could be super valuable in tracking

Re: Moving from 1.2 to 1.6

2014-04-09 Thread John Fabiani
Do you guys think is possible the jQuery Form plugin is some how interfering with the token? Johnf On 04/09/2014 02:18 PM, John Fabiani wrote: The code looks great. I just do not know where the code goes and how it is to be called. For example: Should the code you provided be in .alaxSubmit

Re: (1364, "Field 'id' doesn't have a default value") - mysql issue?

2014-04-09 Thread Mark Furbee
You say you imported the database. Did you use syncdb to set up the tables? It sounds like your comment_id field in MySQL is not set as an auto-incrementing primary key field. Do you have access to that MySQL database to check, and or update that field definition? On Wed, Apr 9, 2014 at 2:42 PM,

(1364, "Field 'id' doesn't have a default value") - mysql issue?

2014-04-09 Thread Adam Teale
Hi Guys I have been working on a django app that was going well using an sqlite db. I've moved it over to mysql and imported the database Everything looks good But when I try to use the django comment system that was working well on the sqlite db before I get: OperationalError at

Re: Moving from 1.2 to 1.6

2014-04-09 Thread John Fabiani
The code looks great. I just do not know where the code goes and how it is to be called. For example: Should the code you provided be in .alaxSubmit -> beforeSubmit: showRequest or is there some other way I should call the functions. Does the code add to my data - if so where and how does

Re: Moving from 1.2 to 1.6

2014-04-09 Thread C. Kirby
Okay. I may get a few of the details wrong here, but the general idea should be correct. Basically CSRF makes sure that the request is coming from a page served by the same domain. In order to do this it checks the REFERRER header to make sure it is in the same domain. The cookie that you grab

Re: Moving from 1.2 to 1.6

2014-04-09 Thread John Fabiani
Also I was using jquery 1.4 with Django 1.2. Should I upgrade the jquery? Johnf On 04/09/2014 11:54 AM, John Fabiani wrote: I've read that paragraph 15 different ways (maybe even standing on my head). I still don't understand what I'm missing. Believe me I realize I might be the only person

Re: Moving from 1.2 to 1.6

2014-04-09 Thread John Fabiani
I've read that paragraph 15 different ways (maybe even standing on my head). I still don't understand what I'm missing. Believe me I realize I might be the only person that doesn't get it - such is life. Could you highlight what exactly I'm missing. What do you mean by "missing necessary

Re: Moving from 1.2 to 1.6

2014-04-09 Thread C. Kirby
Hi John, You are mostly there, but you are missing necessary headers on the ajax request. It isn't that much code. Just follow the couple of paragraphs of doc and examples here: https://docs.djangoproject.com/en/1.6/ref/contrib/csrf/#ajax Kirby On Wednesday, April 9, 2014 12:47:12 PM UTC-5,

Moving from 1.2 to 1.6

2014-04-09 Thread John Fabiani
Hi, I be honest this {% csrf_token %} has me completely baffled. I have read the doc's and I guess I have to admit I don't understand what I'm doing. I have action="/register/registeruser/" > {% csrf_token %} ... Which I think is the correct way to add the token. My form uses

Re: Saving forms with ManyToMany relationships

2014-04-09 Thread Camilo Torres
Hello, update your models.py: class Course(models.Model): name = models.TextField() students = models.ManyToManyField(Student, related_name='courses') *users = models.ManyToManyField(User)* Update your views.py: def create_item(request): if request.method == 'POST':

Re: About Django CentOS Apache

2014-04-09 Thread Daniel Roseman
On Wednesday, 9 April 2014 12:44:29 UTC+1, Choro H wrote: > > i have the following error, why? Please help me > ImportError: Could not import settings 'kanre.settings' (Is it on > sys.path? Is there an import error in the settings file?): No module named > kanre.settings > ImportError: Could

About Django CentOS Apache

2014-04-09 Thread Choro H
i have the following error, why? Please help me ImportError: Could not import settings 'kanre.settings' (Is it on sys.path? Is there an import error in the settings file?): No module named kanre.settings ImportError: Could not import settings 'test.settings' (Is it on sys.path? Is there an

Re: Django Dynamic Formsets

2014-04-09 Thread Leandro Alves
Hi again, So I followed the documentation and created a formset as we have there. https://docs.djangoproject.com/en/1.6/topics/forms/formsets/ Then I followed the documentation and included the django-formset-js: https://pypi.python.org/pypi/django-formset-js/ But I can't get the buttons "Add

Re: Queryset Filters

2014-04-09 Thread Jill Green
Thank you for the response. I feared the answered would be no but I wanted to be sure. Sent from my iPhone On Apr 9, 2014, at 12:27 AM, Anssi Kääriäinen wrote: > No, there is no way to do what you want. All filters are implemented as > filters in the DB, Django doesn't

Re: Queryset Filters

2014-04-09 Thread Anssi Kääriäinen
No, there is no way to do what you want. All filters are implemented as filters in the DB, Django doesn't know how to execute them in Python. There was some effort to implement filters also in Python, but there hasn't been any activity on this recently. The only way to do this currently is to