Re: django template language issue

2009-08-17 Thread David Zhou
On Mon, Aug 17, 2009 at 6:39 AM, Adonis wrote: > My problem is that even if the 'projects' queryset is empty, it still > includes the projects.html > Is there another way to do it? If you're using at least Django 1.1, you can use the empty tag: http://docs.djangoproject.com/en/dev/ref/templates

Re: easy way of display an user bar?

2009-08-17 Thread David Christiansen
On Aug 16, 9:31 am, Mirat Bayrak wrote: > I have that problem too, is there any other solution? Hi Mirat I'm not sure what problem you mean. Is the problem that you can't use RequestContext for some reason? Or is there another reason why you can't do it that way? --~--~-~--~~

Re: OK to put app_directories before filesystem template loader?

2009-08-19 Thread David Christiansen
Well, it doesn't seem to make much sense to me. I use the default order so that I can place files in a site-level templates directory in order to override the default templates in the app directory without having to directly open it up and modify its template files. -David Christiansen O

Adding BOM to an XML response

2009-08-20 Thread David Korz
I am trying to use FusionCharts in pages served from Django. The FusionChart object gets the chart definition and data from a URL you specify. The URL must return an XML document in their format. I create the page and the XML document from Django using the templating system fine except that Fusio

Re: a bit like permission, but...

2009-08-21 Thread David Zhou
On Aug 21, 2009, at 9:54 AM, MIL wrote: > this works fine but I dont want to repeat it in all my views: > def my_profile(request): > gotta_go_through = request.user.get_profile > ().gotta_go_through_this_url() > if gotta_go_through and gotta_go_through != request.path: >

saving M2M with through table behavior change - (r.10189 vs. r.10190)

2009-08-23 Thread David Haas
Hi: Yet again, I've run into a behavior change which seems to be linked to svn revision 10190. I've figured out a workaround for my code, but I'm wondering if someone could provide some feedback if the change is just a definition of previously undefined behavior, or a bug. I've pasted some demo

Re: saving M2M with through table behavior change - (r.10189 vs. r.10190)

2009-08-24 Thread David Haas
Excellent. Thanks for the fix! On Aug 24, 5:55 am, Russell Keith-Magee wrote: > On Mon, Aug 24, 2009 at 6:27 AM, David Haas wrote: > > > Hi: > > > Yet again, I've run into a behavior change which seems to be linked to > > svn revision 10190.  I've figu

Re: How I can add new functionality in homepage of admin site??

2009-08-24 Thread David Zhou
On Mon, Aug 24, 2009 at 3:29 PM, sandravigo wrote: > > Hi, friends. I have a problem. > I created a function (main) that displays a list on the first page > (index.html) of site administration. The problem is that for example, > if I put in URLConf: (r '^ admin /(.*)',' myproject.views.main '), >

Re: Django scalability with files

2009-08-27 Thread David Zhou
On Thu, Aug 27, 2009 at 6:13 AM, Lewis Taylor wrote: > > I have an imagefield that i want to create a thumbnail for on approval > of the image. The problem is (setup is 2 django instances, load > balancer and DB) if the image is stored on one machine it's not the > cleanest solution to have to get

Re: How to check which form was submitted?

2009-08-27 Thread David Zhou
On Thu, Aug 27, 2009 at 7:09 AM, Maksymus007 wrote: > > I've got two different form on the same page, under the same URL. > When I send one of them, the second one gets validated too. > I set prefixes but no change. > > Is there any way to distinguish between two forms, choosing one that > have be

Re: get an object's model name

2009-08-27 Thread David Zhou
On Thu, Aug 27, 2009 at 7:08 AM, Léon Dignòn wrote: > from django.contrib.auth.models import User u = User.objects.get(id=1) u > print u > leon type(u) > Alternatively: >>> u.__class__.__name__ 'User' -- dz --~--~-~--~~~---~--~~ You re

Re: redirect in django

2009-08-27 Thread David Zhou
On Thu, Aug 27, 2009 at 6:58 AM, Matthias Kestenholz wrote: > >> On Thu, Aug 27, 2009 at 2:59 PM, ankit wrote: >>> >>> I am new to django.I having to app in my admin.Know I want to know >>> that how can i redirect user to one app listpage if clicks save on >>> second app.say from app2 to app1 >>>

