Re: Forbidden (CSRF token missing or incorrect.)

2018-11-29 Thread Zach
when using the development server over HTTP, don't set these values: CSRF_COOKIE_SECURE = True SESSION_COOKIE_SECURE = True On Wednesday, November 21, 2018 at 5:38:19 AM UTC-8, Rabah Saadi wrote: > > Hello, > > I've been using Django 2.2Dev for a while now, since April 2018, and it is >

Re: Strange intermittent UUID bug

2018-11-23 Thread Zach
You could try modifying to_python with something like this: import logging def to_python(self, value): if value is not None and not isinstance(value, uuid.UUID): try: value = uuid.UUID(value) except Exception as e:

Re: Django Tutorial Equivalent to Ruby on Rails Tutorial by Michael Hartl

2015-02-22 Thread Zach Swift
I realize this post is several years old, but this is for anyone still looking for an up to date Django tutorial on par with Michael Hartl rails tutorial. Here it is: The title of the book is very deceiving. Its a book about web development with python using django but doing it with test

Re: CSRF verification failed when I use smart phone

2015-01-30 Thread Zach Borboa
Here's an example of the csrf cookie value obtained by typing document.cookie in the javascript console. -- You received this message because you are

Re: CSRF verification failed when I use smart phone

2015-01-30 Thread Zach Borboa
. This submitted value needs to match the value in the cookie named csrftoken. On Friday, January 30, 2015 at 1:59:45 PM UTC-8, Pouria M wrote: > > Thanks Zach. > What are your thoughts after this test? if they match or if they don't > match > > On Wednesday, January 28, 2015 at 9:46

Re: CSRF verification failed when I use smart phone

2015-01-28 Thread Zach Borboa
For anyone trying to debug this issue, you may want to print out the variable using {{ csrf_token }} as well as using {% csrf_token %} on the form to verify the token is correct. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe

post_save signal not working in Django 1.7

2015-01-16 Thread Zach LeRoy
I have a block of code that works fine in Django 1.6.10 but does not work at all in Django 1.7.3. I would expect my log statement to print every time a Django User is created and this is the behavior in 1.6.10: import logging from django.contrib.auth.models import User from django.db import

Re: CSRF verification failed when I use smart phone

2015-01-08 Thread Zach Borboa
Mobile device could also be caching an incorrect csrf token. -- 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

Re: Rotate the CSRF token on every request

2014-11-01 Thread Zach Borboa
Rotating the CSRF token on every request is probably not a great idea. Tokens will become invalidated when multiple tabs are open. -- 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

Re: Strange behavior with defer and select_related

2014-08-14 Thread Zach Snow
to which each deferred field "path" (of the form 'field1__field2__...__fieldN') should be applied is available in the relevant place in the code. -Zach On Thursday, August 14, 2014 11:59:08 AM UTC-5, Zach Snow wrote: > > Hi there. I'm running into some strange behavior w

Strange behavior with defer and select_related

2014-08-14 Thread Zach Snow
table selected through the `creator` field (`T3` above) is being applied to the "first" instance of the table as well. Updating the SQL to include that column (in the way I expected `defer` and `select_related` to behave) succeeds in returning the correct data -- in sqlite3, at l

Re: Spammed with 'Invalid HTTP_HOST header' messages

2013-12-06 Thread Zach Borboa
Can you not add a filter to your logger handler? http://stackoverflow.com/a/19534738 On Friday, December 6, 2013 8:28:37 AM UTC-8, Jon Dufresne wrote: > > On Fri, Dec 6, 2013 at 7:47 AM, Zach Borboa <zachb...@gmail.com> > wrote: > > SuspiciousOperation should now

Re: Spammed with 'Invalid HTTP_HOST header' messages

2013-12-06 Thread Zach Borboa
SuspiciousOperation should now return a 400 error [1]. You could also use something like Sentry [2] or filter these messages. [1] https://code.djangoproject.com/ticket/19866 [2] https://github.com/getsentry/sentry [3] http://stackoverflow.com/a/19534738 On Thursday, December 5, 2013 11:21:33 AM

Re: Django-cms + Wymeditor + Heroku + AWS s3 + Cors

