Re: problems with admin links after upgrade 1.1 -> 1.3 dev

2011-03-28 Thread jd
That worked! Thank you S much! never would have found that :) On Mar 28, 5:59 pm, Karen Tracey wrote: > On Mon, Mar 28, 2011 at 1:39 PM, jd wrote: > > I upgraded to 1.3 dev from 1.1 and now my admin links don't work. the > > page domain.com/admin/ works and it shows my models listed, but whe

Re: problems with admin links after upgrade 1.1 -> 1.3 dev

2011-03-28 Thread Karen Tracey
On Mon, Mar 28, 2011 at 1:39 PM, jd wrote: > I upgraded to 1.3 dev from 1.1 and now my admin links don't work. the > page domain.com/admin/ works and it shows my models listed, but when > clicking on any of them it doesn't leave the model list page. Instead > it keeps stacking the url I want to v

Re: Looking for IDE + FTP

2011-03-28 Thread Karen McNeil
Just wanted to give you all an update: I started using Aptana Studio with the PyDev plug-in and I'm really liking it; I think it was just what I needed. Thanks for all the suggestions! ~Karen -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Django Notification - can't send notifications

2011-03-28 Thread justin jools
can't send notifications have tried adding (in notification models.py): if notification: notification.send([self.from_user], "friends_accept", {"invitation": self, "new_user": self.to_user}) but does nothing although I can enter notices manually in admin. -- You received this message be

Re: A couple question about Feeds and GIS

2011-03-28 Thread Corey Farwell
I have learned that GeoRSSFeed is a feed_type and that there is a current ticket for my latter problem http://code.djangoproject.com/ticket/15707 On Mar 28, 4:30 pm, Corey Farwell wrote: > So i have the impression that django.contrib.gis.feeds.Feed outputs a > georss feed when supplied geometry.

A couple question about Feeds and GIS

2011-03-28 Thread Corey Farwell
So i have the impression that django.contrib.gis.feeds.Feed outputs a georss feed when supplied geometry. what is the purpose of django.contrib.gis.feeds.GeoRSSFeed? Also is there any reason why gis.feeds.Feed still uses the deprecated syndication.feeds.Feed instead of the new syndication.views.Fe

Re: Just started Django - please help clarify web site configuration strategy

2011-03-28 Thread Jumpfroggy
> Basically, the question is - when a web > application starts there is a number of things that needs to be > available any time any request. Some of them are really static in > nature - for example, pagination parameters; If these are static values, a good place to put them is in the settings.py

django-simple-friends + notifications: how to intergrate?

