Re: What JavaScript framework do you use and why?

2009-09-23 Thread Brian McKeever
Dojango seems really helpful. Thanks. On Sep 23, 8:40 pm, Ovnicraft wrote: > 2009/9/23 Brian McKeever > > > > > I just decided to learn to use dojo yesterday. > > I chose it because it has a huge library of GUI widgets that are all > > suppose to be accessib

Re: Django + QT4

2009-09-23 Thread Brian McKeever
> So, I thing to use django with python + pyqt/pygtk/wxpython for database > management. > > Thanks Brian! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this gr

Re: Windows compatible?

2009-09-23 Thread Brian McKeever
Python is inherently cross-platform, so you just need the same version as everyone else. On Sep 23, 9:32 pm, Tim wrote: > Is there a Windows version of Django? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

Re: limiting the scope of a ForeignKey relation to within a model?

2009-09-23 Thread Brian McKeever
The docs say that it's possible although unrecommended to use choices dynamically. http://docs.djangoproject.com/en/dev/ref/models/fields/#choices However, you could easily do it at the form level or with a custom setter method. On Sep 20, 4:57 pm, Doug wrote: > Lets say for instance that I hav

Re: FormWizard and form data

2009-09-23 Thread Brian McKeever
I would try creating a view that uses a form factory to define some dynamic forms. This post explains how to create a dynamic form factory: http://www.b-list.org/weblog/2008/nov/09/dynamic-forms/ and then I'd return the Wizard that has the new forms as arguments. I bet it would work, but I haven

Re: Limiting queryset on ModelAdmin based on date field

2009-09-23 Thread Brian McKeever
I'm not too familiar with customizing the admin, but you want to use the range field lookup. http://docs.djangoproject.com/en/dev/ref/models/querysets/#range On Sep 23, 11:07 pm, Alvaro Mouriño wrote: > Hi list. > > I'm developing a news application that handles articles, about 10 new > article

Re: Retrieving the request URI inside the view function?

2009-09-24 Thread Brian McKeever
I imagine request.path would do what you want: http://docs.djangoproject.com/en/dev/ref/request-response/#attributes On Sep 24, 10:37 am, Christophe Pettus wrote: > My apologies, because I am certain that this is documented somewhere,   > but I cannot seem to find it. > > Within my view function

Re: is this a sane way to show total number of objects in pagination?

2009-09-24 Thread Brian McKeever
.count is definitely the way to go. Although, I would probably pass it to your template instead of determining it there. On Sep 24, 10:32 am, Chris Withers wrote: > Chris Withers wrote: > >      objects = model.objects.all() > >      paginator = Paginator(objects,10) > >      return render_to_re

Re: django template tag truncatewords_html, detect whether it truncated or not

2009-09-24 Thread Brian McKeever
I think you'll have to write a custom template tag: http://docs.djangoproject.com/en/dev/howto/custom-template-tags/#parsing-until-another-block-tag-and-saving-contents On Sep 24, 10:56 am, J wrote: > Hello, > > How can I detect whether the template tag truncatewords_html has > truncated the htm

Re: TemplateSyntaxError: VariableDoesNotExist

2009-09-24 Thread Brian McKeever
I would write a custom tag that wraps ugettext but checks for None. http://docs.djangoproject.com/en/dev/howto/custom-template-tags/#writing-custom-template-filters http://docs.djangoproject.com/en/dev/topics/i18n/#standard-translation On Sep 24, 10:14 am, Florian Schweikert wrote: > Hello, > >

Re: Design question

2009-09-24 Thread Brian McKeever
realistic possibility? Should companies be treated differently from users? I'd say no to both, but my blog application may differ from yours. On Sep 24, 9:37 am, ringemup wrote: > So the tighter coupling implied by each entry knowing about the user > profile shouldn't be a subj

Re: How to update a ManyToManyField in a model's custom save method

2009-09-24 Thread Brian McKeever
The presave signal passes the instance of the updated object to the signal automatically, so your code should work with minimal modifications. Try this: from django.db.models.signals import post_save def member_check(sender, **kwargs): if Project.objects.filter(id__exact=self.id).count():

Re: is this a sane way to show total number of objects in pagination?

2009-09-25 Thread Brian McKeever
Withers wrote: > Brian McKeever wrote: > > .count is definitely the way to go. Although, I would probably pass it > > to your template instead of determining it there. > > What difference does it make? > > Chris > > -- > Simplistix - Content Management,