Re: How to check which form was submitted?

2009-08-27 Thread David Zhou
On Thu, Aug 27, 2009 at 7:33 AM, Maksymus007 wrote: > > On Thu, Aug 27, 2009 at 1:22 PM, David Zhou wrote: >> Post the part of your view that handles your forms. > > Nothing special > >    if request.method == 'POST': >        form = RegisterForm(re

Re: Problem building data structure for Archive page

2009-08-27 Thread David Zhou
On Thu, Aug 27, 2009 at 10:10 AM, gnijholt wrote: > Or is there a better way to generate a full archive page (per year, > per month)? You'll need to test this, but you should be able to do that with {% ifchanged %}: #view: posts = Posts.objects.order_by('-pub_date') #template {% for post in po

More elegant way to dump/load Django model data?

2009-09-01 Thread David Moss
all, biggest tables are only a couple of thousand rows at most). Any ideas or suggestions? David Moss --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send e

Re: What's the most scalable Django deployment out there currently?

2009-03-25 Thread David Holstius
We're migrating www.gigapan.org to Django (was: PHP/Smarty) on a page- by-page basis. We have a high read/write ratio, so judicious caching solves most of our scaling issues in the realm of dynamic web content. Most of our stress comes from serving static imagery. So, let me qualify that: we have

Re: Avoiding Accidental Overwrite In Admin Interface

2009-03-25 Thread David Zhou
It shouldn't be too hard to add a last-updated timestamp to a model, and compare it to a hidden field in the form validation. -- dz On Wed, Mar 25, 2009 at 11:49 AM, Daniel Watkins wrote: > > Hello all, > > We recently ran into an issue when two people were editing a record via > the admin in

Re: will dmigrations be merged into django codebase?

2009-03-25 Thread David Lindquist
On Mar 25, 2009, at 4:54 PM, Russell Keith-Magee wrote: > > On Thu, Mar 26, 2009 at 8:42 AM, Joshua Partogi > wrote: >> >> Is there any chance dmigrations >> (http://code.google.com/p/dmigrations/) will be merged into django >> codebase? Because it removes the pain for db migrations :-D > > d

Odd ORM behavior

2009-03-26 Thread David Lindquist
I am noticing some odd SQL being generated for certain queries. For example, if I type the following in the shell: >>> TroubleCode.objects.all()[:5] and then I look at the db queries: >>> from django.db import connection >>> connection.queries I get the desired query, plus 5 extra queries

Re: Odd ORM behavior

2009-03-26 Thread David Lindquist
Thanks Karen! I knew it had to be something newb-ish I was doing. :) On Mar 26, 2009, at 10:04 AM, Karen Tracey wrote: > On Thu, Mar 26, 2009 at 12:53 PM, David Lindquist > wrote: > > I am noticing some odd SQL being generated for certain queries. For > example, if I type the f

Re: Design Issue / forward referencing

2009-03-28 Thread David Zhou
Also see: http://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.ManyToManyField.symmetrical -- dz On Sat, Mar 28, 2009 at 11:57 AM, Alex Gaynor wrote: > > > On Sat, Mar 28, 2009 at 10:55 AM, mahesh wrote: >> >> I am working on a (College) course manager project. Here is a

Re: Best Convension for dealing with variables needed in every view.

2009-03-29 Thread David Zhou
On Sun, Mar 29, 2009 at 7:14 PM, IanR wrote: > I'm trying to stay a close to the suggested Django conventions as > possible.  I have a few variables that I need to render any page. Check out context processors: http://docs.djangoproject.com/en/dev/ref/templates/api/#writing-your-own-context-pro

Re: What hash algorithm does django auth use?

2009-03-29 Thread David Zhou
On Sun, Mar 29, 2009 at 9:50 PM, Joshua Partogi wrote: > > I thought we're to use hexdigest ? > > Did I miss something here? You need to salt it: http://code.djangoproject.com/browser/django/trunk/django/contrib/auth/models.py#L20 -- dz --~--~-~--~~~---~--~~ Yo

Re: Best Convension for dealing with variables needed in every view.

