Re: IE9+Django,Don't respond or Socket error!!!

2012-03-27 Thread br
This is a problem of django development server, running on windows, and IE(7-9). Basically, the server locks up, and it doesn't really give much as far as useful errors go. Apparently no one that contributes to django uses IE for development and has been able to replicate this issue, because the i

Anyone using a javascript MVC on top of Django?

2012-04-17 Thread br
We have an extremely javascript & ajax heavy application. To put it one way, we have blatently disregarded graceful degradation in order to build the type of application we want to build. We're finding that as the thing grows, the interactions between the front end javascript and django are becom

how to view and add related objects on both sides of an m2m field in admin

2011-08-18 Thread br
It seems that by definition, an M2M field is basically symettrical, at least underneath. However, I'm having trouble figuring out how to access and set M2M fields in the Django Admin via the Model that doesn't declare the M2M. Here is the example I've been working with to try to figure it out:

M2M Ordering in Admin

2011-04-26 Thread br
this before. I've googled it but am not finding a solution. Thanks br -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email

Re: M2M Ordering in Admin

2011-04-26 Thread br
Just found this: http://pypi.python.org/pypi/django-sortedm2m/0.3.2 It looks awesome. Thanks, Gregor. Going to try it out. Will post back if I have problems. br On Apr 26, 9:06 am, br wrote: > I am creating an application for displaying decks of slides.   Each > slide may be in mor

Re: form new versus edit

2011-05-14 Thread br
My HTML guy and designer tend to get together to do some fancy stuff (read: pain in the butt) so sometimes I need to access the data that a model form field represents and can't just let django render it, which is obviously the preferred way and I go that way if possible. I am pretty knew to this,

Inverted checkbox value in modelForm field for BooleanField?

2011-05-14 Thread br
Conceptually, an interface element of my application can either be click through (i.e. requires user interaction) or auto-cycle (no user interaction). So its boolean. But i picked the wrong one when I originally designed the model and now we have existing data and I don't want to change it. So I

how to manage creation of many-to-one (child) objects on separate page during creation of object

2011-05-16 Thread br
I have not written this yet, so am not posting code (yet). Also, I am implementing a client facing interface (not using django admin for this part). I am sure this is common thing to do, in fact, I beleive it is done in django admin, but I am somewhat confused as to the best or standard way to do

Re: how to manage creation of many-to-one (child) objects on separate page during creation of object

2011-05-16 Thread br
; with?http://docs.djangoproject.com/en/dev/ref/contrib/formtools/form-wizard/ > Sounds like this is what you are looking for ... multipage forms. > > Lucian > > > > > > > > On Mon, May 16, 2011 at 4:46 PM, br wrote: > > I have not written this yet, so am not posting

Example uses of Celery

2011-05-23 Thread br
pecific tool, but it seems to go hand and hand a lot of times and we are building our platform in django. Thanks, br -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com.

How to implement multi-tenant, single DB, single site?

2011-06-04 Thread br
I have been scouring the group and interwebs and it seems multi-tenant comes up quite frequently in various scenarios, and mine is probably a common one. However, I haven't been able to distill a Djangooey best- practice from what i've read, so I figure it won't hurt to bring it up again. Here is

Re: Preview for the new website..

2011-06-06 Thread br
My team has a designer (designs stuff in Photoshop), a front-end developer who is comfortable taking designer's photoshop and converting it to HTML/CSS/Javascript (and does a bit with django templates), and then the back-end team (myself and co.) who put the django behind it. We are a very design

Re: How to implement multi-tenant, single DB, single site?

2011-06-06 Thread br
Thanks, this is very helpful and gives me some good ideas to start implementing. One question I have is: If i'm using Django's built-in User class (and corresponding authentication) and I want to be able to associate each user with an organization and be able to access a user's organization from

Proper way to reuse django's built-in admin javascript in my own templates (outside admin)?

2011-06-17 Thread br
Hi, I am using inline fromsets in my own custom forms and would like to reuse the same functionality that is provided django admin's inlines.js, particularly the add row button functionality, in order to add rows to my own inline formsets, similarly as is done in django's admin. What is the prope

Is multiple inheritance with abstract model classes ok?

2011-06-20 Thread br
If I have three different abstract model base classes . . . I'd like to use them in multiple inheritance, sort of like Mixins. Any problems with this? E.g., class TaggableBase(models.Model): . . . class Meta: abstract = True class TimeStampedBase(models.Model): . . . class M

Multiple Inheritence of Abstract Base Model Classes, or plain Mixins?

2011-06-22 Thread br
I asked a similar question a few days ago but got no response. Since then, I've poked around SO and come up with a few potential ways to do it, but wonder if there is a *correct* Django way to do it or if there are hidden problems lurking behind one of them. Basically I have a few different base

