Re: Can model subclass change field options?

2011-10-02 Thread Brian Mehrman
myModelAdmin) This code hasnt been tested but should be the route you want to take. You can find more info on widgets here( https://docs.djangoproject.com/en/1.3/ref/forms/widgets/). I hope this helps you. -Brian On Sun, Oct 2, 2011 at 12:20 PM, Artemis wrote: > Hi, > > I have an model

Re: Can model subclass change field options?

2011-10-02 Thread Brian Mehrman
# do something to the old title then add it back to data data['title'] = new_title return data admin.site.register(myModel, myModelAdmin) Thats how I have been handling my validation issues. I hope this helps you figure out your validation issues. If you are still having trouble po

Re: how to match a url in urls.py

2011-10-03 Thread Brian Mehrman
match would help me to decipher the problem. I hope this helps, Brian On Mon, Oct 3, 2011 at 9:56 AM, He Jibo wrote: > Hello, > > I want to match a url in urls.py. Can you teach me how to do it? Thanks.I > have tried the following two versions. But as long as I put a . (dot) in the >

Re: How REST Access ?

2011-10-03 Thread Brian Mehrman
Thanks for the info. I didn't know about either tastypie or piston. The easy ability to throttle a users number of requests is awesome. -Brian On Mon, Oct 3, 2011 at 12:40 PM, sanket wrote: > please checkout Tastypie .. I was able to RESTify my django app in > couple of hours &

Re: Display superscript or subscript in template site

2011-10-04 Thread Brian Bouterse
Even though it is off topic from Django, I would recommend taking some time to learn about unicode <http://docs.python.org/howto/unicode.html>superscript and subscript symbols. Brian On Tue, Oct 4, 2011 at 12:11 PM, Khuong Lien wrote: > Hi All, > > > I want to display supers

Re: Thread-safeness of templates

2011-10-05 Thread Brian Bouterse
ments (True, False, None, numbers, strings, tuples). Brian On Tue, Oct 4, 2011 at 7:23 PM, Martin J. Laubach wrote: > Are you sure your context is thread-safe, ie. it's rebuilt from scratch > every time you render an email and not re-used, stored in a global variable, > class

Re: Ajax replacement in django

2011-10-12 Thread Brian Schott
. http://www.w3schools.com/tags/tag_iframe.asp Create a iframe_base.html template file that has the meta refresh tag included in section and just the iframe parts should refresh. Not sure if this is what you want, and not sure this is a good idea, but it doesn't require javascript. Brian S

Re: Question on cleaning ModelForms

2011-10-17 Thread Brian Bouterse
ult with a callable to set the lat/lng of the FarmersMarket object. It's an idea I haven't tested, so I'm not positive it will work. You could write some geocoding middleware that sets request.POST data in some way as it passes through. I don't really like this solution since it is

"drop table if exists" aborts

2011-11-02 Thread Brian Craft
mysql generates an informational warning when running "drop table if exists " if the table doesn't exist. Django then throws an error and aborts. Is there a good way to avoid this? b.c. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post t

Re: Which Linux distro to use on EC2?

2011-11-14 Thread Brian Schott
Ubuntu has great cloud-init support for dealing with cloud startup scripts. Works on most clouds: openstack, ec2, eucalyptus... Sent from my iPhone On Nov 13, 2011, at 8:52 PM, ydjango wrote: > I was concerned that Ubuntu being a desktop OS might have some > limitations which CENTOS or Debia

Form wizard and dynamic choices

2011-11-26 Thread brian mckinney
I've been trying to implement a relatively simple django app, in which I need to have a multistep form and a dynamically generated choice field. I'm using Django 1.3 and the Form Wizard. In step one of the form, I ask for a URL from the user, which I'd like to use to dynamically generate the list

Re: Need to process uploaded files into database entries(takes hours), how do I return a progress bar?

2011-11-27 Thread Brian Schott
with rabbitMQ so you get instant scalability. Then your AJAX job status view can poll a job status table that is updated by the task and you don't have to worry about threads. https://github.com/ask/django-celery Brian Schott bfsch...@gmail.com On Nov 27, 2011, at 8:54 PM, Nathan McCo

Re: Need to process uploaded files into database entries(takes hours), how do I return a progress bar?

2011-11-27 Thread Brian Schott
t;fil.write('coming from background') >>fil.close() >> >>print Gene.objects.get(id=y+1) >>return True >> >> @task >> @transaction.commit_manually >> def processXLS1(datasetObjectID): >>print "proc

Re: Simple task dispatching (How heavy is celery + RabbitMQ)

2011-11-28 Thread Brian Schott
don't seem to get reliable message delivery, but maybe I misread the site. Brian Schott bfsch...@gmail.com On Nov 28, 2011, at 8:34 PM, Gelonida N wrote: > On 11/28/2011 12:14 PM, Gelonida N wrote: >> Hi, >> >> I'd like to use a light weight disp

Re: Newbie question on re-defining an XML schema in my Django data model...

2011-11-29 Thread Brian Schott
null=True) class Meta: ordering = ['index',] Brian Schott bfsch...@gmail.com On Nov 29, 2011, at 10:44 AM, Marc Edwards wrote: > I need some help in resetting my thinking on creating my Django data > model. > > I have previously created an XML sch