2009-03-29 Thread David Zhou
; do what I need.  Once my context_processor is made how would I add it > to this list?  Something like > settings.TEMPLATE_CONTEXT_PROCESSORS.append(my_processor) > > > On Mar 29, 7:19 pm, David Zhou wrote: >> On Sun, Mar 29, 2009 at 7:14 PM, IanR wrote: >> > I'm trying to stay a c

Re: Stuck in Tutorial Part 2: can't find django/contrib/admin/templates

2009-04-15 Thread David Chambers
I had the same problem. Thanks very much for taking the time to post the solution, Alex. On Apr 8, 12:36 pm, "ab3...@gmail.com" wrote: > Thanks! You have unlocked the rest of the tutorial for me. I > appreciate your help. > > On Apr 7, 12:57 pm, Alex Gaynor wrote: > > > On Tue, Apr 7, 2009 at

Re: get and display html from another site

2009-04-26 Thread David Keegan
That worked great! Thx David Keegan On Apr 25, 2009, at 7:09 AM, Karen Tracey wrote: > On Sat, Apr 25, 2009 at 4:30 AM, keegan3d wrote: > > Im building a site that uses wordpress for the blog, and django for > everything else. I want to be able to pull in some html from the blog

Re: ignore urls

2009-04-27 Thread David Keegan
> Apache. > > Have a look at the documentation for the Location directive in the > Apache manual. Also have a look at LocationMatch. They're different and, > in particular, Location is a much more specific match and doesn't > extrapolate to treating the URL you've

Re: class for form fields

2009-05-11 Thread David Zhou
On Mon, May 11, 2009 at 12:04 PM, CrabbyPete wrote: > > I just started using forms and I have the following html > Zip Code: size="15" maxlength="15"> > > How do you specify the class type for the input field. See: http://docs.djangoproject.com/en/dev/ref/forms/widgets/#django.forms.Widget.att

Re: disable django cache

2009-05-14 Thread David Zhou
On Thu, May 14, 2009 at 9:53 PM, online wrote: > > Whatever i changed 'home.html' to other page i always get the same > result. Are you restarting your serving? If by "changed home.html to other page" you mean you modified your view function to return a different template, then make sure you re

Re: Obfuscate HTML..?

2009-05-24 Thread David Zhou
On Sun, May 24, 2009 at 9:40 PM, jago wrote: > > I want to make the HTML of the website as little human readable as > possible. For that I would like to add some layer to Django 0.96 which > when writing out the page takes the HTML and adds some processing. > > 1. How would I obfuscate the HTML a

Re: runserver fails

2009-05-24 Thread David Zhou
Does the following worth in the interactive prompt? >>> import socket >>> socket.getaddrinfo("www.google.com", 80) -- dz On Sun, May 24, 2009 at 10:59 PM, Chris DPS wrote: > > When I execute runserver, I get the following message: > > Validating models... > 0 errors found > > Django version

Announcing Django-ROA, dealing with remote resources

2009-05-25 Thread David Larlet
RDF triple store (probably my next pony) * your crazy use-case? It's still a work in progress but any feedback is really welcome! Best, David [1] http://code.welldev.org/django-roa/ [2] http://code.welldev.org/django-roa/wiki/Home --~--~-~--~~~---~--~---

Re: Newb - how to remember the main course while we select the dessert

2009-06-09 Thread David Durham
On Thu, Jun 4, 2009 at 9:19 AM, adelaide_mike wrote: > > My latest problem can be illustrated thus: > > In the first form we select the main course - spam or eggs.  In the > next form we select the dessert - ice cream or mud cake, and in the > third form we select the after-dimmer drink - tea or c

Re: ORACLE_HOME in wsgi script

2009-06-09 Thread David Durham
On Thu, Jun 4, 2009 at 8:54 AM, SlafS wrote: > > Hi! > > I'm trying to run Django app with mod_wsgi and Oracle, but when I try > to configure it I always get an internal server error (500) with this > error.log: > > ImproperlyConfigured: Error loading cx_Oracle module: libclntsh.so. > 11.1: cannot

Re: ORACLE_HOME in wsgi script

2009-06-09 Thread David Durham
On Tue, Jun 9, 2009 at 3:44 PM, David Durham wrote: > On Thu, Jun 4, 2009 at 8:54 AM, SlafS wrote: >> >> Hi! >> >> I'm trying to run Django app with mod_wsgi and Oracle, but when I try >> to configure it I always get an internal ser