Re: anybody using PhoneGap with Django

2011-07-08 Thread br
I am currently in the middle of a project where we are planning on using Django with PhoneGap . . . Haven't completed yet, or gotten to the PhoneGap part of it, so can't report its success or not yet. Basically, we are using jQuery Mobile to develop a complete mobile application that operates on a

How to automatically add a url param to url tags (it is used ubiquitously throughout application)?

2011-07-08 Thread br
Here's a snippet from my base urls.py: (r'^(?P[\w-]+)/manager/mobile/', include('mobilepolls.manager.urls')), (r'^(?P[\w-]+)/manager/display/', include('screens.manager.urls')), (r'^(?P[\w-]+)/display/', include ('screens.urls')), Each of those apps then defines its o

Re: How to automatically add a url param to url tags (it is used ubiquitously throughout application)?

2011-07-09 Thread br
 pm, br wrote: >  Here's a snippet from my base urls.py: > >     (r'^(?P[\w-]+)/manager/mobile/', >         include('mobilepolls.manager.urls')), >     (r'^(?P[\w-]+)/manager/display/', >         include('screens.manager.urls')), >  

Re: Class-Based Generic Views (CreateView) - field exclusions and defaults

2011-07-18 Thread br
While this doesn't contribute an answer to your question, I must say that name "class-based generic views" is a bit misleading . . . implying that these class-based views are for doing things you want to do that follow a strictly set pattern out of the box (i.e, listviews, detailviews, create views

Re: Django - can't open image in model save()

2011-07-18 Thread br
Not sure if this is your problem but there are some issues with some PIL installations and JPG files that require some potential configuration/install-time magic, so make sure you test on PNG's or GIF's first and make sure its working with those. If it ends up being JPG-specific issue, and google

Proper way to strip whitespace from Charfields in a form in current version of Django?

2011-07-18 Thread br
There seems to be a raging and unresolved discussion about how to address the issue of stripping whitespace from form fields in future versions of Django over on the Developers group: http://groups.google.com/group/django-developers/browse_thread/thread/90352cc0da78390b . In the present, what is t

Recommendations for load testing/profiling a django site server?

2011-07-21 Thread br
I am running on a Linode 768 VPS and may have some stuff going live before too long. I'm wondering what the best way to guage whether I have enough bandwidth/CPU/memory to handle a significant amount of traffic is and/or to get an idea of the types of loads the site can handle before i need to upg

Skinning/extending the admin for sub-admin interfaces?

2011-03-10 Thread br
So I'm taking over a project (which already has a strong start in Django) from a few guys. I'm new to the framework (but experienced as a programmer) and excited for everything about it (the project, Python, and Django). I have one general design question. But first, some background The site is s

Django projects, apps, and git repos

2011-03-14 Thread br
d apps, and then a repo for each project and corresponding project-specific files and apps? or just 1 centralized repo for all your django projects? Something else? Just curious if there is a best way to manage this both from a project- management and a git perspective. Thanks br -- You rec

Re: Django projects, apps, and git repos

