Re: Can't get initial value into form correctly.

2016-05-14 Thread Chris Kavanagh
signment OUTSIDE the for loop. Then adjust > your template to index into add_product_forms based on item.pk. > > There are lots of other ways to do this too, I just thought this was the > quickest to show over email. > > On Sat, May 14, 2016 at 8:42 PM, Chris Kavanagh <

Re: Can't get initial value into form correctly.

2016-05-14 Thread Chris Kavanagh
rt_id/cart.html', context) > > Note how I moved the context assignment OUTSIDE the for loop. Then adjust > your template to index into add_product_forms based on item.pk. > > There are lots of other ways to do this too, I just thought this was the > quickest to show over email. &

Can't get initial value into form correctly.

2016-05-14 Thread Chris Kavanagh
I'm working on an online shop, and I'm having a problem in the cart, here's a screen shot (http://pasteboard.co/Vwnv2T0.png). I'd like the form for each item (product) to show it's current quantity (that's already been added to the cart) as an initial value as most ecommerce sites do. I've

Re: Why redirects to foo.com/?next=/some/folder show up as foo.com/?next=%2Fsome%2Ffolder in browser? (i.e. how remove the %2F's? )

2016-04-23 Thread Chris Seberino
TC-5, Stephen Butler wrote: > > You mean on the standard login form? The hidden "next" form value? That > value isn't part of a URL so it isn't URL escaped. It's part of the HTML > attribute value, so it is HTML attribute escaped. > > On Sat, Apr 23, 2016 at 6:19

Re: Why / added automatically to all urls but base url?

2016-04-23 Thread Chris Seberino
Nevermindthis is weird but the / at end was there but Chrome browser doesn't display it. When I pasted the url into a terminal is was there. Also, using curl I got the real info and it was there. Weird On Saturday, April 23, 2016 at 5:10:52 PM UTC-5, Chris Seberino wrote: > >

Re: Why redirects to foo.com/?next=/some/folder show up as foo.com/?next=%2Fsome%2Ffolder in browser? (i.e. how remove the %2F's? )

2016-04-23 Thread Chris Seberino
But I still don't see why sometimes the slash is escaped then sometimes it isn't. I've seen both ways for query parameters The ugly Escape version shows up when I have handmade URLs but not when Django creates the next URL itself like for logging in -- You received this message because

Why / added automatically to all urls but base url?

2016-04-23 Thread Chris Seberino
I have this urlpattern to map base url (easycharting.tk/) to a view called home... urlpatterns = [django.conf.urls.url("^$", mvc.controllers.controllers.home)] If you visit easycharting.tk/ you'll notice it automatically REMOVES the ending /. Why? For all other suburls, it ADDS the missing

Re: Why redirects to foo.com/?next=/some/folder show up as foo.com/?next=%2Fsome%2Ffolder in browser? (i.e. how remove the %2F's? )

2016-04-23 Thread Chris Seberino
On Saturday, April 23, 2016 at 2:47:58 PM UTC-5, François Schiettecatte wrote: > > Because the slashes are escaped, this is normal as they are a parameter > and not part of the path itself. > > Why URLs created by Django show /'s instead of %2F's? The Django code knows how to fix the

Django not adding / to end of URLS and since urls.py expects /, I now get 404s. How fix?

2016-04-23 Thread Chris Seberino
I am trying to be consistent and make urls.py expect / after every url. The problem is Django isn't automatically adding / at the end and so now I get 404s when I try to access my web pages. How fix? Thanks! Chris -- You received this message because you are subscribed to the Google Groups

Why redirects to foo.com/?next=/some/folder show up as foo.com/?next=%2Fsome%2Ffolder in browser? (i.e. how remove the %2F's? )

2016-04-23 Thread Chris Seberino
Why redirects to foo.com/?next=/some/folder show up as foo.com/?next=%2Fsome%2Ffolder in browser? (i.e. how remove the %2F's? ) Is there a function I can call on URLs built in a view to avoid that? cs -- You received this message because you are subscribed to the Google Groups "Django

Re: Why authenticate not returning User object in this case?

2016-04-22 Thread Chris Seberino
Solved...must add AUTHENTICATION_BACKENDS = ["django.contrib.auth.backends.ModelBackend"] to settings.py On Thursday, April 21, 2016 at 5:20:38 PM UTC-5, Chris Seberino wrote: > > I can't seem to get authenticate to return a User object even when > password is cor

Why authenticate not returning User object in this case?

2016-04-21 Thread Chris Seberino
enticate(username = 'jsmith', password = "test") >>> WHY DIDN'T THAT WORK ??? Thanks! Chris -- 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

Development Server Loading Time Issue: posix.waitpid

2016-04-15 Thread chris mc
Hi guys, I'm fairly new to Django. I'm running Django 1.3 (stuck with it unfortunately) and on my own machine I'm using the development server: python manage.py runserver When I make a change to a pyhton file the development server restarts but it's extremely slow to load again. Is this how

Re: variable to a template

2016-04-09 Thread Chris Bartos
There are probably 3 ways you can do this: 1) Use a Filter You should be able to use the "add" filter to concatenate two strings. 2) Map the elements of your array in your

Re: Looking for ways to improve my skills

2016-04-05 Thread Chris Seberino
On Saturday, April 2, 2016 at 5:37:22 PM UTC-5, Devrhoid Davis wrote: > > Hi All, > > I have been working with Python for just over 3 years now and have > recently taken up django. I have completed both the polls app and have > created an address book app by following a tutorial on youtube. I

Re: How use model objects in ver1.9 WITHOUT an app and get rid off "Model class doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS." error mssg?

2016-04-05 Thread Chris Seberino
> > > Just think of an app actually being a namespace rather than an app. > Django uses INSTALLED_APPS entries just like a search path added to the > BASE_DIR so it can find your models. > > Ah yes thanks. That helped a lot. I just needed to basically mention the directory in settings.py and

How use model objects in ver1.9 WITHOUT an app and get rid off "Model class doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS." error mssg?

2016-04-04 Thread Chris Seberino
isn't in an application in INSTALLED_APPS." Is there an easy sane/safe way to deal with this so Django can run without any "apps" defined? Thanks, Chris -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this g

Re: New to Django

2016-03-01 Thread Chris Bartos
The best way to use Python especially Django is by creating what is called a "Virtual Environment". This is a separate instance of Python that you can install all the tools that you need to run your Django app without having to messing up your current Python instance. It will also help to

Re: Accessing Request Object in Form Definition

2016-02-23 Thread Chris Kavanagh
Thank you so much, James. . .I greatly appreciate you taking the time to answer! On Tuesday, February 23, 2016 at 1:50:57 AM UTC-5, James Schneider wrote: > > On Mon, Feb 22, 2016 at 10:23 PM, Chris Kavanagh <cka...@gmail.com > > wrote: > >> To possibly answer my own que

Re: Accessing Request Object in Form Definition

2016-02-22 Thread Chris Kavanagh
To possibly answer my own question, thinking out loud, we have to override the Form Constructor so we can pass in the Request from the view when instantiating the Form? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this

Accessing Request Object in Form Definition

2016-02-22 Thread Chris Kavanagh
I'm trying to understand how overriding the Constructor of a Form (forms.Form or model.Models) allows you to access the Request Object? How does overriding __init__ allow one access to the Request? I've looked at BaseForm and don't see the Request in the Constructor. So, I don't get it. I

Re: Django TinyMCE external_image_list_url breaking admin urls

2015-11-08 Thread Chris Davies-Barnard
like to get it working correctly but for now will leave it as is and move on. Thanks for your help. Chris *Environment:* *Request Method: GET* *Request URL: http://csmatrix.local/admin/* *Django Version: 1.8.5* *Python Version: 2.7.10* *Installed Applications:* *('django.contrib.admin

Re: Django TinyMCE external_image_list_url breaking admin urls

2015-11-08 Thread Chris Davies-Barnard
as the image box failed to load period. I'm also wondering whether I could/should use reverse_lazy because of when this line is being called. Cheers for your help. I'd be interested in your thoughts. Chris On Sunday, 8 November 2015 09:46:25 UTC, Chris Davies-Barnard wrote: > > Hi

Re: Django TinyMCE external_image_list_url breaking admin urls

2015-11-08 Thread Chris Davies-Barnard
try and run it though runserver or apache - same result. All my admin urls are broken! I know this is not much help - is there another way of getting a traceback? Regards Chris On Sunday, 8 November 2015 05:30:33 UTC, James Schneider wrote: > > Try changing the reverse() call t

Django TinyMCE external_image_list_url breaking admin urls

2015-11-07 Thread Chris Davies-Barnard
er_to_image_list(link_list) Thanks in advance for any advice. Regards Chris -- 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...

Re: Cron Job

2015-10-14 Thread 'Chris Norman' via Django users
-commands/ On Wed, Oct 14, 2015 at 10:53 AM, 'Chris Norman' via Django users <django-users@googlegroups.com <mailto:django-users@googlegroups.com>> wrote: Hi again, I would like to set up a cron job to email the day's journeys to a pre-defined set of email addresses, using

Cron Job

2015-10-14 Thread 'Chris Norman' via Django users
Hi again, I would like to set up a cron job to email the day's journeys to a pre-defined set of email addresses, using the model I described in the previous example. I have it so I can type: python manage.py shell import journey_sender This does everything. Thing is, I would like to use

Filtering records based on date months

2015-10-14 Thread 'Chris Norman' via Django users
Hi all, I have written a Journey model, which has an out and a back field, both of which are datetime fields. What I want to do is something like: from datetime import datetime now = datetime.now() for journey in Journey.objects.filter(out__month = now.month, out__day = now.day): print

Re: "RuntimeError: Error creating new content types."

2015-07-18 Thread Chris DiLorenzo
the > contenttypes table and running the migration again I was able to fix the > issue. > > On Wednesday, July 15, 2015 at 3:30:27 PM UTC-4:30, Chris DiLorenzo wrote: >> >> Hey Devang, >> >> No, we did not fake any migrations =( >> >> On Tuesday

Re: "RuntimeError: Error creating new content types."

2015-07-15 Thread Chris DiLorenzo
Hey Devang, No, we did not fake any migrations =( On Tuesday, June 23, 2015 at 12:58:46 AM UTC+2, Devang Mundhra wrote: > > Chris- > By any chance, did you fake any of the migrations. That was the problem I > had faced- it wasn't a Django problem, it was a problem with my migration

Re: Models and relationships

2015-07-06 Thread Chris Strasser
t_related() > > -- > Rafael E. Ferrero > > 2015-07-06 13:51 GMT-03:00 Florian Schweikert <kel...@ist-total.org>: > >> On 06/07/15 14:04, Chris Strasser wrote: >> > my problem is with reverse lookups (i think it is called) the docs say >> that i can access

Re: Models and relationships

2015-07-06 Thread Chris Strasser
5 at 8:43 AM, Sadaf Noor <em...@sadafnoor.com> wrote: > If you have at least one entry in contact with a valid location, then it > should work: > > from app.models import Contact >> contact = Contact.all()[0] >> print contact.locationid.locationname > > > 2015-07-06 18

Models and relationships

2015-07-06 Thread Chris Strasser
Hi ,I am fairly new to Django and am struggling with models hope someone can sort me out. Models: class Organization(models.Model): #customer or vendor person or company orgid = models.AutoField(db_column='OrgID', primary_key=True) is_company =

Re: "RuntimeError: Error creating new content types."

2015-06-22 Thread Chris DiLorenzo
Where app is the django app name and listing is the model name. So that sounds to me like I'm seeing what everyone else is, the migration is just not applied on the database for some reason, but shows as being applied OK. // Chris On Wednesday, June 10, 2015 at 11:31:42 AM UTC-4, Devang Mun

RE: new to Django having models/views/templates question

2015-06-03 Thread Chris Strasser
more complicated (and expensive from a processing perspective) since you are forcing a lookup across multiple tables. It may not agree with your business process, though. Just a thought. -James On Jun 2, 2015 11:57 AM, "Chris Strasser" <cstrasse...@gmail.com <mailto:cstrasse...@gm

Re: new to Django having models/views/templates question

2015-06-02 Thread Chris Strasser
:8080/sto/ Django Version: 1.8 Exception Type: RuntimeError Exception Value maximum recursion depth exceeded while calling a Python object I can reproduce the encoding error but i forget how to get there at the moment ... On Tuesday, June 2, 2015 at 2:00:22 PM UTC-4, Chris Strasser

Re: non DB related fiels in model to appear in a form

2015-06-02 Thread Chris Strasser
hi Reiner I think what you want to do is controlled in the view not the model. in your view do something like this: context = {'form':form, 'infotext': "some informational text"} return render(request,'form.html', context) then in your template you can refer to it as follows:

new to Django having models/views/templates question

2015-06-02 Thread Chris Strasser
Hi am plugging away at learning Django and have done well so far (thanks to great documentation and Stackoverflow) but I have run into a problem that i cant seem to figure out. I have a model that refers to another model that refers to another model. example : Class ServiceOrder id

Re: Do you think Django's future is threatened by JS frameworks in both client & server?

2014-10-29 Thread Chris Hawkes
As a business owner and full time Developer using C# and Visual Studio I do all of my website building at home in Django. It's an amazing framework that is far above anything else I've tried which includes, ASP, Node.js, CodeIgniter, Yii and any other Python frameworks out there. (I'll admit

django-forms-builder help

2014-10-27 Thread Chris Meek
I have an app that uses django-forms-builder. I have got it to display the completed forms without the labels. How do I get it to match the labels next to the fields within my template. urls.py url(r'^forms/get/(?P\d+)/$', 'gws.views.form', name='form'), views.py def form(request,

Best approach to adding user notification and message alerts

2014-10-10 Thread Chris BB
I am working on a project that requires the system to show notifications and new message alerts to users when logged in (please see attached image). Whats the best approach to getting this done, what would the code look like - all suggestions are welcomed. Thanks in Advance. -- You received

Re: Feeling some serious timezone pain

2014-08-20 Thread Chris Whiten
I can understand that sentiment... But that doesn't change the fact that 12:00 PM on the Python side renders as 11 AM in the template, right? On Wednesday, 20 August 2014 09:09:24 UTC-4, Erik Cederstrand wrote: > > > Den 20/08/2014 kl. 14.22 skrev christophw <chris..

Re: Feeling some serious timezone pain

2014-08-20 Thread Chris Whiten
That's exactly right, but what's rendered in the browser is 11 AM rather than 12:00 On Wednesday, 20 August 2014 08:36:58 UTC-4, Geoffrey Knauth wrote: > > 2014-08-30 16:00:00+00:00 GMT > 2014-08-30 12:00:00-04:00 Toronto (Summer) > > This looks correct to me. Maybe you were expecting the

Re: Django app runs with DEBUG=True but gives "Bad Request (400)" error with DEBUG=False (Using Apache and WSGI). Why?

2014-08-14 Thread Chris Seberino
Ug!! That was it!! THanks!!! cs On Thursday, August 14, 2014 10:14:34 PM UTC-5, Collin Anderson wrote: > > a quick thing to check: is your ALLOWED_HOSTS set correctly? > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from

Django app runs with DEBUG=True but gives "Bad Request (400)" error with DEBUG=False (Using Apache and WSGI). Why?

2014-08-14 Thread Chris Seberino
If I set DEBUG=True this Django app runs fine. If I remove DEBUG=True I get a "Bad Request (400)" and apache error logs show lots of this.. [Fri Aug 15 03:04:27.400567 2014] [core:warn] [pid 2011:tid 140575764432768] AH00045: child process 2015 still did not exit, sending a SIGTERM [Fri Aug 15

Re: Why this error when run manage.py?-->AttributeError: 'module' object has no attribute 'execute_manager'

2014-08-11 Thread Chris Seberino
ODULE", "philfour.settings") django.core.management.execute_from_command_line(sys.argv) On Monday, August 11, 2014 11:00:22 AM UTC-5, Chris Seberino wrote: > > My fresh Django install on Ubuntu 14.04 works fine. WSGI starts the app > up just fine. > > I can run m

Why this error when run manage.py?-->AttributeError: 'module' object has no attribute 'execute_manager'

2014-08-11 Thread Chris Seberino
My fresh Django install on Ubuntu 14.04 works fine. WSGI starts the app up just fine. I can run manage.py without getting this error... % ./manage.py Traceback (most recent call last): File "./manage.py", line 6, in django.core.management.execute_manager(settings) AttributeError:

Re: Having LiveServerTestCase use same database as tests

2014-08-01 Thread Chris Wilson
your StackOverflow question: http://stackoverflow.com/a/25081791/648162. Cheers, Chris. -- 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+

Anyone got Django working on Google App Engine? Seems there are inconsistent, incomplete and conflicting docs. Any advice appreciated....SOS

2014-07-31 Thread Chris Seberino
getting errors about me not having permission to do this. Any help greatly appreciated. Sincerely, Chris -- 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: user object's is_authenticated() method ALWAYS return True even after they log out??

2014-07-31 Thread Chris Seberino
Is there a way to answer your question "is user x logged into the website right now" in Django code? On Thursday, July 31, 2014 11:05:29 AM UTC-5, cmawe...@gmail.com wrote: > > Right, the question isn't "is user x logged into the website right now", > it actually only makes sense for for

user object's is_authenticated() method ALWAYS return True even after they log out??

2014-07-29 Thread Chris Seberino
I tried viewing the value of is_authenticated() for a user and it always is true...before and after logging in and after signing out. I'm trying to determine if a user has logged in or not. Is this the right variable to use? Why not changing? Thanks. cs -- You received this message

Re: Do you think Django's future is threatened by JS frameworks in both client & server?

2014-01-27 Thread Chris Hinds
Coffeescript.org makes some of those things better, but it's no Python. C. > On 27 Jan 2014, at 23:57, "Tim Chase" wrote: > >> On 2014-01-27 14:44, damondevi...@gmail.com wrote: >> Why then adopt Django (or web2py) for a new project today, instead >> of going

Re: Django South - SyntaxError: invalid syntax (, line 1)

2013-10-01 Thread Chris
Ivan, Did this code paste correctly? There is a syntax error in the save method: def save (self, force_insert = False, force_update = False): self.nome self.nome.upper = () <--- SYNTAX ERROR super (Carrier, self). save (force_insert, force_update) Is that supposed to be:

Re: Help with Django installation on windows

2013-09-21 Thread Chris Kavanagh
afe (can't remember if this is required) put your path to "Scripts", in other words mine is "C:\Python27\Scripts\". . .Now you have to add the path to the django lib, which in my case is "C:\Python27\django-chris\Lib\site-packages\django-1.5.1-py2.7.egg\django\bin"

FileField Default Setting

2013-09-20 Thread Chris Kavanagh
I just added a FileField to my Model (thumbnail = models.FileField(upload_to=get_upload_file_name), however when I try to use South to migrate the model, I get a message telling me . . . "The field 'Article.thumbnail' does not have a default specified, yet is NOT NULL. Since you are adding

Re: URL Mapping Confusion

2013-09-10 Thread Chris Kavanagh
I understand it now Tom, thanks to you. I didn't quite get the "include" statement and what it did until you mentioned it, and a little help from the django book. . .Again, THANKS for taking the time to help, it's greatly appreciated! Chris On Monday, September 9, 2013 10:57:5

Re: URL Mapping Confusion

2013-09-09 Thread Chris Kavanagh
This is just a tutorial I'm going through Tom. I'm not trying to write anything, just trying to understand this part. And I apologize for making my question(s) confusing, I'm not exactly sure how to ask it. Let's back up for a second. I'm not trying to match anything, I was telling you what I

Re: URL Mapping Confusion

2013-09-09 Thread Chris Kavanagh
On Monday, September 9, 2013 6:41:23 PM UTC-4, Thomas wrote: > > On 9/9/13 3:30 PM, Chris Kavanagh wrote: > > I haven't used this group in a long time, so I hope I do everything > > correctly. If I don't, I apologize in advance. > > > > I thought I unders

URL Mapping Confusion

2013-09-09 Thread Chris Kavanagh
t should be a url with just "/create/" in it, right? I've looked at the django docs explanation, I've gone through every web site that talks about this, I understand regex, but I still don't understand why this is happening. Any help is GREATLY appreciated. Thanks, Chris Kavanagh -- You rec

Re: Passing variables to css file in django

2013-08-26 Thread Chris Lawlor
The simplest solution is probably to keep all of the CSS that users can't customize in an external file (to be served as a static asset), but move anything that's user customizable to the of your base template, in a

rewriting URLs from foo.example.com/hello to example.com/foo/hello

2013-08-17 Thread Chris Curvey
Hey all, I have a django project going where we're going to be adding a bunch of small, independent sites. So I figured I would have one Django project to contain everything, then a separate app for each site, and just let folks to www.example.com/foo/hello, www.example.com/bar/goodbye, etc

Overriding admin/actions.html

2013-08-16 Thread Chris Stoyles
doing wrong that would be greatly appreciated. I figure that I'm going to need to override a method in my model admin class or potentially in one of the other templates that I've overridden (e.g. change_list.html and change_list_results.html). Thanks in advance! Chris. -- You received

Parents can't enroll children in courses

2013-08-08 Thread Chris Ryan
I submitted this question in much, much more detail a couple of weeks ago but got no response. I'm thinking that maybe I gave you too much information. So, I thought I'd try just one more time. I have a table of family members. Some of them are students. These students are enrolled in one or

SOLVED: modelformset_factory not validating multiple forms

2013-08-01 Thread Chris Ryan
I found the problem! The fields were being processed as expected but since I am using the FamilyMember table as the authentication table I needed to include the username and other fields (as hidden). On Thursday, August 1, 2013 9:13:18 AM UTC-4, Chris Ryan wrote: > > Hop

modelformset_factory not validating multiple forms

2013-08-01 Thread Chris Ryan
Hopefully this is an easy one. I have read through the documentation, searched online and just can't find a way around this error. I have two formsets that I've displayed in one view. The second formset is not validating upon POST so it won't save to the database. None of the fields are

What is the best way to architect this part of the application?

2013-07-31 Thread Chris Ryan
I thank you again for answering a different question a couple of weeks ago. Today, however, I'm struggling with the best way to architect a part of my app. I'm hoping that you can help me figure out the best way to provide the necessary functionality to the user. I am building an application

Re: Backwards in the relationship chain?

2013-07-24 Thread Chris Ryan
Sorry. I should have typed the ID as lower case id in {% if user.Family. <http://user.family.id/>id = object.Teacher.id.Family.<http://object.teacher.id.family.id/> id %} On Wednesday, July 24, 2013 3:28:52 PM UTC-4, Chris Ryan wrote: > > Thank you so much for the re

Re: Backwards in the relationship chain?

2013-07-24 Thread Chris Ryan
d I can do this (and use the actual ID numbers for comparison) {% if user.Family.ID = object.Teacher.ID.Family.ID %} Thank you again for the information that you provided. It will greatly help me move forward from here. -Chris On Wednesday, July 24, 2013 2:51:43 PM UTC-4, ke1g wrote: > > Firs

Backwards in the relationship chain?

2013-07-24 Thread Chris Ryan
I have spent hours trying to find the answer to this. What makes it even more frustrating is that I'm new to django development and not a real programmer by trade (I am a UNIX admin) so I am struggling to label what I am trying to do so that I can search for an answer. Here's what I have:

bug or programmer error when using logging.config.fileConfig

2013-07-08 Thread Chris Curvey
I'm not sure if this is a bug or my error, but I'm trying to use a legacy logging configuration in my django 1.5 app, like so: LOGGING = r"C:\path\to\logging.conf" LOGGING_CONFIG="logging.config.fileConfig" when I try to start my app, I'm getting ConfigParser.NoSectionError: No section:

Re: django , python and ides

2013-06-01 Thread Chris Lawlor
> $HOME/.screenrc-: http://collabedit.com/kuj8d > > Enjoy! > > -- > Joey "JoeLinux" Espinosa* > * > <http://therealjoelinux.blogspot.com> > <http://twitter.com/therealjoelinux><http://about.me/joelinux> > > > On Fri, May 31, 201

Re: django , python and ides

2013-05-31 Thread Chris Lawlor
Joey, Would you be interested in sharing your virtualenvwrapper setup? I assume you're using some custom postactivate hooks, looks nice. Chris On Friday, 31 May 2013 14:23:23 UTC-4, JoeLinux wrote: > > I've used both PyCharm and SublimeText extensively for months each at a > time

Developing Django Apps - best practices?

2013-05-31 Thread Chris Lawlor
and completely ignores testing. My goal here is simply to start a discussion. Hopefully, if some general consensus emerges, we might identify some ideas that could possibly be documented elsewhere, whether we inspire a blog post or add to the Django documentation itself. Thank you, Chris -- You

Re: linux or windows

2013-05-31 Thread Chris Lawlor
Django itself is completely platform agnostic. Years ago I used to develop on Windows, and typically where I would run into problems was trying to find binaries for third party libraries like PIL and psycopg2. They'd usually be available from somewhere or another, thanks to some kindhearted

Re: Object Lookup after Save

2013-05-28 Thread Chris Conover
Interesting. Thanks for the rundown. Looking forward to 1.6. On Tuesday, May 28, 2013 6:40:28 PM UTC-4, akaariai wrote: > > On 29 touko, 01:07, Chris Conover <clc...@gmail.com> wrote: > > Adding commit_unless_managed() before the get() seems to fix the > problem. >

Re: Object Lookup after Save

2013-05-28 Thread Chris Conover
Also, thank you Tom, Christian, Christophe, and Anssi for helping me track down this problem. Users are now receiving notifications in a timely manner because of you. On Tuesday, May 28, 2013 6:07:22 PM UTC-4, Chris Conover wrote: > > Adding commit_unless_managed() before the get() seems

Re: Object Lookup after Save

2013-05-28 Thread Chris Conover
() call? It looks like the major change is using the underlying database's autocommit mode rather than emulating it in the ORM. I suppose I'll have to test... On Tuesday, May 28, 2013 5:43:31 PM UTC-4, Chris Conover wrote: > > I bribed the DBA to turn on the general query log briefly

Re: Object Lookup after Save

2013-05-28 Thread Chris Conover
quickly and if that doesn't work, I'll post the full query trace. On Tuesday, May 28, 2013 5:27:36 PM UTC-4, akaariai wrote: > > On 28 touko, 22:20, Chris Conover <clc...@gmail.com> wrote: > > Well, you can inspect the object and see it's primary key. Surely that > > means the

Re: Object Lookup after Save

2013-05-28 Thread Chris Conover
, Christophe Pettus wrote: > > > On May 28, 2013, at 1:26 PM, Chris Conover wrote: > > > # no middleware that does any writes > > Are you using the Transaction Middleware? > > -- > -- Christophe Pettus >x...@thebuild.com > > -- You receiv

Re: Object Lookup after Save

2013-05-28 Thread Chris Conover
Isolation levels or whatever shouldn't matter in my mind, the SELECT is happening after the COMMIT. Do any of those assumptions strike you as wrong? Chris On Tuesday, May 28, 2013 3:43:38 PM UTC-4, Christophe Pettus wrote: > > > On May 28, 2013, at 12:20 PM, Chris Conover wrote: > >

Re: Object Lookup after Save

2013-05-28 Thread Chris Conover
> commit before the SELECT? > > On May 28, 2013, at 10:52, Chris Conover <clc...@gmail.com > > wrote: > > It's not really feasible to move this project to PostgreSQL. > > I honestly just don't understand the problem. According to the Django > documentation, the O

Re: Object Lookup after Save

2013-05-28 Thread Chris Conover
, May 28, 2013 1:33:10 PM UTC-4, Christophe Pettus wrote: > > In the meantime, you can use this: > > https://github.com/Xof/xact > > On May 28, 2013, at 10:29, Chris Conover <clc...@gmail.com > > wrote: > > That seems to only be available in the dev ve

Re: Object Lookup after Save

2013-05-28 Thread Chris Conover
nseRedirect(reverse('view', {'pk': obj.id})) >> and i never run into any exception >> >> >> Am Dienstag, 21. Mai 2013 23:20:53 UTC+2 schrieb Chris Conover: >>> >>> Calling transaction.commit() after object.save results in >>> a TransactionMan

Re: Object Lookup after Save

2013-05-21 Thread Chris Conover
object. I'm assuming the view and workers are separate transactions since I don't see how they could be connected -- though I'm looking into this. On Tuesday, May 21, 2013 1:05:54 PM UTC-4, Tom Evans wrote: > > On Tue, May 21, 2013 at 4:23 PM, Chris Conover > <clc...@gmail.com> >

Object Lookup after Save

2013-05-21 Thread Chris Conover
to use a look-back perspective. The stack is Django 1.4 connecting to MySQL 5.5.27. Django is handling 200-1000 requests per second and the database is handling about double that. Thanks, Chris -- You received this message because you are subscribed to the Google Groups "Django users&q

Re: Template Caching with Messages

2013-04-26 Thread Chris Lawlor
want to cache that part of the page either, if there's a chance that a user with a different state can hit the same template. Caching bugs can be subtle. I'd suggest writing some comprehensive integration tests for anything more than the most trivial caching strategies. Chris On Wednesday, 24

Re: django development server timeout too quick

2013-04-26 Thread Chris Lawlor
Hadi, What is your SESSION_COOKIE_AGE set to? This setting controls session expiry. The default is 2 weeks. If you are not setting SESSION_COOKIE_AGE, check that your code is not calling request.session.set_expiry() anywhere. For light use, the default session backend (db) should meet your

Re: Calling Jquery or javascript function based on an if condition

2013-04-26 Thread Chris Lawlor
A slight variation of this approach is to map some Django template context info to Javascript variables in one of your templates, making that data accessible to your compressed / minified JS code: # in a template, "base.html" perhaps.. window.DjangoContext = { userLoggedIn: {{

Re: Guide for migrating to a custom user model?

2013-04-17 Thread Chris Streeter
I found this [1] blog post to be interesting. I can't vouch for it's accuracy as I haven't migrated my own site yet, but it looks correct from reading it. - Chris [1]: http://ponytech.net/blog/2013/03/31/migrate-your-user-profile-data-django-15-custom-user-model/ On Wed, Apr 17, 2013 at 5:34

Re: Can someone help me with this error. No ReverseMatch

2013-04-10 Thread Chris Ramón
using one url would be: url(r'''^narrow_category/(?P\d+)/(?P\w*)''' r'(?:\/(?P\d+))?' r'(?:\/(?P\d+))?' r'(?:\/(?P\d+))?$', 'catalog.views.narrow_category', name="narrow_category"), second_digit, third_digit and fourth_digit parameters would be optional, and your view would look

Re: delete obsolete content type entries...

2013-03-25 Thread chris
It seems that stale content types return `None` for `ContentTpye.model_class()` , so the following deletes all stale content types. I would back up and test this extensively first though because deleting content type you don't want to is dangerous. for c in ContentType.objects.all(): if not

Re: PostgresSQL or MySql with django?

2013-03-18 Thread Chris Streeter
of async worker with gunicorn, there isn't yet a way to do it with MySQL. - Chris On Mon, Mar 18, 2013 at 9:38 AM, Lee Hinde <leehi...@gmail.com> wrote: > > On Mar 18, 2013, at 9:34 AM, frocco <faro...@gmail.com> wrote: > > > Thank you for your feedback. > > Oth

Re: How to make django's mysql connections to use utf8mb4 ?

2013-02-19 Thread Chris Streeter
There is some discussion on this ticket: https://code.djangoproject.com/ticket/18392 The ticket also requires that a new version of MySQLdb be running to properly recognize the type. - Chris On Mon, Feb 18, 2013 at 4:22 PM, Peter of the Norse <rahmc...@radio1190.org>wrote: > Tri

Re: Appscale and Django

2013-02-10 Thread Chris Bunch
Hello, You can certainly run Django apps on AppScale, provided that your app works fine on App Engine. There's an out of date article (https://developers.google.com/appengine/articles/django) that details what the transition process tends to look like, and it mostly boils down to how you

Interesting error with django.simple.test.DjangoTestSuiteRunner

2013-02-06 Thread chris
, Chris -- 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, send email to django-users@google

Re: define form in yaml file

2013-01-24 Thread Chris Hinds
to share. In general terms for model/form construction, I transform the original spec it to something that jsonpickle can deliver into type(). Can talk more if this sounds at all interesting. Cheers Chris. On Thursday, January 24, 2013 8:02:53 PM UTC, Adrian Andreias wrote: > > Hello,

Re: Strange behavior using ModelForms

2012-12-18 Thread Chris Cogdon
his should not happen. > > The basic issue I'm trying to understand here, I believe, is "What really > happens and what is the purpose of binding a modelform to an instance?". > > > On Tue, Dec 18, 2012 at 7:31 PM, Chris Cogdon <ch...@cogdon.org > > wrot

Re: Django community, is it active?

2012-12-18 Thread Chris Cogdon
But I _want_ to drink the free bear. On Tuesday, December 18, 2012 3:19:59 PM UTC-8, Cal Leeming [Simplicity Media Ltd] wrote: > > Don't drink the free bear though, ... > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this

Re: Converting Django app into a Desktop app

2012-12-18 Thread Chris Cogdon
Personally, I'd prefer something that didn't require packaging up additional programs (xampp and python, in this example). It should be _perfectly possible_ to find a native-python moderate performance webserver, then wrap up that, django, the application and the python interpreter into a

Re: invalid syntax inside urls.py

2012-12-18 Thread Chris Cogdon
Need a comma between the view name, and {'queryset...' and your parenthesis are not nested properly. On Tuesday, December 18, 2012 12:19:24 PM UTC-8, maiquel wrote: > > 'm trying to do the following > > Artigo.objects.all () inside urls.py > > urlpatterns = patterns ('', > # url (r '^ blog

<    1   2   3   4   5   6   7   8   9   10   >