double trailing slash in url

2011-12-01 Thread Brian Craft
I have a url spec like so: (r'^foo/$', 'blah') I just noted from our server logs that if someone mistakenly types two slashes ('foo//'), the page gets served, but all of the relative links are broken. It's really confusing. I believe it should be redirecting or 404ing instead. I note that foo/bar

Re: double trailing slash in url

2011-12-01 Thread Brian Craft
I don't think so. It's not issuing a redirect. It's just serving the view, even though the url spec doesn't match. On Thu, Dec 1, 2011 at 2:42 PM, creecode wrote: > Hello Brain, > > Could it be you are seeing the results of the APPEND_SLASH setting < > https://docs.djangoproject.com/en/1.3/ref/se

Re: slow function

2011-12-05 Thread Brian Schott
ay to determine what should be a separate app. If you have a relathionships like Publishers -> Books, and Authors -> Books should you try to break out Books, Authors, and Publishers as separate apps? Brian Schott bfsch...@gmail.com On Dec 5, 2011, at 5:18 AM, Håkon Erichsen wrote: &

Re: Novice question...generation of model instances within a "for" loop...

2011-12-08 Thread Brian Schott
I think if you set: new_cmd_str.id = None That will force a new PK. Not sure why the CmdString constructor isn't clearing this.. Brian Schott bfsch...@gmail.com On Dec 8, 2011, at 11:47 AM, Marc Edwards wrote: > I'm looping through some JSON code and generating new model insta

Re: Django E-Commerce Framework

2011-12-08 Thread Brian Schott
I've been playing with django-shop. It looks lightweight, class extensible, and lightweight, but haven't worked with it enough to recommend yet. That's still in my scrum backlog... Brian Schott bfsch...@gmail.com On Dec 8, 2011, at 11:58 AM, Nan wrote: >> I'm g

ModelChoiceField with multiple databases

2011-12-21 Thread Brian Craft
Is there an easy way to use a ModelChoiceField with multiple databases? The only thing I've seen that looks promising is overriding the form __init__ and setting the queryset for the field. Seems kinda clunky. -- You received this message because you are subscribed to the Google Groups "Django

Re: Split File Storage

2011-12-27 Thread Brian Schott
CloudFiles or S3? Replication is good because the MTBF plummets as you add bits. Brian Schott bfsch...@gmail.com On Dec 27, 2011, at 9:02 PM, Cameron wrote: > Greetings all- > > I have a django site which is referencing about 1TB of static files at the > moment and growing fast.

CACHE_MIDDLEWARE_ANONYMOUS_ONLY isn't working for me

2011-12-28 Thread Brian Neal
I have CACHE_MIDDLEWARE_ANONYMOUS_ONLY = True. It seems to cache pages even for people who have logged in. For example, I can log into the admin, and edit an object. If I then visit the view for that app, my changes do not get seen until the 5 minute cache timeout hits. I suspect my middleware ord

Re: YouTube Integration

2011-12-28 Thread Brian Neal
On Dec 28, 11:46 am, Hassan wrote: > Dear All, > > I want to know if there is a way that i can get youtube videos to my > website using a video url ? > > Best Regards , > > Hassan AL-Natour Have you seen the oEmbed specification? http://oembed.com/ I believe there is a Django application that in