Re: is this a sane way to show total number of objects in pagination?

2009-09-25 Thread Brian McKeever
y...", so he may have been > implying that there was a technical reason but most likely he was just > stating his preference. > > On Sep 25, 5:03 am, Chris Withers wrote: > > > Jani Tiainen wrote: > > > Chris Withers kirjoitti: > > >> Brian McKeever wrot

Re: are django applications portable?

2009-09-25 Thread Brian McKeever
I'm not familiar with the plugin, but I would guess that it's trying to add itself to the python path. That way it's easily available for any django project without having to include it in an individual project. I would bet that it'd work just fine included manually in your project without runnin

Re: Error Message regarding len()

2009-09-25 Thread Brian McKeever
A stack trace would be more useful. On Sep 25, 12:07 pm, Nick wrote: > I'm using the django-storages backends from David Larlet to upload > images to s3 from inside the admin.  When i try to run everything I > get an error: > > object of type 'NoneType' has no len() > > Here is my model: > > fro

Re: Error Message regarding len()

2009-09-25 Thread Brian McKeever
_header(final_headers, method, > bucket, key, query_args) > File "c:\python25\lib\site-packages\django_storages-1.0-py2.5.egg > \S3.py" in _add_aws_auth_header >   299.             "AWS %s:%s" % (self.aws_access_key_id, encode > (self.aws_secret_access_key, c_strin

Re: redirect to enter page

2009-09-26 Thread Brian McKeever
This should do what you want: http://docs.djangoproject.com/en/dev/topics/auth/#django.contrib.auth.decorators.permission_required On Sep 25, 2:35 pm, Dan Cox wrote: > Django Users, > > I'm pretty new to django so please excuse my ignorance. > > I'd like to redirect users to an "enter" page no m

inspectdb generates CharFields with 3x max_length

2009-10-09 Thread Brian Morton
This is a very strange problem, so I thought I would post here and see if anyone else had seen this problem. I introspected a MySQL database with Python2.6 using Django SVN HEAD and it produced my models as expected. However, all CharFields have the max_length set to 3x the actual varchar field

Re: inspectdb generates CharFields with 3x max_length

2009-10-09 Thread Brian Morton
log for MySQLdb and post here and in the ticket if I can figure anything out. On Oct 9, 2:18 pm, Karen Tracey wrote: > On Fri, Oct 9, 2009 at 12:40 PM, Brian Morton wrote: > > > This is a very strange problem, so I thought I would post here and see > > if anyone else had seen thi

Re: best way to build a form for m2m-related models (via intermediary table)?

2009-10-11 Thread Brian McKeever
"Does it make sense to include the fields of both models into the same form?" Models represent how a computer stores your data in a database. Forms allow humans to input data into your database. Ideally, the two would be the same. Realistically, humans and computers think quite differently and d

Re: required fields during object instantiation

2009-10-11 Thread Brian McKeever
It may make debugging a little harder, but it gives you a lot more flexibility in constructing objects. Here's a factoryish method I wrote for testing: def create_teacher(textbook = None, user = None, start_state = None,

Re: Automatic user association, and confirmation page

2009-10-11 Thread Brian McKeever
Is there a reason why you're storing an email address instead of just selecting the user or creating a new one? On Oct 10, 12:41 am, Andrew Pendleton wrote: > I'm trying to figure out the best way to add an email address form > field to the edit page for a model in the Django admin, and, upon >

Re: Showing unescaped HTML in Admin pages

2009-10-12 Thread Brian Neal
On Oct 12, 11:15 am, "ruidevie...@googlemail.com" wrote: > Hi everyone, > > Is is possible to render unescaped HTML in admin pages? > Does this help? Start here: http://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.list_display and then search for allow_tags.

Re: showing user data in a view

2009-10-12 Thread Brian McKeever
The easy way is to just check that the owner of X is the user logged in. I don't know that you can pass an argument to the decorator, but you could certainly just use an if statement. http://docs.djangoproject.com/en/dev/topics/auth/#limiting-access-to-logged-in-users-that-pass-a-test On Oct 12,

Re: showing user data in a view

2009-10-12 Thread Brian McKeever
ssage- > From: django-users@googlegroups.com [mailto:django-us...@googlegroups.com] > > On Behalf Of Brian McKeever > Sent: October-12-09 11:52 AM > To: Django users > Subject: Re: showing user data in a view > > The easy way is to just check that the owner of X is the u

Re: showing user data in a view

2009-10-12 Thread Brian McKeever
51 pm, "Ed Kawas" wrote: > Ah, so there is no way to use 'create_object' when doing this, right? > > Thank you, > > Eddie > > -Original Message- > From: django-users@googlegroups.com [mailto:django-us...@googlegroups.com] > > On Behalf Of Bria

Re: Check Constrains in Django

2009-10-13 Thread Brian McKeever
Are you asking about the technical details of how it's done, or just how to do it? If the latter, django uses field and form level validation. http://docs.djangoproject.com/en/dev/ref/models/fields/#field-options http://docs.djangoproject.com/en/dev/ref/forms/fields/#ref-forms-fields On Oct 13

Does anyone know what happened to djangopluggables.com?

2009-10-21 Thread Brian McKeever
It's been giving me a "502 Bad Gateway nginx" for at least a couple weeks now. Are there any other good sources of django plugins? I know of the official python packages: http://pypi.python.org/pypi?%3Aaction=browse and django snippets: http://www.djangosnippets.org/ --~--~-~--~~-

Debugging SQL Queries: Correlating with Python Code

2009-10-22 Thread Brian Neal
Currently I am keeping an eye on SQL queries by displaying at the bottom of my base template sql_queries. I'm seeing some queries that look kind of strange to me, and I was wondering if there was a way to somehow correlate the queries with my app's Python code. For example, amongst the SQL querie

Re: How to lay out multiple apps sharing the same model? (newcomer)

2009-10-27 Thread Brian McKeever
Generally, I'd create a different app for different functionality. IE one for authentication related stuff, another for the forum, another specific to the website. It's really a matter of style though. You can put the model definitions most anywhere. You might want to check out the sites framewo

Re: generic views 404 error

2009-10-27 Thread Brian McKeever
More info is needed. Could you post your urls? On Oct 25, 8:39 pm, Ross wrote: > I just neared the end of the poll application and converted everything > to generic views according to the tutorial. Once I started up the > server though, I could only find my admin page. I tried using the > newly

Re: how to exclude DateTime that are None

2009-11-02 Thread Brian Neal
On Nov 2, 3:44 pm, Felipe Reyes wrote: > Hi everybody, > > I'm using django 0.96, one of my models has a DateTimeField, I'm > trying to exclude the from the queryset the rows that have null in the > datetimefield, I'm using something like this: > > MyObject.objects.exclude(somedatecol=None) I th

Re: Autocomplete tags for django-tagging

2009-11-03 Thread Brian Jiang
Thanks for sharing! On Nov 3, 8:35 pm, Ludwik Trammer wrote: > Hi, > > I'm creating my first django powered website for a client. He > requested tags autocomplition in Django Admin. I created a small > reusable app that plugs into django-tagging and provides a form widget > that does exactly th

Re: GenericForeignKey with content_type in a related model ???

2009-11-05 Thread Brian McKeever
Why do you want to split it across two models? On Nov 5, 9:25 am, bruno desthuilliers wrote: > Hi all > > I have this pattern: > > class ModelOne(models): >     content_type = models.ForeignKey(ContentType) > > class ModelTwo(models): >     model_one = models.ForeignKey(ModelOne) >     object_id

Re: datetime problems with Django application

2009-11-10 Thread Brian Chapman
There may be another application setting the time zone, but my question still remains as to why the admin page is getting the correct time but the view is not. Brian On Tue, Nov 10, 2009 at 7:45 PM, Graham Dumpleton < graham.dumple...@gmail.com> wrote: > > > > On Nov 11, 10

Re: datetime problems with Django application

2009-11-11 Thread Brian Chapman
7;m on the same track your suggesting. Still confused by the difference between view and admin. Thanks for your feedback. Brian On Wed, Nov 11, 2009 at 12:22 PM, David De La Harpe Golden < david.delaharpe.gol...@ichec.ie> wrote: > > BEC wrote: > > > Any idea on what is going on

Re: datetime problems with Django application

2009-11-11 Thread Brian Neal
On Nov 10, 5:41 pm, BEC wrote: > I have a Django application running with mod_python on Apache. In > settings.py I have set TIME_ZONE="America/New_York". Within my > application I verify that os.environ['TZ'] is indeed set to this > value. Within my view.py I use datetime.datetime.now() to create

Re: Use Subversion to Download the Latest Django Version

2009-11-17 Thread Brian Neal
On Nov 17, 12:05 pm, Angel Cruz wrote: > So it seems TortoiseSVN does not include svn.exe? No, it doesn't. > > You need to install Subversion packaging then > No, he doesn't have to. He's got TortoiseSVN, which is a GUI for svn. He can checkout Django by creating a new folder, opening it, then

Re: Django website stats

2009-11-19 Thread Brian McKeever
I haven't had a chance to play with this yet: http://code.google.com/p/django-tracking/ but it might do what you want. On Nov 19, 11:35 am, Fabio Natali wrote: > Martin Lundberg wrote: > > I am very new to Django but can't this be handled by middleware > > instead? It should have access to user a

Adding a dashboard to admin

2009-11-30 Thread Brian Neal
On my site, users submit content that needs to be approved before getting published. Thus I wanted a simple "dashboard" on the admin page to show me how many pending items from each model are waiting for approval. I created a template tag for the dashboard. I then mulled my options for getting this

Re: Adding a dashboard to admin

2009-12-01 Thread Brian Neal
On Dec 1, 10:56 am, Bill Freeman wrote: > > I then created my own template file in one of my TEMPLATE_DIRS called > > 'admin/custom_index.html" that extends 'admin/index.html'. I ended up > > copying the {% block content %} from the admin/index.html and > > inserting my template tag into it. > > I

Re: overridden delete method not being called on cascade

2009-12-03 Thread Brian Neal
On Dec 3, 12:53 pm, "eric.frederich" wrote: > ... > > The problem now it that when I delete an Offering object through the > Django admin it cascade deletes the Enrollment objects as it should > but it is not calling the delete method and thus restoring their > interest. > > When deleting an Enrol

Re: How to show site down for maintenance page

2009-12-05 Thread Brian Neal
On Dec 5, 6:54 pm, zweb wrote: > What is the best way to show site down for maintenance page ? If you are using mod_wsgi: http://www.caktusgroup.com/blog/2009/05/25/seamlessly-switch-off-and-on-a-django-or-other-wsgi-site-for-upgrades/ -- You received this message because you are subscribed to

Re: settings.TIME_ZONE

2009-12-06 Thread Brian Neal
On Dec 6, 7:40 pm, XtraGreen wrote: > I've changed settings.TIME_ZONE to 'UTC' and restarted my server but > when I create records (postgresql) they're not UTC, they're 'America/ > Chicago' (-6) in the table. > > Am I missing something or is settings.TIME_ZONE useless? What is your server setup?

Re: Pydev + Django + Ubuntu 9.10

2009-12-06 Thread Brian McKeever
I was having the same trouble you are when I installed eclipse from the repository. I fixed it by downloading it again from the website http://www.eclipse.org/downloads/ (Eclipse IDE for C/C++ Developers (79 MB) is the one I picked specifically). On Dec 6, 2:45 am, turkan wrote: > Hello Liam, >

Re: Pydev + Django + Ubuntu 9.10

2009-12-07 Thread Brian McKeever
html On Dec 7, 8:17 am, turkan wrote: > Hello Brian. > > Strange, I am also using Eclipse downloaded from eclipse.org. Did you > add any special folders to the PYTHONPATH? Are you using django from > the Ubuntu repositories? > > On Dec 7, 6:06 am, Brian McKeever wrote: >

Re: HTML text editing

2009-12-11 Thread Brian McKeever
I wrote a html whitelist filter that only allows predefined tags, and runs however many filters you want to specify on it. I'd be curious what you guys thought about it. http://sourceforge.net/projects/htmlfilterfacto/ On Dec 11, 2:51 pm, Shawn Milochik wrote: > Look at safestring. > > from dja

Re: {{ form.as_table }} not displaying in template

2009-12-12 Thread Brian Neal
On Dec 12, 5:04 pm, GoSantoni wrote: > Hey i've got a very basic question about django form processing. Got > haystack installed and searching works fine in the standard search > template (http://haystacksearch.org/docs/tutorial.html#search- > template) in the /search . Though i want to use the se

Save file object to FileField

2009-12-14 Thread Brian S
object: type(anotherinstance.resultFile) >> ...So I'm assuming I need to construct a FieldFile object from my file object, then assign that to mymodelinstance.resultFile and then save (), but I'd like to make sure this is the preferred approach before going forward. Thanks. Brian

Re: Cron vs event triggered action

2009-12-14 Thread Brian Neal
On Dec 14, 12:27 pm, Tim Daniel wrote: > ... > > Creecode what do you mean with "custom management commands"? I just > wrote a simple python script that can be called from bash like this > python myscript.py, inside it I set up the enviroment to be able to > call my models and perform actions usin

Re: Save file object to FileField

2009-12-17 Thread Brian S
I found the answer in this discussion: http://groups.google.com/group/django-users/browse_frm/thread/184e5e09db1efce4/7816cbc650d8dc77 Pass in the filename and content to the FileField's save() method directly, rather than using the model instance's save() method. On Dec 14, 2:24 p

Re: Humble-structure sites on Django // Suggestion needed

2009-12-19 Thread Brian McKeever
I'm not sure I'm entirely understanding your question, but yes, that does look easy to implement with django. What part is troubling you? You seem to have a good idea of what you want. On Dec 17, 6:42 am, tezro wrote: > Hello everyone. Making well-structured websites on Django is a very > compre

Re: very noob : DRY violation in views.py

2009-12-19 Thread Brian Victor
e(template): property = Property.objects.all().order_by('name')[:4] city = City.objects.all() category=PropertyCategory.objects.all() status=PropertyStatus.objects.all() return render_to_response(template,{'property': property, 'city'

Re: Humble-structure sites on Django // Suggestion needed

2009-12-20 Thread Brian McKeever
e how to write models for such a small yet > compound structure. > > How do I make, say, the first and second pages (about and contacs) > with some different fields? I will reproduce the method for all other > pages and repost here or question it again. > > On Dec 19, 1

Re: Overhead of using django.contrib.markup vs. pre-rendered HTML field

2009-12-21 Thread Brian Neal
On Dec 21, 7:12 am, Jesaja Everling wrote: > Hi All! > > I'm wondering how expensive it is in terms of processing power to use > the django.contrib.markup filters for displaying blog posts instead of > storing pre-rendered HTML in a db field. > The Pinax blog application makes use of these markup-

Re: Baffled by self.client.login(...) not working in unit tests

2010-04-19 Thread Brian McKeever
I'm having the same problem. None of my tests are able to log in on this computer. Here's an example: def test_bug(self): response = self.client.get(reverse('home')) self.assertRedirects(response, 'accounts/login/?next=/home/', 302, 200) bob = User( use

Re: Baffled by self.client.login(...) not working in unit tests

2010-04-19 Thread Brian McKeever
I fixed it by uninstalling Python 2.6.5 and installing 2.6.4 instead. On Apr 19, 8:44 pm, Brian McKeever wrote: > I'm having the same problem. None of my tests are able to log in on > this computer. > > Here's an example: > >     def test_bug(self): >         res

Re: Interesting Django or Python Issue

2010-04-28 Thread Brian Morton
Can we see some code? The description of what you're doing sounds just fine, so that leaves open the possibility of a technical error. On Apr 28, 7:42 am, Sam Lai wrote: > Maybe database connections aren't closing properly? Don't know where > to start looking though. > > A few weeks ago, I saw s

Re: No stylesheet in administration panel

2010-05-18 Thread Brian Neal
On May 18, 10:47 am, Carlo Trimarchi wrote: > Hi, > I'm following the django tutorial to build the poll application. I'm > working mostly on a remote server (using wsgi), but I'm also trying > stuff on my local machine, just running the manage.py runserver > command. > I've just enabled the admin

Re: insert html in html

2010-05-18 Thread Brian Neal
On May 18, 2:00 pm, CrabbyPete wrote: > I want to insert a html calendar into an existing web page. What is > the best way to insert html into a template that I have for the web > page? In what form do you have this calendar HTML? Do you compute it in a view? Is it already in a file? If you have

Re: ajax setup

2010-05-18 Thread Brian Neal
On May 18, 9:57 am, Matt W wrote: > Hello Everyone, > > I just started to use Django and I was wondering how I could setup > javascipt (AJAX to be more specfic) in my djagno project in order to > run a script. Here is the script code. > [snip] > > In specific I was wondering where I place the sour

Re: List of Users online

2010-05-19 Thread Brian Neal
On May 19, 12:31 pm, EmileZola wrote: > I want to list the logged in users on my index page and was wondering > what was the right way to do this. > > Can I do it similar to this ? > def index(request): >     return render_to_response('index.html', { >         'online_users': User.objects.filter(l

Re: Turning "DEPUG=False" results in missing CSS

2010-05-25 Thread Brian Neal
On May 25, 2:51 pm, tom wrote: > Hi, > > I have currently built a website with Django. After developing > everything locally with "python manage.py runserver", I have switched > for testing to Apache and mod_python. > > Everything worked fine there as well. All pages are rendered correctly > (PS:

How do you handle broken tests from plug-ins?

2010-05-28 Thread Brian McKeever
I'm using Django-registration and Django-invitation. They both work on my website, but they both come with tests that fail. I don't think the tests are failing because the plug-ins don't work. I think they're failing due to different testing environments. Django- registration in particular gives m

media files

2010-06-01 Thread Brian May
lace the "copy" operation with something that compresses Javascript/css code making download times faster. I can't help but think that requiring every project come up with their own solution is bad for code re-usability. As much as I like D Comments? Suggestions? Thanks! Brian M

Re: AJAX request does not seem to have request.user

2010-06-02 Thread Brian Neal
On Jun 2, 10:14 am, Carl Nobile wrote: > > Could the new code not work with a class. I'm still looking into this > and may discover the answer myself, but if anybody knows or has an > idea I'd be much appreciative. > > ~Carl Carl, those decorators no longer work on class methods without some re-

Django Debug Toolbar -- getting 404s for javascript file when using request.GET in SHOW_TOOLBAR_CALLBACK

2010-06-09 Thread Brian S
I am using the Django Debug Toolbar and getting some odd results with a custom SHOW_TOOLBAR_CALLBACK. I have added the debug toolbar to my INSTALLED_APPS and MIDDLEWARE_CLASSES, per the install instructions, and using the defaults, everything works fine. But instead of always showing the toolbar wh

Chicago Python User Group: Customize Django Admin

2010-06-10 Thread Brian Ray
Hello: I will be presenting tonight at ChiPy http://chipy.org If anyone is around Chicago tonight, feel free to stop in. Here is the official announcement http://mail.python.org/pipermail/chicago/2010-June/006863.html thanks, Brian Ray http://twitter.com/brianray -- You received this message

Re: Selling Django

2010-06-18 Thread Brian Rosner
drops in activity. I use it everyday and am constantly thinking of things to do to improve it. Activity will pick up over time. There has been a ton of changes since 0.7. See http://github.com/pinax/pinax/compare/0.7.X...master (Github won't even load the full list since it so big :-) ) B

Re: Log errors to file

2010-07-07 Thread Brian Neal
On Jul 7, 4:35 pm, Jonathan Hayward wrote: > I'm working on a view made to output JSON for Ajax use. My log has: > > [07/Jul/2010 17:47:13] "POST /ajax/login HTTP/1.1" 500 50678 > > That looks like Django gave a helpful and detailed stacktrace page, albeit > to jQuery expecting JSON. If there is

Re: broken default view of the django admin site

2010-07-15 Thread Brian Neal
On Jul 15, 2:05 pm, Colleen A Josephson wrote: > Hello, > > I'm very new to django. I just set up my first site using apache and mod_wsgi. > > The admin area does not seem to have the nice, neat blue default theme...its > horrifically ugly and difficult to navigate. > Here's a screenshot of the

Re: python manage.py runserver - can't see error stack traces when an Ajax handler throws an exception

2010-09-08 Thread Brian Neal
On Sep 7, 5:10 pm, Phlip wrote: > [...] > > How do I get Ajax errors to print a simple exception trace to STDOUT, > instead of going through all that baloney? > Firebug can display these Ajax errors quite easily and give you a lot more information. -BN -- You received this message because you

Re: Please wait page trouble

2010-09-08 Thread Brian Neal
On Sep 8, 5:56 pm, Bradley Hintze wrote: > This is what I have in my please_wait.html > > src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js";> > $.getJSON('{% url run_DHM %}')}); > > I

Re: Overridden Model __init__ being called twice

2010-09-09 Thread Brian Bouterse
ween the two times it is loaded besides using inspect*? Also, why doesn't the formset formation use the already instantiated model object? Brian On Thu, Sep 9, 2010 at 3:42 PM, akaariai wrote: > On 9 syys, 20:06, bmbouter wrote: > > I have a model defined named OrderOpp

Re: PayPAL-IPN-request doesn't call the view

2010-09-10 Thread Brian Neal
On Sep 10, 12:01 pm, Bill Freeman wrote: > > My advice is to protect everything with try or by using get, > log your progress (we had a logging model, but you can > also append to a file, wrapping everything in a try-finally > that closes the filehandle to be sure things get flushed > out), and wh

Re: Launching Background Processes from a View

2010-09-16 Thread Brian Bouterse
ackground. The terminal equivalent would be: > > > > > > > "nohup &" and return control to the view. > > > > > > > Any ideas on how to achieve this? > > > > > > if this already works in a shell is there some reason why

Re: How to clear wrong form data (e.g password field), but still show error?

2010-09-16 Thread Brian Neal
On Sep 16, 7:37 pm, Karen Tracey wrote: > > Use this widget for the field: > > http://docs.djangoproject.com/en/1.2/ref/forms/widgets/#django.forms > > with render_value=False > Note that the docs indicate the default value for render_value is True but in the code it is False: http://code.dja

Re: How to clear wrong form data (e.g password field), but still show error?

2010-09-16 Thread Brian Neal
On Sep 16, 9:55 pm, Brian Neal wrote: > On Sep 16, 7:37 pm, Karen Tracey wrote: > > > Use this widget for the field: > > >http://docs.djangoproject.com/en/1.2/ref/forms/widgets/#django.forms > > > with render_value=False > > Note that the docs indicate t

Re: REST XML + HTML API suggestions

2010-09-21 Thread Brian Bouterse
recommend using an xml processing/generating library. Brian On Tue, Sep 21, 2010 at 1:39 AM, Brendon wrote: > Hi all, > > I want to use DJango to implement an XML based RESTful API and a > website together using DJango. I am wondering if anyone here is aware > of any tutor

Re: urls.py best practices

2010-09-22 Thread Brian Bouterse
seful, more straightforward URI. It would look more like: Method Type:URI GET PUT POST DELETE There are also some challenges when implementing REST too, but I just wanted you to be aware of it. Br

Re: Relationship between multiple sites & projects, apps

2010-09-23 Thread Brian Bouterse
at others think about these things Brian On Thu, Sep 23, 2010 at 5:00 AM, Benedict Verheyen < benedict.verhe...@gmail.com> wrote: > Hi, > > > it's not exactly clear to me how the sites, projects and apps need to be > structured. > > For instance, if you have 2 sites bot

Re: form validation for empty checkboxes that are not required (and they are the only fields present)

2010-09-28 Thread Brian Neal
On Sep 27, 11:35 am, Skylar Saveland wrote: > I have some modelforms within a .  Each form has one > checkboxselectmultiple that is not required.  If I post nothing (all > checkboxes are empty) then all of the forms are invalid.  If I post > anything then all of the forms are valid.  This anything

Re: django graphs

2010-10-06 Thread Brian Bouterse
I've used the google-chartwrapper<http://code.google.com/p/google-chartwrapper/>with some success, maybe they have a chart type that would work for you. It has support for the Django template language seen here<http://code.google.com/p/google-chartwrapper/wiki/TemplatingLanguages&g

Re: Django structure and git as VCS

2010-10-07 Thread Brian Bouterse
s<http://github.com/bmbouter/opus>to deploy them onto our servers since it is connected to the app repository where their apps are published Opus provides a self service deployment interface. You can even test your deployments on our sandbox servers<https://sandbox.opus.ncsu.edu/> . Br

Re: What is the best way to implement time-based / cronjob actions in a Django app?

2010-10-13 Thread Brian Bouterse
You really should take a look at django-celery<http://celeryq.org/docs/django-celery/getting-started/first-steps-with-django.html>. It is the right tool for this job IMHO. Brian On Wed, Oct 13, 2010 at 7:38 AM, Mattias Linnap wrote: > Hi Django users, > > I'm building

Re: HTTP load testing tools?

2010-10-13 Thread Brian Bouterse
I have used Tsung <http://tsung.erlang-projects.org/> before, and liked it. It's written in erlang so it's natively distributed which means with a cluster of machines you can generate a LOT of traffic. ;-) Brian On Wed, Oct 13, 2010 at 4:17 AM, Chris Withers wrote: > Hey a

Re: What is the best way to implement time-based / cronjob actions in a Django app?

2010-10-13 Thread Brian Bouterse
it's such a single-point solution that it is fragile over time because folks forget about it, and it has a single point of failure. my 2 cents. Brian 2010/10/13 Ethan Poole > Another technique, that I feel should be pointed out, is a custom > django-admin command: > http://docs.d

Re: What is the best way to implement time-based / cronjob actions in a Django app?

2010-10-13 Thread Brian Bouterse
s/django-celery/getting-started/first-steps-with-django.html#running-the-celery-worker-server> 7) Define and execute a task. try these<http://celeryq.org/docs/django-celery/getting-started/first-steps-with-django.html#defining-and-executing-tasks> . Best, Brian On Wed, Oct 13, 2010 at

Re: What is the best way to implement time-based / cronjob actions in a Django app?

2010-10-13 Thread Brian Bouterse
celeryconfig.py These results can be checked on later by task-id which can be easily stored in a plain django model. We have built several analytics and research compute clusters using celery and django-celery. Best, Brian On Wed, Oct 13, 2010 at 5:07 PM, ringemup wrote: > Thank you for taking

Re: Hosting many small Django websites

2010-10-14 Thread Brian Bouterse
e want to run code from many different sources and if they all ran as the same user, then one django project could monkey patch another one which creates all kinds of interesting security issues. Brian On Thu, Oct 14, 2010 at 4:45 PM, Diederik van der Boor wrote: > Hi, > > I'm curiou

Re: Hosting many small Django websites

2010-10-15 Thread Brian Bouterse
One of the challenges of going the GAE route is that you need to modify your application slightly to work with their version of models. Also, you can't ever run this code off of GAE, so it's kind of a lock-in in that respect. That being said it does work very well. Brian On Thu, Oc

Re: Updating a video rating using AJAX

2010-10-20 Thread Brian Neal
On Oct 20, 8:23 am, Sithembewena Lloyd Dube wrote: > Hi all, > > I have a page where users can rate a video, and in models.py I have a video > model with a 'rating' property. I wish to find out how I can AJAXify the > rating button on the page, so that if a user clicks on it, the button can > call

Re: What does an ideal django workflow setup look like?

2010-10-22 Thread Brian Bouterse
ogling for "continuous integration" Brian On Fri, Oct 22, 2010 at 11:02 AM, Ken wrote: > *I've Googled, but have not found any really organized and layman- > friendly overview, which is why I came here* > > I know how to get python/django working on my computer (PC or

Re: how can i wsdl file in my django

2010-10-25 Thread Brian Bouterse
yes Maybe next time put a little more effort into writing your response and you'll get a better answer. On Mon, Oct 25, 2010 at 6:58 AM, sami nathan wrote: > Can i use RESTfull insted of SOAP service > > -- > You received this message because you are subscribed to the Google Groups > "Django us

Re: Security

2010-10-25 Thread Brian Bouterse
nfo to that. If anyone has any thoughts on how this could be done, please let me know. Brian On Mon, Oct 25, 2010 at 6:47 AM, cootetom wrote: > Hi, a firefox extension was recently released to grab session ID > cookies from a private network for the popular sites like facebook etc > You ca

Re: Security

2010-10-25 Thread Brian Bouterse
Thanks for the info! Brian On Mon, Oct 25, 2010 at 8:44 AM, Tom Evans wrote: > On Mon, Oct 25, 2010 at 1:17 PM, Brian Bouterse > wrote: > > I'm not an expert in security, but here is how I would answer the > question. > > The CSRF approach that Django 1.2 implemen

Re: What does an ideal django workflow setup look like?

2010-10-25 Thread Brian Bouterse
do a script based automated roll-out using fabric as suggested. +1 for fabric +1 on the use of South Chaining all of these tools together bring together one powerful development pipeline, but even using them all independently is still very powerful (and the first step). my 2 cents, Brian

Re: What does an ideal django workflow setup look like?

2010-10-26 Thread Brian Bouterse
I can't encourage it *enough*. This was writen hastily, thanks for the close read. Brian On Tue, Oct 26, 2010 at 1:01 AM, Kenneth Gonsalves wrote: > On Mon, 2010-10-25 at 16:06 -0400, Brian Bouterse wrote: > > I really can't encourage the use of Hudson <http://hudson-ci.o

Re: write a filter for latex that escapes some chars

2010-10-29 Thread Brian Bouterse
end email to django-us...@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/group/django-users?hl=en. > > -- Brian Bouterse ITng Services -- You receive

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