2011-03-16 Thread br
Thanks for the feedback. I've looked at git submodules and think that will be a useful tool in django projects that share apps, once I'm comfortable with the submodule functionality & understand how it fits in with my prjoects. And once I get my apps so they actually are in fact "pluggable" (not

Run Daphne as non-root on low ports

2019-05-02 Thread BR
I'm running a simple Django/Channels website using Daphne. Traffic will be relatively low and will likely only see 1-2 clients at a time. I figured this would be a good use case for Daphne to serve both HTTPS and WebSockets. Does Daphne have a mechanism for starting as root and dropping down to

Re: Run Daphne as non-root on low ports

2019-05-02 Thread BR
Thanks for the feedback. I guess I was thinking that since Daphne is the "reference server" for ASGI, that it would have features available for production type use. I only came across WebSocket stuff yesterday so this is all quite new. I suppose my remaining issue is that SSL certificates seem

Daphne error log

2019-05-03 Thread BR
Is there an error log for the project Daphne is serving? I see the access log is on the console, but only errors from Daphne itself seem to output here. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop re

Daphne/Twisted exception when serving SSL/TLS

2019-05-03 Thread BR
I get the following traceback shortly after running Daphne with TLS enabled (it doesn't occur when TLS is not configured). Any ideas? It doesn't seem to affect anything, but I thought I would bring it up here before trying to submit an issue: 2019-05-03 12:41:45,252 ERRORException in callba

what happens to channels consumer instance after disconnect

2020-04-22 Thread BR
What happens to a consumer instance after a websocket client disconnects? Is there any specific cleanup of the instance done, or just regular garbage collection? Is it possible to reconnect to a channels consumer instance to recover the state of that instance? -- You received this message bec

Channels 2 using asyncio run_in_executor

2019-10-18 Thread BR
Should I expect any issues using asyncio run_in_executor to run blocking code? I realize there is the sync_to_async function as well, but that wasn't working in my case. I'm using multiprocessing.Queue to share data with a new process, and when I try to use queue.get() with either sync_to_async

Re: Channels 2 using asyncio run_in_executor

2019-10-18 Thread BR
handle them right for you) and the > possibility of deadlock. > > Andrew > > On Fri, Oct 18, 2019 at 11:27 AM BR > > wrote: > >> Should I expect any issues using asyncio run_in_executor to run blocking >> code? I realize there is the sync_to_as

Daphne with absolute path to ASGI file

2019-10-22 Thread BR
I've been using Daphne for months without issue, and have reorganized my project structure to make things a bit easier. However, it appears that Daphne needs to be run from the folder containing the Django project module like so: daphne project.asgi:application How can I specify the full path

Re: Daphne with absolute path to ASGI file

2019-10-22 Thread BR
This is Windows by the way On Tuesday, October 22, 2019 at 3:56:47 PM UTC-4, BR wrote: > > I've been using Daphne for months without issue, and have reorganized my > project structure to make things a bit easier. However, it appears that > Daphne needs to be run from the fold

Django Channels persistent DB connection

2019-10-30 Thread BR
I moved from a local sqlite3 DB file to a shared remote (local LAN) MariaDB server and noticed a bit of a slow down. On top of the DB now being remote, I'm also using SSL to encrypt the DB information. Based on the description of *database_sync_to_async* it sounds like the connection is closed/c

Re: Django Channels persistent DB connection

2019-10-30 Thread BR
I should add: My interest would be to have a DB connection that lasts the lifetime of the parent consumer. Does it already do this, and am I imagining things? On Wednesday, October 30, 2019 at 12:17:54 PM UTC-4, BR wrote: > > I moved from a local sqlite3 DB file to a shared remote (loc

mariadb/mysql database (2006, 'MySQL server has gone away')

2019-11-01 Thread BR
I think I'm experiencing an issue related to: https://github.com/django/channels/issues/1234 where I get (2006, 'MySQL server has gone away') after trying to establish a new channels connection with calls using database_sync_to_async(). I have set my Django DB CONN_MAX_AGE to 300 (5 minutes) an

Re: mariadb/mysql database (2006, 'MySQL server has gone away')

2019-11-07 Thread BR
erver resolves the issue. On Friday, November 1, 2019 at 9:13:41 AM UTC-4, BR wrote: > > I think I'm experiencing an issue related to: > > https://github.com/django/channels/issues/1234 > > where I get (2006, 'MySQL server has gone away') after trying to establish

Re: Open Source IDE to start with Django Web development

2019-11-07 Thread BR
Something to consider is that Django is Python, HTML, and Javascript. VS Code can do all three with highlighting, formatting, etc, and it all happens automatically as you switch between editing files. The Git support is excellent as well, as others said. On Thursday, November 7, 2019 at 9:18:25

Re: Amazon Product Advertising API

2009-08-01 Thread br...@instantdirectmarketing.com
Luke, I was curious how this was going. I did find this: http://jjinux.blogspot.com/2009/06/python-amazon-product-advertising-api.html import time import urllib from boto.connection import AWSQueryConnection AWS_ACCESS_KEY_ID = '...' AWS_ASSOCIATE_TAG = '...' AWS_SECRET_ACCESS_KEY = '...' se

How can _meta.local_fields not match the table schema in the database?

2010-02-07 Thread br...@instantdirectmarketing.com
I'm completely confused about why _meta.local_fields returns more fields than the database table contains. The User model inherits from contrib.auth.models.User. $ mysql -u user -p database Enter password: Reading table information for completion of table and column names You can

How can I add the Openid session data to the Django test client Client.post() ?

2010-02-24 Thread br...@instantdirectmarketing.com
I'm trying to test that a UserProfile model is created as a new User is registered in django_authopenid. I don't understand how to add the Openid session data to the POST. class UserTestCase(TestCase): def test_register_should_create_UserProfile(self): from django.test.client imp

Re: How can I add the Openid session data to the Django test client Client.post() ?

2010-02-25 Thread br...@instantdirectmarketing.com
response = c.post('/account/register/', {u'username': [u'john'], u'email': [u'j...@beatles.com'], u'bnewaccount': [u'Signup']}) self.assertEqual(response.status_code, 200) user = User.objects.get( username =&#x

Re: Developing a flexible CMS

2007-06-29 Thread anderson . santos . br
Hello everyone, I am talking to a friend to find a good solution for this question and finally write our own CMS. I am really thinking about how to create a flexible CMS and don't break django or don't rework a lot of stuff. So, what I do believe is that we have to focus on a Management System the