Re: CACHE_MIDDLEWARE_ANONYMOUS_ONLY isn't working for me

2011-12-29 Thread Brian Neal
mited than I thought. On Dec 28, 10:25 am, Brian Neal wrote: > I have CACHE_MIDDLEWARE_ANONYMOUS_ONLY = True. It seems to cache pages > even for people who have logged in. For example, I can log into the > admin, and edit an object. If I then visit the view for that app, my > change

Re: New Relic with Django

2012-01-03 Thread Brian Bouterse
he Google Groups > "Django users" group. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/grou

logging sql queries during unit test

2012-01-03 Thread Brian Craft
Is overwriting settings.DEBUG the recommended way to get connections[db].queries to work during a unit test? -- 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

syncdb not creating join table

2012-01-04 Thread Brian Craft
I have two models. The second one has a ManyToMany to the first. Both are managed. If I drop both tables and run syncdb, only the two model tables are created. There's no join table. syncdb doesn't report any errors. "validate" shows 0 errors. Any ideas what the problem could be, or how to debug i

Re: syncdb not creating join table

2012-01-04 Thread Brian Craft
but I don't have control of that on the generated model. On Wed, Jan 4, 2012 at 10:57 AM, Brian Craft wrote: > I have two models. The second one has a ManyToMany to the first. Both > are managed. If I drop both tables and run syncdb, only the two model > tables are created. Th

Re: syncdb not creating join table

2012-01-04 Thread Brian Craft
Looks like a m2m class can be identified by the ._meta.auto_created attribute, which also holds the class with the m2m field. So the router can check for attributes on that class. On Wed, Jan 4, 2012 at 11:49 AM, Brian Craft wrote: > I strongly suspect the problem I'm having has to

Re: Directory layout for a large Django application (not project)

2012-01-09 Thread Brian Schott
; PROJNAME = PROJDIR.split('/')[-2] BASEDIR = os.path.abspath(os.path.join(PROJDIR, '..', '..')) + '/' APPSDIR = os.path.abspath(os.path.join(BASEDIR, 'apps')) + '/' # add apps and projects directory to path sys.path.insert(0, PROJDIR) sys.pat

Re: Directory layout for a large Django application (not project)

2012-01-10 Thread Brian Schott
. In reality, all of the tables are in the same database. I also use: class Meta: app_label = 'major_app' in the model class of each sub_app, so that all of the admin pages are grouped together. Brian Brian Schott bfsch...@gmail.com On Jan 10, 2012, at 1:46 AM,

Re: Directory layout for a large Django application (not project)

2012-01-10 Thread Brian Schott
ut SSL and virtual hosting on Apache. Brian Schott bfsch...@gmail.com On Jan 10, 2012, at 6:01 AM, Cal Leeming [Simplicity Media Ltd] wrote: > I've hit this same problem myself many times. > > Ultimately there is never any one answer - you can split out functionality > into indivi

file manager options for user home directory

2012-01-18 Thread Brian Schott
behind the scenes. I've thought about different options, but they all have tradeoffs: 1. dav enabled nginx process for each user with a javascript dav file explorer? 2. django-storages with sftp? 3. something else? Brian Brian Schott bfsch...@gmail.com smime.p7s Description: S/MIME cryptographic signature

Re: file manager options for user home directory

2012-01-19 Thread Brian Schott
les... On Jan 19, 2012, at 12:56 AM, Mike Dewhirst wrote: > On 19/01/2012 2:10pm, Brian Schott wrote: >> Looking for some expert advice. I need to provide an upload and file >> browse capability for a user's home directory. It doesn't have to be >> a full blow

Django vs. Ruby on Rails

2012-01-27 Thread Brian D
ve died down in the last couple of years from a peak in 2008/2009. I did search the group and haven't seen any recent discussions on this comparison. Any comment really very much appreciated. Kind regards, Brian -- You received this message because you are subscribed to the Google Groups

Re: Execution time of a long process results in an Internal Server Error 500

2013-01-10 Thread Brian Schott
://www.dajaxproject.com Brian Schott bfsch...@gmail.com On Jan 10, 2013, at 9:12 AM, Tom Evans wrote: > On Thu, Jan 10, 2013 at 1:21 PM, Mauro Sánchez wrote: >> Hello, I have a process that takes about 2 or 3 minutes to execute. The >> problem is that sometimes (not always) i