Re: Is slugify available as a Django API call?

2009-09-13 Thread David Zhou
On Sun, Sep 13, 2009 at 9:07 PM, W.P. McNeill wrote: > the web, but this seems error prone.  The right way to do it would > seem to be to use the slugify code that is already in Django. > What is the best way to slugify an arbitrary string using a Python > call? from django.template.defaultfil

Re: Django-Storages

2009-09-28 Thread David Larlet
to email me personally. Regards, David Le 23 sept. 2009 à 23:52, Nick a écrit : > > Hey everyone, > > I'm working on setting up an app to upload images to s3. I am using > David Larlet's djang-storages backends and am running into a pretty > annoying problem. When I

Re: multi-db vs. data warehouse

2009-09-28 Thread David Larlet
27;s your final choice, I already use it against a data warehouse. Regards, David --~--~-~--~~~---~--~~ 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

Re: Which compressor / packer for CSS and JS?

2009-09-30 Thread David Ziegler
b.com/mintchaos/django_compressor Good luck! David Ziegler -- http://www.davidziegler.net On Sep 29, 9:20 am, Rodrigo Cea wrote: > What is your experience or advice on using a compressor or asset > packager in Django? For JS, CSS and (maybe) image sprites? > > I have a site going into

App/Project naming - best practices

2009-09-30 Thread David Koblas
Just currious what people are doing for "best practices" in the realm of building apps. Specifically I have a tendency to create a lot of "one-off" websites (e.g. Django App) and use a few standard apps across all of them. What catches me up all of the time is naming systems. If I was to cre

Re: django blog

2009-10-17 Thread David Paccoud
Hi, Have you installed all the dependancies listed in the README file and declared the django apps in your settings.py? Note that the project is now hosted on github. You may want to grab the lastest version there. David On Fri, Oct 16, 2009 at 8:18 PM, lafada wrote: > > Hi, > &

Re: Please help: {% url ... %} path resolve issue

2009-10-17 Thread David Paccoud
Hi, You can use {% url customer_edit customer.id %} only if customer_edit is declared as the name of view in urls.py. See http://docs.djangoproject.com/en/1.1/topics/http/urls/#id2 for more details. David On Sat, Oct 17, 2009 at 11:10 AM, Gerard wrote: > > Hi All, > > I'

Re: Please help: {% url ... %} path resolve issue

2009-10-17 Thread David Paccoud
is recommended to use "myapp_customer_edit" or use namespace introduced in 1.1. Hope this is getting clearer. Regards, David On Sat, Oct 17, 2009 at 3:08 PM, Gerard wrote: > > Hi David, > > Thanx for the feedback. The keyword in your sentence below would be *only* i > a

Re: python manage.py syncdb error: sqlite3.OperationalError: unable to open database file

2009-10-20 Thread David Paccoud
edia') TEMPLATE_DIRS = (rel('templates'), ) David On Mon, Oct 19, 2009 at 9:16 PM, selena wrote: > > hello everyone > i apologize for being so quick on asking for help, before i double > checked my paths and local settings  - which i thought i did but > i hav

Foreign Key Admin UI Error (from a new user)

2009-10-23 Thread David Nolen
My admin looks something like the following- class TitleInline(admin.TabularInline): model = Title extra = 1 class WorkAdmin(admin.ModelAdmin): inlines = [TitleInline] admin.site.register(Work, WorkAdmin) My models look something like this- class Work(ArtBaseModel): def __unic

Re: Foreign Key Admin UI Error (from a new user)

2009-10-24 Thread David Nolen
: self.created = datetime.datetime.today() self.modified = datetime.datetime.today() super(ArtBaseModel, self).save() On Sat, Oct 24, 2009 at 7:56 AM, Tom Evans wrote: > > On Fri, 2009-10-23 at 13:22 -0700, David Nolen wrote: > > My admin looks something like t

Re: Django-cms

2009-10-26 Thread David Zhou
On Mon, Oct 26, 2009 at 4:16 AM, aju mathew wrote > > In Django CMS any blog plugin is available. You should be using the Django-CMS mailing list for this in the future. That said, use CMS_PLACEHOLDER_CONF to specify which plugins are available for which placeholders: http://www.django-cms.org