2013-09-07 Thread Zach Frank
Having same problem.. did you figure anything out? Z On Thursday, October 11, 2012 12:57:30 PM UTC-5, Matteo Suppo wrote: > > I found this: > http://comments.gmane.org/gmane.comp.python.django.django-cms/1202 > > and I decided to use tinymce for now. It's not solved though. I will do >

Re: Django-cms + Wymeditor + Heroku + AWS s3 + Cors

2013-09-07 Thread Zach Frank
Having this same problem... did you fix it? I'm using heroku, django-cms, s3 for static files and i'm getting the same domain origin error.. any new insights appreciated. Z On Thursday, October 11, 2012 12:57:30 PM UTC-5, Matteo Suppo wrote: > > I found this: >

Re: Django 1.4 - how to display a success message on form save

2013-04-04 Thread Zach Mance
Hi Kurtis, I saw your SO post, and I'm trying trigger success messages from my CBV's, and I'm just wondering how your "MessageMixin" methods work with your CBV's. For example, where/how does the form_valid() get called to pass the success_message from the CBV's. Also, will this work with

Settings for different environments

2013-02-17 Thread Zach Borboa
Yet another approach to using local development settings versus production settings. Here's something I've been using that I wanted to share. Thanks https://github.com/django-settings/django-settings -- You received this message because you are subscribed to the Google Groups "Django users"

Django on Bluehost

2012-09-24 Thread Zach
Hey everyone, I have recently been setting up a Django 1.4.1 project with python 2.7.2 and MySQL. I am using fcgi to deploy my project in this environment because mod_wsgi is not available through bluehost. After much frustration I have gotten my site up to display the "it works" page. Now for

Setting up Django 1.4 for a production environment

2012-09-23 Thread Zach
I am new to django and I am having trouble following the instructions on setting up django with apache and mod_wsgi. Apache 2.2.22, Python 2.7.2 and mod_wsgi are all install on my machine running Mac os X 10.8.2 (mountain lion). I have imported a conf file to my httpd file with the following

PostgreSQL Socket 5432 Error

2012-04-19 Thread Zach
Hi I am trying to setup a PostgreSQL database for Heroku. I am running into trouble. I installed PostgreSQL(9.0) from EnterpriseDB on OS X 10.6. However, when I do a simple $ psql -U postgres I get this error message. psql: could not connect to server: No such file or directory

Need help creating model.

2012-03-27 Thread Zach
I have the following in my Student model. I am wanting to track the date of each point given to each student. The idea would be so that I could see not only how many points each student has, but also see the date each point was given. In the future I want to see the trend of each students' points.

Additional fields in Django-Registration

2012-01-30 Thread Zach
Hi, I have been trying to add first_name and last_name to django registration but I can't get the information to save. It appears on the form but something isn't right. I have been looking at different solutions online but for some reason it is not working. Please help. Thank you! My post on

Re: Adding first_name and last_name to django registration

2012-01-28 Thread Zach
et_profile() hook that allows you to add > > extra info to a user account from your own model; however, I don't see > > support for that in django-registration at first glance. > > > I'm looking at the code from > >https://bitbucket.org/ubernostrum/django-regist

Adding first_name and last_name to django registration

2012-01-28 Thread Zach
I am new to Django and have implemented the django-registration app on my website. I want users to input their first name and last name on the registration page. However, the default setting only ask users for their email address/username/password . Is there an easy way to address this? -- You

Re: Subclassing models

2007-02-10 Thread Zach Seifts
ECTED]> wrote: > Subclassing doesn't work right yet, you need to use a ForeignKey or > similar to the base model in order to relate them - if you do it the > way you're trying it will break things randomly. > > On Feb 10, 12:25 pm, "Zach Seifts" <[EMAIL PROTECTED]> wrote: >

Subclassing models

2007-02-10 Thread Zach Seifts
I have been working on a project where I need to create a few classes in the model that are very similar. What I want to do is subclass a model but have it not set up a database table. I know there are ways of doing this I just haven't figured out yet. Here's an example of what I am trying to do

django_website from svn on Mac OSX problems.

2006-06-28 Thread Zach
Hi, I'm running Mac OSX 10.4.7 on a Mac Mini Intel Core Duo (1.66 ghz 512mb of RAM) Python 2.4.3 (Universal Build). I have the latest Django build from the trunk in the SVN. I got django_website straight from the SVN, aswell. I installed memcached from darwinports and py-memcached from the