Using the Django development server for local subdomain development

2013-01-26 Thread Brian Dant
I'm trying to create a development environment that supports testing my subdomain configuration. I'll be using the django-subdomains package, which relies on the sites framework. *To make a local environment that supports this while using the Django built-in webserver, do I need to set up loc

Re: Automating deployments

2013-02-01 Thread Brian Schott
We are using ansible. http://ansible.cc/ Other popular choices are puppet and chef. The real benefit. Is that these tools let you version control your configurations. Sent from my iPhone On Feb 1, 2013, at 7:46 PM, Carlos Aguilar wrote: Bash scripts really??? If you are a Python developer yo

Re: Confusion about Static Files

2013-03-29 Thread Brian Schott
over the place. Brian Schott bfsch...@gmail.com On Mar 29, 2013, at 3:36 PM, David Pitchford wrote: > I am experienced with Python but new to Django and web development in > general. I am struggling to understand its static files system from the > documentation. It seems like

Re: Deploying: Desktop to server

2013-04-09 Thread Brian Schott
strategy is to do content updates on the production site and test/develop against database snapshots locally. Also, when you change the models, it is worth learning how to use South to do schema migration. http://south.readthedocs.org/en/latest/tutorial/part1.html Brian Schott bfsch...@gmail.com

Re: How to use a list in a django model

2013-04-10 Thread Brian Schott
es. 2. Encode the thing as a JSON list and store in a JSONField https://github.com/derek-schaefer/django-json-field 3. There are several flavors of ListField out there: http://djangosnippets.org/snippets/1491/ Brian Schott bfsch...@gmail.com On Apr 10, 2013, at 1:38 PM, Cody Scott wrote: >

Re: How to use a list in a django model

2013-04-10 Thread Brian Schott
Question to duplicate the question and its choices. https://docs.djangoproject.com/en/dev/ref/contrib/admin/actions/ That way, your workflow is duplicate a question, edit on a single page, hit save. Brian Schott bfsch...@gmail.com On Apr 10, 2013, at 3:02 PM, Cody Scott wrote: > I like

Re: How to use a list in a django model

2013-04-10 Thread Brian Schott
constraint on choice + module. There are tradeoffs in all of these approaches. Brian Brian Schott bfsch...@gmail.com On Apr 10, 2013, at 4:30 PM, Cody Scott wrote: > I also want to have the same question in multiple quizzes. But the count for > each option should be dependent on the Q

Guide for migrating to a custom user model?

2013-04-17 Thread Brian Neal
Hello - I have a Django site that I've been maintaining for 4 years. It is running Django 1.4 now and is using the usual Django User model plus the get_profile() method to retrieve some extra information for each user. Now that Django 1.5 has landed and we can substitute our own custom user mod

AttributeError: 'AlumniResponseFormFormSet' object has no attribute 'new_objects'

2013-04-29 Thread Brian Dant
that at this point the parent object and its form have already been saved. Thanks for your time! Brian Dant PS: I crossed posted this from SO, where I wasn't getting much traction. I realized that this is probably more of a Django Admin detail, so y'all might know better :D --

Noobie questions about Django and Databases

2013-05-06 Thread Brian Williams
direction of information that could help me understand creating a database like this, I would greatly appreciate it. Brian -- 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: Noobie questions about Django and Databases

2013-05-06 Thread Brian Williams
Thanks Shawn, I am plugging my way through the docs and djangobook. I figured that I probably just hadn't come to it yet. Sometimes ADD gets the best of me and I just can't help but ask a question when something is on my brain. I appreciate the help, off to read the links you se

Trying to figure out ManyToManyField on a legacy database

2013-05-11 Thread Brian Millham
Hi all, I'm just trying to learn Django. I have an existing site that I wrote in PHP, and I'l considering converting it to Django, I have a legacy database that I don't want to make any changes to. I have the basics working in Django, but am having a problem with a ManyToManyField. Here are th

Re: Forcing group_by on a field other than id

2013-05-15 Thread Brian Millham
t; 1, and instead of showing the album name, it just shows On (x) albums. I can't make any changes to the layout of the Song table, but making minor changes to the Played table is a possibility. (I'd rather not, but if there is better way to do it, I'm not opposed) Thanks! Brian On

Problem counting names by letter