Re: Foreign Key Admin UI Error (from a new user)

2009-10-27 Thread David Nolen
So the issue seems to stem from the fact that both Work and Title inherit from the same model. Is this a known issue? Is there something I can do to ArtBaseModel to make this work? I would like all my models to have created/modified. Thanks again, David On Oct 24, 7:56 am, Tom Evans wrote

Re: Foreign Key Admin UI Error (from a new user)

2009-10-27 Thread David Nolen
Ahh I see now I needed to define ArtBaseModel as an abstract base class. On Oct 24, 7:06 pm, David Nolen wrote: > Thanks for the reply. The base model just looks like this: > > class ArtBaseModel(models.Model): >     created = models.DateTimeField() # models.DateTimeField(ed

Re: {% url in templates

2009-10-28 Thread David Zhou
What's your 'view_xyz'? Are you sure that view_xyz is accessible through an URL without any arguments? -- dz On Wed, Oct 28, 2009 at 2:55 PM, Umapathy S wrote: > Hello there, > > I am developing a page which has a left side menu. This menu is a seperate > html and gets includes in the base.h

Re: Can I change the restriction on "username" without breaking anything?

2009-11-13 Thread David Christiansen
ion-backend . Hope this helps! /David Christiansen -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsu

Re: WebFaction warning

2009-11-29 Thread David Zhou
On Sun, Nov 29, 2009 at 9:18 PM, digicase wrote: > I received a good email From Remi at WF which told me all I needed to > know. The outage was unacceptable but hopefully lessons have been > learned. Do you mind sharing what he said? I'd be curious to know if any new controls have been put into

Re: DRY up your Django templates with Showell Markup

2009-12-04 Thread David Martorana
I don't want to jump on something too quickly, being somewhat unproven, but it's a nice thing to have with GHRML being dead and HAML being Ruby only. I'll keep an eye on this! What plans do you have for future improvement? Dave On Nov 27, 1:08 pm, Steve Howell wrote: > I would like to announce

Re: DRY up your Django templates with Showell Markup

2009-12-05 Thread David Martorana
I wrote this rather quickly. It allows you to put a template.showell file in each app folder, and will render the templates on demand if you call "render_showell_to_response(...)". It'll check the last modification time of the .showell files, and re-renders them if they've changed, allowing you t

Blocking services in django

2009-12-09 Thread David Koblas
I'm trying to get a better understanding of django performance in a production setting. Specifically I've seen notes that say that operations like sending mail will block all production traffic to your server for the duration of the send. That got me thinking about other backend calls, like se

Saving a ModelForm for the current user?

2010-04-17 Thread David Lindquist
Greetings, I am trying to solve what seems like an easy problem, but the solution eludes me even after many Google searches. I have a simple model: class Site(models.Model): user = models.ForeignKey(User) url = models.URLField() class Meta: unique_together = (('user', 'url')

Re: Saving a ModelForm for the current user?

2010-04-18 Thread David Lindquist
another way to accomplish this? On Apr 18, 3:14 am, "ge...@aquarianhouse.com" wrote: > use commit=False > > m = form.save(commit=False) > m.user = request.user > m.save() > > On Apr 18, 6:06 am, David Lindquist wrote: > > > > > > > Greetings, > &

Re: Saving a ModelForm for the current user?

2010-04-18 Thread David Lindquist
=False) > m.user = request.user > m.save() > > something like this :) > > On Apr 18, 4:32 pm, David Lindquist wrote: > > > > > > > Thanks for the reply. > > > The problem I have with that solution is that it occurs after form > > validation take

Re: Saving a ModelForm for the current user?

2010-04-18 Thread David Lindquist
return render_to_response(...) On Apr 18, 7:52 am, David Lindquist wrote: > Thanks Georg. I will give that a try. > > On Apr 18, 7:45 am, "ge...@aquarianhouse.com" > > > > > > wrote: > > ok now i got it :) > > > i would do this: &

propagating values up the template chain

2010-04-21 Thread David Koblas
I ask this question knowing that it's almost anti-django template patterns, but I ask after spending the last few hours trying to figure a way to shoe horn this functionality in. The basic idea is that I would like to say something like this: {% extends "base.html" %} {% block content %} {%