2011-03-28 Thread justin jools
I have both simple-friends and notifications running and workign and have set up notice types. How do I use signals from friend request for instance to trigger notice types? examples simple-friends: class FriendshipRequest(models.Model): from_user = models.ForeignKey(User, related_name="inv

How can I integrate performance measurements with unit tests?

2011-03-28 Thread Jumpfroggy
I have django testing setup, and it runs a few tests. I would like to measure the time each test takes to run, and record that in a data file I can access later. How do I record the time each test takes? If this is not (easily) possible with unit tests, then is there another easy way to test vie

Re: OT: Django broke my Dropbox

2011-03-28 Thread Shawn Milochik
On Mon, Mar 28, 2011 at 5:35 PM, Petite Abeille wrote: > > On Mar 28, 2011, at 11:33 PM, Xavier Ordoquy wrote: > >> I'm just tired of grepping code when subversion is the VC used ;) > > ack! > > http://betterthangrep.com/ Awesome! I'd never seen that before, and it looks great. It makes me glad

Re: OT: Django broke my Dropbox

2011-03-28 Thread Petite Abeille
On Mar 28, 2011, at 11:33 PM, Xavier Ordoquy wrote: > I'm just tired of grepping code when subversion is the VC used ;) ack! http://betterthangrep.com/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to djan

Re: OT: Django broke my Dropbox

2011-03-28 Thread Xavier Ordoquy
> For fun, I checked out the official Subversion, Git, and Mercurial > repos this afternoon: > > svn: >22,986 directories > > git: >2,563 directories > > hg: >5,291 directories > > I don't know whether this displays an inefficiency of Subversion or > whether converting from Subversi

Re: Two way many-to-many relationships

2011-03-28 Thread Dilan
Thanks Mike ! That was a really helpful page that I missed in Doc. In this particular case 1 solves 2. Dilan On Mar 27, 10:09 pm, Mike Ramirez wrote: > On Sunday, March 27, 2011 02:32:15 pm Dilan wrote: > > > Hi All, > > > I'm working on a model similar to > >http://docs.djangoproject.com/en/1

[ANN] fhurl release 0.1.1

2011-03-28 Thread Amit Upadhyay
http://packages.python.org/fhurl/ This is a generic view for form handling. First release. Feedback and comments appreciated. -- Amit Upadhyay +91-9820-295-512 -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

OT: Django broke my Dropbox

2011-03-28 Thread Shawn Milochik
I've been having a lot of problems lately with Dropbox failing to sync. To make a long story short, it's Subversion's fault. Dropbox on Linux fails when you have more than 10,000 directories in your Dropbox folder. The SVN checkout of Django itself has over 22,000 directories. Deleting the svn tru

Re: Newbie Problem with Django reverse()

2011-03-28 Thread Ajay
Hi Alendit, Thanks for explanation. I understand its not necessary but want to understand how reverse() works-checked source but did not understand much. my doubt is if I use something like : reverse('django.contrib.auth.views.password_change_done'), and have url entry like as follows. url(r'^

Re: simple friends template help

2011-03-28 Thread justin jools
I think I've resolved some of my problems: I was wondering how to list friend request but now I think I have to use Django-Notifications to pick up the signals, would this be right? complete models: class FriendshipRequest(models.Model): from_user = models.ForeignKey(User, related_name="inv

RE: How to run a file.py in the django environement

2011-03-28 Thread Sells, Fred
It was explained very clearly to me, I believe by shawn, but I've lost the original reference. If the file you want to run is in your django app directory you just need import datetime, sys, os, logging os.environ['DJANGO_SETTINGS_MODULE'] = 'YourDirectoryThatContainsTheSettingsModule.settings

Re: Slow query. Any way to speed things up?

2011-03-28 Thread akaariai
On Mar 28, 3:52 pm, Fabian Büchler wrote: > Now this query takes about 15 seconds to run on a database with about 5,000 > Events and 50,000 EventDates. > I'm running Django 1.3 (trunk) and PostgreSQL 9.0 on a relatively recent > quadcore machine. > > Is there any way to do a more efficient query

Re: Just started Django - please help clarify web site configuration strategy

2011-03-28 Thread javatina
Thanks for responding. It's been very important - helps "gauge" thinking, how far I am off :) 1. I haven't yet looked at middlewares - will do. 2. custom template tags - I do not see how they can help here (BTW, just completed my first one to loop ranges) 3. Request contexts complexity - as I sa

problems with admin links after upgrade 1.1 -> 1.3 dev

2011-03-28 Thread jd
Hi all, I upgraded to 1.3 dev from 1.1 and now my admin links don't work. the page domain.com/admin/ works and it shows my models listed, but when clicking on any of them it doesn't leave the model list page. Instead it keeps stacking the url I want to visit onto the existing url. I.e. domain.com/

Re: simple friends template help

2011-03-28 Thread justin jools
I now have a different overriding problem with this simple-friends app: url patterns are simple: urlpatterns = patterns('friends.views', url(r'^$', 'friend_list', name='friends_home'), url(r'^list/(?P\w+)/$', 'friend_list', name='friend_list'), url(r'^a

Re: simple friends template help

2011-03-28 Thread Joel Goldstick
On Mon, Mar 28, 2011 at 12:14 PM, mike171562 wrote: > Maybe you could use the ifequal tag in your template, not sure what > your trying to do , but in your view you could do a friend = > Friends.objects.all() and in your template, > > {% ifequal friend.isfriend True %} > do something here > {%endi

Re: Updating to Django 1.3 - how to preserve file field previous behaviour

2011-03-28 Thread Jacob Kaplan-Moss
On Sun, Mar 27, 2011 at 6:47 PM, Russell Keith-Magee wrote: > As was suggested when you raised this on django-dev, if you want the > old behavior, write a subclass of FileField that reintroduces the old > behavior. ... and for those who're not reading over there, here's some code you might try: h

I want Develop django poll app tuturial

2011-03-28 Thread cha
Hello I Written the Poll Applicattion From the tuturial in django offical website But How i can Develope It ? I want add bar graph for result and need calculate percentages for vote -- You received this message because you are subscribed to the Google Groups "Django users" group. To pos

Re: simple friends template help

2011-03-28 Thread mike171562
Maybe you could use the ifequal tag in your template, not sure what your trying to do , but in your view you could do a friend = Friends.objects.all() and in your template, {% ifequal friend.isfriend True %} do something here {%endifequal%} {% ifequal friend.is_invited %} something else {%endifeq

Re: Just started Django - please help clarify web site configuration strategy

2011-03-28 Thread bruno desthuilliers
On 28 mar, 16:58, javatina wrote: > I could formulate my question differently - is there such thing as an > application context in Django? Basically, the question is - when a web > application starts there is a number of things that needs to be > available any time any request. Some of them are re

Re: Is there any way to override variable of parent (super) template in child template

2011-03-28 Thread Vladimir Mihailenco
AFAIK nodes outside blocks in such cases are not executed at all. But I tried and it does not work. So far I wrote this: {% extends 'base.html' %} {% block title %} {% setget title %}{% trans 'Pages' %}{% endset %} {% endblock %} {% block content %} {{ title }} {% endblock %} and templatetag

Re: Is there any way to override variable of parent (super) template in child template

2011-03-28 Thread bruno desthuilliers
On 28 mar, 12:18, Vladimir Mihailenco wrote: > Is there any way to override variable of parent (super) template in > child template? For example, I have following templates: > > base.html > {{ title }} > > {% block body %} > {{ title }} > {% block content %}{% endblock %} > {% endblock %} > > chil

Re: Is there any way to override variable of parent (super) template in child template

2011-03-28 Thread Bill Freeman
Try: {% extends 'base.html' %} {% with title="My title" %} {% block content %} Any other content stuff. {% endblock %} {% endwith %} No guarantees. Let us know if it works. Bill On Mon, Mar 28, 2011 at 6:18 AM, Vladimir Mihailenco wrote: > Is there any way to override variable of parent (supe

Just started Django - please help clarify web site configuration strategy

2011-03-28 Thread javatina
I could formulate my question differently - is there such thing as an application context in Django? Basically, the question is - when a web application starts there is a number of things that needs to be available any time any request. Some of them are really static in nature - for example, pagina

Re: LANGUAGE_CODE inside the template of an inclusion tag

2011-03-28 Thread gontran
Still no answers. Is it because it's impossible? By the way, I know that inside the code of my tag I can get the context and then the language used by the user, by I want to access to this value inside my template, without having to pass explicitely the value. On 25 mar, 16:39, gontran wrote: >

Dynamically generating form fields

2011-03-28 Thread fersan
Hello, I am trying to create a form with fields based on types of an object property. Basically, I am setting up a system which has hardware 'demos' which are categorized by industry. I want to create a form which has a Checkbox Select Multiple for each industry, with the choices being the demos f

Re: Slow query. Any way to speed things up?

2011-03-28 Thread Javier Guerra Giraldez
On Mon, Mar 28, 2011 at 7:52 AM, Fabian Büchler wrote: > > Events have an EventOnlineManager with a "to_expire" method which should > select all Events with status=online and EventDates associated which date < > today. > >> class EventOnlineManager(models.Manager): >> >>     def get_query_set(se

Re: Using success_url with reverse() in class-based generic view

2011-03-28 Thread Rytis Sileika
Had the same issue. Here's what I did in my views.py: --- from django.utils.functional import lazy ... class MyDeleteView(DeleteView): ... success_url = lazy(reverse, str)("success_url_name") --- Again, I don't know if that's the correct way of doing things, but worked for me. I think I

AW: form has not attribute cleaned_data

2011-03-28 Thread Szabo, Patrick (LNG-VIE)
Strange. I'm new to python and django myself but im wondering how form.is_valid() works when form is only initiated a line later. Doesnt it have to look like this: if request.user.is_superuser: if request.method == 'POST': form = Form_news(request.POST) if fo

Re: form has not attribute cleaned_data

2011-03-28 Thread Daniel Roseman
On Monday, March 28, 2011 2:04:53 PM UTC+1, luca72 wrote: > > hello i have a form like this: > class Form_news(forms.Form): > messgg = forms.CharField(label = 'Messaggio',max_length=1, > widget=forms.Textarea) > > and in the views i do as follow: > if request.user.is_superuser: >

form has not attribute cleaned_data

2011-03-28 Thread luca72
hello i have a form like this: class Form_news(forms.Form): messgg = forms.CharField(label = 'Messaggio',max_length=1, widget=forms.Textarea) and in the views i do as follow: if request.user.is_superuser: if request.method == 'POST': if form.is_valid():

Slow query. Any way to speed things up?

2011-03-28 Thread Fabian Büchler
Hello everyone, maybe someone can help me to speed up a quite slow query: I've got two models (only the important stuff outlined here): Events and EventDates class Event(models.Model): > status = models.SmallIntegerField(verbose_name=_(u"status"), > choices=STATUS_CHOICES, default=ST

Re: AW: MEDIA_URL not treated like static

2011-03-28 Thread galgal
Thanks, I didn't know that. All works fine now. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegro

Re: AW: MEDIA_URL not treated like static

2011-03-28 Thread Amao Zhao
Dear galgal: according to the django docs for 1.3, The most likely example is user-uploaded content in MEDIA_ROOT . staticfiles is intended for static assets and has no built-in handling for user-uploaded files, but you

Re: AW: MEDIA_URL not treated like static

2011-03-28 Thread galgal
I forgot to tell I'm using Django 1.3. In that case - how to make it work with separate dirs? Or it can't be done on dev server? -- 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.

AW: MEDIA_URL not treated like static

2011-03-28 Thread Szabo, Patrick (LNG-VIE)
I have a static folder in my Prject and my MEDIA_URL looks like this: http://127.0.0.1:8000/static/ Von: django-users@googlegroups.com [mailto:django-users@googlegroups.com] Im Auftrag von galgal Gesendet: Montag, 28. März 2011 13:38 An: django-users@googlegroups.com Betreff: MEDIA_URL not tr

MEDIA_URL not treated like static

2011-03-28 Thread galgal
I have that dirs structure: site_media/ | ---> static/ | ---> uploads/ static dir is set as STATIC_URL = '/site_media/static/' uploads dir is set as MEDIA_URL = '/site_media/uploads/' In that case on dev server (localhost:8000) media_url is not accessible via browser as static fi

Is there any way to override variable of parent (super) template in child template

2011-03-28 Thread Vladimir Mihailenco
Is there any way to override variable of parent (super) template in child template? For example, I have following templates: base.html {{ title }} {% block body %} {{ title }} {% block content %}{% endblock %} {% endblock %} child.html {% extends 'base.html' %} {% block content %} {% set title

Re: user email

2011-03-28 Thread emre yılmaz
2011/3/28 luca72 : > Hello > How i can get all the email stored in the auth_user table of the > default djanco database? > > Thanks > use this: http://paste.pocoo.org/show/361380/ -- web developer http://www.emreyilmaz.me -- You received this message because you are subscribed to the Google

user email

2011-03-28 Thread luca72
Hello How i can get all the email stored in the auth_user table of the default djanco database? Thanks Luca -- 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

Re: unique_for_date not working?

2011-03-28 Thread Derek
On Mar 25, 10:42 pm, Karen Tracey wrote: > On Fri, Mar 25, 2011 at 12:17 PM, Andre Terra wrote: > > Overwrite the model's save method and add the date automatically on save. > > That is the best way to do most things "auto" in your models. > > But if you do this, you are past the point where you