2013-05-24 Thread Brian Millham
;).aggregate(lc=Count('upper(left(name,1))')) but that doesn't work: FieldError: Cannot resolve keyword 'upper(left(name,1))' into field. Choices are: id, name, prefix Any ideas? Thanks! Brian -- You received this message because you are subscribed to the Google Groups

Problem counting names by letters

2013-05-24 Thread Brian Millham
With this simple database table: class Artist(models.Model): id = models.IntegerField(primary_key=True) name = models.CharField(max_length=255L, blank=True) prefix = models.CharField(max_length=32L, blank=True) class Meta: db_table = 'artist' I want to be able to get a lis

Re: Creating a "Django Course" and would like some feedback

2013-05-28 Thread Brian Williams
Kevin, Sounds like a great idea. Wish you the best of luck. I would be willing to give you a hand if you want the perspective of a complete novice. I am just learning Django and am not far beyond the docs tutorial. Brian -- You received this message because you are subscribed to the

On live site, DatabaseError tables not found; dbshell shows tables but apache can't find the database?

2013-06-08 Thread Brian Lee
y the page needed. However, when I do ./manage.py dbshell, all of my tables are there! Does anybody know why this sort of error might be happening? Thanks, Brian -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from

Re: On live site, DatabaseError tables not found; dbshell shows tables but apache can't find the database?

2013-06-08 Thread Brian Lee
cloned the database file along with the rest of the project from github at the start. (this process has worked for me before on other machines.) Thanks, Brian On Saturday, June 8, 2013 11:12:21 AM UTC-4, Sergiy Khohlov wrote: > > looks like you are using other settings.py for .wsgi

Keep Foreign Keys From Changing After Being Set