Re: propagating values up the template chain

2010-04-21 Thread David Koblas
I'm doing that in a few other place (setting the page title, for example). The problem is that I would like to have the extended inside of a block and potentially conditionally (e.g. only include this JavaScript if you're not logged in). --koblas On 4/21/10 4:29 PM, Tim Shaffer wrote: Can y

proposal: subclass generation of forms

2010-05-07 Thread David Koblas
[Not quite sure where the right place is to post this] The general problem is that I would like to change the default output of forms across my site to have a consistent presentation that isn't of one as_p(), as_table(), or as_ul(). What I wanted to do was to add a quick function as_div() as

How can I test the correctness of my models against the schema of a database?

2010-05-30 Thread David Horat
of you faced this situation before? Any clues? Thank you in advance. Best Regards, David Horat -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from

Re: How can I test the correctness of my models against the schema of a database?

2010-05-30 Thread David Horat
That gives you the SQL Statements for an application. What I want is a way so Django checks the models against the database defined in settings. On May 31, 12:14 am, knicholes wrote: > python manage.py sqlall > > On May 30, 3:53 pm, David Horat wrote: > > > > > Dear gro

Re: How can I test the correctness of my models against the schema of a database?

2010-05-31 Thread David Horat
sting Framework. But I would prefer all tests to be together in Django. Regards, David On May 31, 8:34 am, Jani Tiainen wrote: > Not really. > > If you're specially working with legacy databases trying to figure out that do > Django models match underlying schema is PITA. > > W

Can't override a ForeignKey field in a model-generated form

2010-05-31 Thread David Euzen
cs/forms/modelforms/#overriding-the-default-field-types-or-widgets, this is supposed to override the "Niveau" "niveau" field but it doesn't work. Maybe the new "widgets" attribute to the Meta class of ModelForm could help, but I can't find how to define choices f

Ajax header not sent in all browsers

2010-06-09 Thread David Escobar
Hi everyone, I'm using Django 1.1 with jQuery 1.4.2 and currently testing with the Django development server. Whenever I send an AJAX request with $.get(), the HTTP_X_REQUESTED_WITH header only gets sent with Chrome and Safari. It does not get sent with IE or Firefox. I've verified this by outputti

Re: Ajax header not sent in all browsers

2010-06-11 Thread David Escobar
requires javascript! > https://ajax.googleapis.com/ajax/</a> > libs/jquery/1.4.2/jquery.min.js"> > >$(document).ready(function() { >$.get('/isajax', function(data) { > alert(data); >}); >}); >

Re: Ajax header not sent in all browsers

2010-06-13 Thread David Escobar
scripting. Apparently Opera must work the same way, since it doesn't respond to my AJAX requests either. So my question now is: Is there a way to test AJAX calls using the Django development server in Firefox and Opera? On Fri, Jun 11, 2010 at 11:58 PM, David Escobar wrote: > Ok, that helped na

Re: Why do I get an error importing current_datetime?

2010-06-13 Thread David Escobar
In your urls.py try doing a straight import instead of the from module import function version: import mysite.views urlpatterns = patterns('', ('^time/$', mysite.views.current_datetime), ...doesn't seem like it should make a difference, but it's worth a shot... On Sun, Jun 13, 2010 at 4:52

Re: Why do I get an error importing current_datetime?

2010-06-13 Thread David Escobar
Or you may not even need the mysite part of the import: import views urlpatterns = patterns('', ('^time/$', views.current_datetime), On Sun, Jun 13, 2010 at 5:06 PM, David Escobar wrote: > In your urls.py try doing a straight import instead of the from module &g

Re: Is {% cycle ... as ... %} supposed to output a value?

2010-07-07 Thread David Koblas
tting that was enabled to support the legacy behavior. from django.template.defaulttags import cycle cycle.ALWAYS_OUTPUT = True Or some other evil bit, to allow the "few" people who depend on the legacy behavior to have access and the rest of us to move forward. On 7/7/10

Re: Tutorial Help

2010-07-08 Thread David Ally
: ['pub_date']}), ] admin.site.register(Poll, PollAdmin) And the subsequent similar composition gave me syntax error, the traceback said something about "None", Please help me to get past this stage David From: James Bennett To: djan

Cannot connect to #django on irc

2010-07-09 Thread david ally
identify in time for the nickname david Also, where do I setup the password for the django channel? I thought it is supposed to be the same password i setup in the google group? Please help. David -- You received this message because you are subscribed to the Google Groups "Django

Please unsubscribe this email

2010-07-12 Thread David Ally
Please unsubscribe this email. David -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-user

Re: How to unsubscribe from Django mailing list

2010-07-18 Thread David Ally
I'm trying to unsubscribe this email from this group, because I have another email address i'm using in group, i have unsubscribed several times but the emails are still coming in, Please help! David From: Masklinn To: django-users@googlegroup

Re: Newbie question about url and seo

2010-08-20 Thread David Euzen
Hello, you should think of it in terms of ressource, not of file. URLs are about ressources not about files even if sometimes ressources are files. Django's way to build URLs is flexible. URLs built this way can make much more sense that URLs built upon file path. ie www.yourdomain.com/articles/2

fcgi vs. manage.py runserver and URI handling

2010-08-24 Thread David Koblas
I've got a production and a dev instance of my system, what I'm seeing is the following. For the URL: /tags/Cell%20Tower and the urls.py rule of: url(r'^tags/(?P.*)', 'tags', name='tags'), In the lighttpd proxying to a port on ./manage.py runserver I get tag = Cell Tower When

potential issue re in memory django file uploading.