2013-06-08 Thread Brian Williams
So I have a model that looks somewhat like this: class ProductInfo(models.Model): manufacturer = models.ForeignKey product_type = models.ForeignKey product_name = models.ForeignKey sku = models.CharField(() -- You received this message because you are subscribed to the Google

How to Keep Foreign Keys from updating

2013-06-08 Thread Brian Williams
know of a good way to do it? Thanks Brian -- 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 g

Re: On live site, DatabaseError tables not found; dbshell shows tables but apache can't find the database?

2013-06-08 Thread Brian Lee
Seems like it was a path issue. I put in the full path to the sqlite3 database file in my database settings, and it works now. For future reference - how is ./manage.py's path set up, and how apache's wsgi path is set up? Thanks, Brian On Saturday, June 8, 2013 3:10:26 PM UTC-4, J

Re: a bit confused about projects/apps

2013-07-17 Thread Brian Schott
rebranded copies, so we have multiple project directories in our code tree, but each server is just one project. Don't forget, there are global things like user authentication you don't want to have a user have to login separately to go to blog.example.com from www.example.com. Bria

Re: dear someone,

2013-07-22 Thread Brian Schott
NAME (path to a database file) should include the filename, not just a directory. Try './mysite/mysite.db' for NAME. Brian On Jul 22, 2013, at 1:44 PM, Stian Sjøli wrote: > I am trying to start up with django using the tutorial on the website. I get > the following error &

Foreign key problems with legacy database

2013-07-22 Thread Brian Millham
I have these 2 models: class Requestlist(model.Model): -- 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

Foreign Key problems with legacy database

2013-07-22 Thread Brian Millham
I have the following models: class Requestlist(models.Model): >id = models.IntegerField(primary_key=True) >songid = models.Integerfield() >song = ForeignKey('Song', db_column='songid') > class Song(models.Model): > id = models.IntegerField(primary_key=True) > title = models.CharFie

Re: How to force modelForm.is_valid() to use a specific database?

2013-07-23 Thread Brian Millham
I've done that with this code: if form.is_valid(): > f = form.save(commit = False) > f.save(using='yourdatabase') Works fine for me. On Tuesday, July 23, 2013 1:21:29 PM UTC-4, Fellipe Henrique wrote: > > I have many database setted in my setting.py in my formModel, when I try > to vali

installing RemoteUserMiddleware causes errors

2013-07-29 Thread Brian Tingle
I keep getting 504 gateway timeout errors on http://code.djangoproject.com/ so I can't look through the tickets for this. There are some threads on this list that seem like they might be related; but I can't tell because they link to code.djangoproject.com which I can't get to. I tried to foll

Re: installing RemoteUserMiddleware causes errors

2013-07-29 Thread Brian Tingle
code.djangoproject.com is back up now; seems like I bumping up against this three year old bug that has not been updated in 19 months: https://code.djangoproject.com/ticket/13394 Any advice on how to handle this? Do I need to re-write all the tests? Does this mean RemoteUserMiddleware is not

django-popup-forms

2013-08-14 Thread Brian Millham
I'm looking for. It's a shame that the documentation with it doesn't show how to properly install it, and has no working examples with it. Brian -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group

Re: is it possible to use REST API with HTML within Django?

2013-08-15 Thread Brian Schott
calling AJAX from inside the browser, I recommend you check out: http://www.dajaxproject.com There are other tools, but it makes life easier. Brian Schott bfsch...@gmail.com On Aug 15, 2013, at 12:27 PM, evh wrote: > Hi, > > I am having trouble getting REST to work within Dja

Re: django-popup-forms

2013-08-15 Thread Brian Millham
; > > On Thu, Aug 15, 2013 at 2:41 AM, Brian Millham > > wrote: > >> I've been trying to use django-popup-forms, but with no success. Has >> anyone used this? >> >> I suspect that I didn't install it correctly. I just ran sudo python >> setup.py

Re: Django Periodic tasks

2013-08-16 Thread Brian Schott
Also, load the page with a busy animated gif and use something like dajaxice to fetch and replace the computed value.  Several examples and libraries out ther. — Sent from Mailbox for iPad On Fri, Aug 16, 2013 at 11:22 PM, Some Developer wrote: > On 17/08/13 03:43, Christophe Pettus wrote:

MySQL manage.py dbshell throwing error unknown variable 'character-set-server=utf8'

2013-08-24 Thread Brian Lee
So, my website, involving lots of database calls, works perfectly fine, even after a reboot. However, attempting to connect directly via dbshell results in this error: $ ./manage.py dbshell mysql: unknown variable 'character-set-server=utf8' Attempting to figure out my version of mysql also gav

Re: MySQL manage.py dbshell throwing error unknown variable 'character-set-server=utf8'

2013-08-24 Thread Brian Lee
# only contains [mysqld_safe]; syslog On Saturday, August 24, 2013 7:06:28 PM UTC-4, tom wrote: > > On Saturday, 24 August 2013, Brian Lee wrote: > >> So, my website, involving lots of database calls, works perfectly fine, >> even after a reboot. >> >> However, attem

Single form displayed multiple times on one page with different values.

2013-08-25 Thread Brian Millham
nk to the popup is clicked. (they are hidden until the link is clicked) And I'm avoiding the use of the javascript virus :-D Thanks for any pointers! Brian -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from

Connection Reset by Peer (104) on POST submission

2013-09-04 Thread Brian Henning
I am trying to deploy my Django site. On my development environment using runserver, everything works perfectly. After deploying to production with Apache and Passenger WSGI on a shared hosting environment, the majority of the site works correctly. However, I am having one issue that I am unable

integrity error with transaction middleware, django 1.3

2013-09-10 Thread Brian Craft
I'm getting duplicate entry integrity errors when saving an object, with transaction middleware enabled in django 1.3. I thought the point of the middleware was to rollback transaction errors and retry the view. Why would I be getting this error? The db is mysql. The save code looks like this: t

Re: Django 1.5 tutorial, part 1

2013-10-12 Thread Brian Schott
Polls not pools? — Sent from Mailbox for iPhone On Sat, Oct 12, 2013 at 12:58 PM, Enrico Battiston wrote: > Hi, i'm a first time user and i'm experiencing an error in the first part > of the django 1.5 tutorial. > At the "Activating models" paragraph when i execute the command line "*python >

ImproperlyConfigured DJANGO_SETTINGS_MODULE error when migrating from 1.5.1 to 1.6

2013-11-08 Thread Brian DeWeese
within the wsgi. But with 1.6 it does get referenced and therefore raises an ImproperlyConfigured error. Does anyone have any suggestions to help fix this issue? Is there anyway I can get the settings module to load before the wsgi module? Brian DeWeese -- apache.conf -- WSGIScriptAlias

Re: Streaming images with HttpResponse?

2013-11-18 Thread Brian Schott
What are you trying to do?  Typical approach would be to use Javascript to pull the images.  Take a look at dajaxice.   — Sent from Mailbox for iPhone On Mon, Nov 18, 2013 at 1:57 PM, Alex Karargyris wrote: > So thanks to Simon I was able to make this work. Here is the code for those > who m

Re: Using Q objects vs explicit filters

2011-04-13 Thread Brian Bouterse
Could you include the output to highlight the differences? Brian On Wed, Apr 13, 2011 at 9:32 AM, Gianluca Sforna wrote: > In writing a complex filter for an application, I've found a different > behavior between a filter like: > Model.objects.exclude(filter1, filter2) &g

Re: base.html (extended by others) has to be in project (not app) root?

2011-04-15 Thread Brian Neal
On Apr 15, 2:23 pm, Jeff Blaine wrote: > Thank you all.  I will digest the replies when I have the time to properly > focus back on the issue (it's obviously small, since I have a workaround in > place by shoving base.html into the project root). > > It still, regardless of solutions, even in ligh

object with version

2011-04-21 Thread Brian Craft
I need to create objects with version tracking, a bit like wiki content. Anyone done this in django? I could create a model with a content field and a version field. But I'm not sure how to query (for example) all the latest versions of a set of objects. I'm sure there's a raw sql method via joins

Re: The import staticfiles_urlpatterns is not working in django 1.3

2011-04-21 Thread Brian Neal
On Apr 21, 12:48 pm, Guevara wrote: > Hello! > My project is failing to import the staticfiles_urlpatterns, using > Eclipse Helios: > > urls.py > > import from django.contrib.staticfiles.urls staticfiles_urlpatterns > > In django 1.3 I already have: > > INSTALLED_APPS = ( > 'django.contrib.staticf

Re: Extremely Frustrated

2011-04-28 Thread Brian Bouterse
net/htmldoc/options.html#'list'> . Brian On Thu, Apr 28, 2011 at 4:50 AM, Tom Evans wrote: > On Thu, Apr 28, 2011 at 8:47 AM, Kenneth Gonsalves > wrote: > > On Thu, 2011-04-28 at 00:27 -0700, Derek wrote: > >> A good IDE will convert tabs to spaces for you..

form CharField null vs blank

2011-04-28 Thread Brian Craft
A form with a CharField seems to end up with a zero-length string in the cleaned_data if the field is not in the form data. Is there any good way to avoid this? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: ANN: DSE v2.0.0-Beta - DSE uses 1.8% of the time compared to the Django ORM updating 100.000 records.

2011-05-03 Thread Brian Bouterse
This would have been so useful on my last project. 14.4 Million records took a couple of days with a single thread using the ORM. This would have really sped things up. Brian On Tue, May 3, 2011 at 7:50 AM, Thomas Weholt wrote: > Inserting, updating or deleting lots of records using

Re: ANN: DSE v2.0.0-Beta - DSE uses 1.8% of the time compared to the Django ORM updating 100.000 records.

2011-05-03 Thread Brian Bouterse
I will definitely be using this next time. Nice post. Brian On Tue, May 3, 2011 at 5:50 PM, Thomas Weholt wrote: > Hi, > > Just posted a new blog about more realistic performance of DSE against > a real database. Head over to http://weholt.blogspot.com/ to read it. > > Thanks

Re: Multiple SQLITE databases vs one BIG PostgreSQL database

2011-05-04 Thread Brian Bouterse
complicated and closed. Best, Brian On Wed, May 4, 2011 at 6:32 AM, VoodooH wrote: > Hello guys, > > We currently have a desktop software that uses a sqlite embedded > database. We are now gonna develop the online version for our software > and we need your opinion on these matter

Re: Multiple SQLITE databases vs one BIG PostgreSQL database

2011-05-04 Thread Brian Bouterse
g to write something to allow all data to be moved back and forth. It sounds like you have a data sync service. Any thoughts on open sourcing that code? Anyone else know of a project that already does this? Thanks, Brian On Wed, May 4, 2011 at 9:02 AM, David Goehrig wrote: > I'd r

Re: stop repetition in template

2011-05-04 Thread Brian Bouterse
structure dynamically in the view code without explicitly pre-defining it as a class or model. Hope this helps. Brian On Wed, May 4, 2011 at 12:42 PM, pankaj sharma wrote: > hello friends, > i have database of colleges. > i want to show all cities > > so what is did is.

Re: stop repetition in template

2011-05-04 Thread Brian Bouterse
I like your second solution a lot better than mine. I've never seen {% ifchanged %} used properly before. Brian On Wed, May 4, 2011 at 1:19 PM, Javier Guerra Giraldez wrote: > On Wed, May 4, 2011 at 11:42 AM, pankaj sharma > wrote: > > in template.. > > > >

Re: Best practice for async task in django?

2011-05-06 Thread Brian Bouterse
AMQP is not too heavy weight for me. +1 for Celery and RabbitMQ. Brian 2011/5/6 λq > Thanks guys. > > Is AMQP a bit too heavy weight? > > Besides celery, are there any realworld in-production usage of > Django+ZeroMQ? > > Is django-ztask stable? > > On Fri,

Re: Encrpting urls to hide PKs

2011-05-09 Thread Brian Bouterse
r-side state machine that ensures what a user can and can't do with the application from a given state. This is not exactly what is being discussed here, but it is near it in topic, so I thought I would mention it. Brian On Mon, May 9, 2011 at 8:59 AM, Cal Leeming [Simplicity Media Ltd]

unit testing and file location

2011-05-10 Thread Brian Craft
I would like unit tests that do file manipulations to run with a different storage "location", so they're not manipulating real app files. Is there a good way to do this? Is there a way to override model field initializers, so I can instance a model, passing in the 'storage' parameter for an ImageF

imagefield upload_to

2011-05-11 Thread Brian Craft
I have a model with an imagefield, and some fields that are computed from the image. I'm trying to override the "save" method to fill in the other fields. When I test this in the admin, there are two problems: first, the path (mymodel.image.path) doesn't honor the upload_to setting on the field. I

Re: imagefield upload_to

2011-05-11 Thread Brian Craft
solved this by moving it to the model clean() method, and using imagefield.file.open() and imagefield.file.read() to get the data for computing the other fields. On Wed, May 11, 2011 at 1:28 PM, Brian Craft wrote: > I have a model with an imagefield, and some fields that are computed > fr

Re: How to choose a license for an app or a project?

2011-05-13 Thread Brian Bouterse
in an awesome way, and since I never distribute it I never have to share my derivative changes thereby preventing the GPL project from benefitting from my extensions. That is a pretty easy way to sidestep any of these licenses. Brian On Fri, May 13, 2011 at 7:58 AM, Alistair Grant wrote: > It w

Re: New Django Profiling application

2011-05-13 Thread Brian Bouterse
com/dcramer/django-sentry>. You're idea sounds great and needed, I just want to encourage you to make sure you're adding to the community, not re-inventing existing solutions. Best, Brian On Thu, May 12, 2011 at 11:44 PM, Adrien LEMAIRE < adrien.lema...@aquasys.co.jp> wrote: >

Re: New Django Profiling application

2011-05-13 Thread Brian Bouterse
ave an app that does very similar functionality to the functionality discussed. Hope that clears up any confusion. Brian On Fri, May 13, 2011 at 10:20 AM, Xavier Ordoquy wrote: > > On May 13, 9:34 pm, Brian Bouterse wrote: > >> Go for it! > >> > >> I know the dis

default group for new users

2011-05-17 Thread Brian Craft
Is there a good way to add new users to a default group when they are created (e.g. via django-registration)? I just tried binding the post_save signal for User, and adding the group in the signal handler (if "created" is true). However, I haven't found a good place (file) to put the connect() call

Re: default group for new users

2011-05-17 Thread Brian Craft
project __init__.py, but that works inconsistently, apparently because django isn't fully initialized when the project __init__.py is loaded. On Tue, May 17, 2011 at 11:07 AM, Brian Craft wrote: > Is there a good way to add new users to a default group when they are > created (e.g. vi

TemplateView and dynamic template_name in urlconf

2011-05-17 Thread Brian Morton
I have a generic view that accepts its template_name attribute from the urlconf dynamic variable: (r'^(?P[^/]+)$', TemplateView.as_view()), But I get an exception: TemplateResponseMixin requires either a definition of 'template_name' or an implementation of 'get_template_names()' I've read the c

<    3   4   5   6   7   8   9   10   >