2010-08-28 Thread david b.
Ok so I was looking through the code and I saw this (in django/core/files/uploadhandler.py) : FileUploadHandler ... def new_file(self, field_name, file_name, content_type, content_length, charset=None): """ Signal that a new file has been started. Warning: As with any da

Geodjango + Docstrings

2010-08-30 Thread David Z
Hello, I can't generate docs from my docstrings for geographic models w/ geodjango. I opened this bug, with a really simple test case: http://code.djangoproject.com/ticket/14183 Is this a good test case? Is there anything else I can do to assist in this bug's resolution? Thanks, z -- You rec

Re: Chat application in Django

2010-08-31 Thread David Koblas
Funny you should ask -- The basic challenge with any chat application is the long polling bit, django by default isn't really designed to handle that. Other servers (Tornado, etc.) are much better at handling the long polling cycle that typical web chat applications require. I was just fin

Re: Chat application in Django

2010-09-01 Thread David Koblas
users increases. * Second - the demo app I have assumes a single process model for handling communications (e.g. all notification is done via callbacks). So you would need to build some kind of server who maintains state if you ran things under apache (multi-process dispatch model). --david On

Re: DjangoCon 2011

2010-09-27 Thread David Zhou
Is the bay area right out for cost reasons? dz Sent from my iPhone On Sep 27, 2010, at 8:48 PM, Samuel Baldwin wrote: > 2010/9/27 Franklin Einspruch : >> May I humbly suggest Boston? > > Another for Boston. > -- > Samuel Baldwin - logik.li > > -- > You received this message because you are sub

Re: How to aggregate values by month

2010-11-04 Thread David Zhou
FWIW, on Postgres DBs, I've done the following: qs = FooModel.objects.filter(date__gte=start_date, date__lt=end_date).extra(select={'datetrunc': "date_trunc('month', date)"}).values('datetrunc').annotate(total=Sum("value")) date_trunc in postgres also accepts "day" and "week" truncations. -- dz

[Sentry] Adding in more sort mechanisms

2010-11-08 Thread David Cramer
I'm looking for feedback regarding something I want to implement in Sentry [1]. Currently we allow sorting by a few things, but its mostly based around the "times_seen" value. Times seen is useful, and always available, but there are many use cases where log messages would be better to group by so

Re: Adding in more sort mechanisms

2010-11-08 Thread David Cramer
Google seems to have deemed it a good idea to rename this thread title. This is regarding Sentry (aka django-sentry), a 3rd party Django app. On Nov 8, 8:12 pm, David Cramer wrote: > I'm looking for feedback regarding something I want to implement in > Sentry [1]. > > Currently

MySQLdb InterfaceError

2010-11-29 Thread David Smithson
I'm so frustrated with this problem I am about to lose it. I've tried multiple versions of python, mysql, mysql-python, django, etc. I've resorted to a clean installation of CentOS 5, fully up to date, with all packages installed by the book. Currently I'm using DJango 1.2.3 and MySQL-python 1.2

Migrating Many-To-Many Relationship

2010-01-12 Thread David Nolen
When migrating an existing db how do you create a proper join table for a ManyToMany field. I think I've got it mostly worked out except for the bit that looks like this in Django generated SQL: CREATE TABLE `blog_posts_authors` ( `id` int(11) NOT NULL AUTO_INCREMENT, `post_id` int(11) NOT NUL

Re: Django FormWizard Dynamically Alter form_list

2010-02-02 Thread David Durham
On Sat, Jan 30, 2010 at 1:25 PM, leveille wrote: > I'm having some issues with the form wizard, that maybe someone can > shed some light on. According to the docstring in the method > process_step: I can "dynamically alter self.form_list". So, based on > my project needs, I'm appending forms to th

Django standards?

2010-02-04 Thread David Parker
Hey all, I'm working on my first real Django app. I've been tinkering with it since last June, but I actually get to use it now. So my question is about what's the Django standard for what I'm doing... It's a Bible application, and so far, I have a url pattern: urlpatterns = patterns('', (r'^(

Re: Django standards?

2010-02-04 Thread David Parker
rns (granted, I understand what you mean... if it's well tested, then does it really matter which way it is designed?). On Feb 4, 11:08 am, Phlip wrote: > David Parker wrote: > >     verses = Verse.objects.filter(version__iexact=version, > > book__iexact=book, chapter__iexact=chapt

Re: Expiring view caches

2010-02-11 Thread David Zhou
Check out this snippet: http://www.djangosnippets.org/snippets/936/ Some what old though (2008), so it might need updating to work properly. -- dz On Thu, Feb 11, 2010 at 4:18 PM, HARRY POTTRER wrote: > Is there any way to manually expire per-view caches? > > I have a view that executes betw

Re: Problem while creating database tables through the models.

2010-02-12 Thread David Talbot
Have you created a Postgres database? On Feb 12, 4:38 am, Newbie wrote: > Dear all, > >           Downloaded and followed the steps which is given in the > documentation of Django >           Created the project called mysite >           Created the model called polls >           Ratified the set

Re: django template blocks and jquery

2010-02-16 Thread David Zhou
There are a couple of ways, but here's one off the top of my head: Base template: $(function(){ function1() { ... } function2() { ... } {% block additional_domready %}{% endblock %} }); {% block additional_js }%}{% endblock %} child template that extends base template: {% block add

Re: how to start with django

2010-03-08 Thread David Talbot
I would recommend the tutorial at http://docs.djangoproject.com/en/1.1/intro/tutorial01/ if you are just beginning - it gives a very good overview of the main features and programming ideas. On Mar 8, 7:47 am, Subhransu Sekhar Mishra wrote: > hi,i am subhransu and new to django . i want to know

Issue with aggregate_select changes

2010-03-22 Thread David Cramer
One of the recent changes in trunk was a change to how querysets were cloned. Due to this, some old code we had is no longer working. This was a custom aggregate which relied on "aggregate_select" (see below). I believe the change I'm referring to is what is causing this, and I'm unsure of what the

Re: Issue with aggregate_select changes

2010-03-22 Thread David Cramer
super(ICount, self).__init__(col, source, is_summary, **self.extra) query.aggregate_select[alias] = self On Mar 22, 4:53 pm, David Cramer wrote: > One of the recent changes in trunk was a change to how querysets were > cloned. Due to this, some old code we had is no longer working.

High, ongoing CPU consumption

2010-03-24 Thread David Christiansen
string. 2. Has anyone else here experienced anything similar who could shed some light on my situation? Many thanks in advance! /David Christiansen -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Django Admin: Redirecting after save

2010-03-24 Thread David Christiansen
erAdmin in django.contrib.auth. This has exactly this behavior when making a new user. /David Christiansen -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To un

Re: High, ongoing CPU consumption

2010-03-26 Thread David Christiansen
Thank you very much, Graham. I'll do some more looking and get back to the list. /David Christiansen -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubs

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