i18n and l10n of third party applications/libraries

2011-04-04 Thread poswald
I've got a situation similar to this one: http://stackoverflow.com/questions/3933824/djangos-i18n-with-third-party-apps Basically, I have a pip-installed third party library with strings marked for localization but with no localizations provided. In my project I would like to provide

Re: jQuery namespace woes - calling third-party scripts

2011-04-04 Thread mcniac
Hi! are you calling that script from the window's onload event? if not jquery might not be ready yet. also you should load that inside a IE conditional comment Cheers Esteban On Apr 4, 6:21 pm, Andre Terra wrote: > Hello. > > I'm trying to run the supersleight jQuery

Re: installer

2011-04-04 Thread Mike Dewhirst
On 5/04/2011 12:04pm, ydjango wrote: Is there a package or easy way to create an installer to auto install apache, django, mysql based web app? The best way is to script the installation. Google for "scripted installs " or similar. You should find some examples you can rework to suit your

Re: Using the same block in a django template to display different information depending on a variable

2011-04-04 Thread Sam Walters
Hey Block tags dont work like that. {%if choice1 == 2 %} {% include "sometemplate.html" %} {%endif%} instead of: {%if choice1 == 2 %} {%block two%} > The temperature in {{city}} is {{temperature}} > > {%endblock two%} {% endif %} I hope that was what you were thinking...

Re: Using the same block in a django template to display different information depending on a variable

2011-04-04 Thread Russell Keith-Magee
> On Mon, Apr 4, 2011 at 7:34 PM, Ethan Yandow wrote: >> Hey Mr. Django! I am trying to have different information display in >> the same block depending on a variable "choice" which is simply an >> int. The way I was planning on doing so was going to be something like >>

RE: Advice: project hosting apps

2011-04-04 Thread Sells, Fred
I've seen a lot of chatter about Eclipse mylyn which can be integrated with trak. Not used it however. -Original Message- From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of Javier Guerra Giraldez Sent: Monday, April 04, 2011 10:21 AM To:

Re: Using the same block in a django template to display different information depending on a variable

2011-04-04 Thread Calvin Spealman
Just put the condition inside the block. On Mon, Apr 4, 2011 at 7:34 PM, Ethan Yandow wrote: > Hey Mr. Django! I am trying to have different information display in > the same block depending on a variable "choice" which is simply an > int. The way I was planning on doing so

Using the same block in a django template to display different information depending on a variable

2011-04-04 Thread Ethan Yandow
Hey Mr. Django! I am trying to have different information display in the same block depending on a variable "choice" which is simply an int. The way I was planning on doing so was going to be something like the bellow code: {% extends "index.html"%} {%block head%} Welcome to Piss && ink {{user}}

installer

2011-04-04 Thread ydjango
Is there a package or easy way to create an installer to auto install apache, django, mysql based web app? There could be some manual steps like installing mysql and providing setup screens to enter connection data to mysql and mail server. I would want to at minimum, when installer is run by

Re: .Net Developer Job Opening - Valencia, CA

2011-04-04 Thread Kenneth Gonsalves
On Mon, 2011-04-04 at 11:55 -0400, Casey Greene wrote: > Can we ban/filter this entire recruiting firm? We already got this > once: > http://groups.google.com/group/django-users/browse_thread/thread/c6abb660bc3d3de > he has spammed every list in India - and has now gone international --

Re: Need Help Understanding How To Use Built-In Authentication

2011-04-04 Thread Kenneth Gonsalves
On Mon, 2011-04-04 at 08:33 -0700, hank23 wrote: > I'm trying to understand the authentication built-in to django and > have some questions. Since the built-in authentication seems to > provide many if not all of the forms and views needed, then do I need > to code anything but calls to those

Re: Static/media url in template

2011-04-04 Thread Sam Walters
Yes it already exists {{MEDIA_URL}} Thats what the settings.py file does... There is a bunch of stuff you can read about in the docs: http://docs.djangoproject.com/en/1.3/howto/static-files/ Also for some of my own deployments there are a bunch of static file servers so i just put these into

Re: using a models fields

2011-04-04 Thread bishwendu kundu
You can try saving the data as latitude=models.DecimalField(max_digits=7,decimal_places=4).Same for the longitude field.Here the max_digits takes into account both decimal and non-decimal places.All the data can be given in string form as it will be automatically converted to proper format as

Re: .Net Developer Job Opening - Valencia, CA

2011-04-04 Thread Russell Keith-Magee
On Mon, Apr 4, 2011 at 11:55 PM, Casey Greene wrote: > Can we ban/filter this entire recruiting firm?  We already got this once: > http://groups.google.com/group/django-users/browse_thread/thread/c6abb660bc3d3de Done. He has been banned. Yours, Russ Magee %-) -- You

Static/media url in template

2011-04-04 Thread Jon J
Maybe I'm missing something... I would say I'm relatively familiar with the Django framework by this point. I'm mocking up a website, and I want to link static files into the base template. Instead of having the url's directly in the template, I'd like to call the STATIC_URL variable from within

Re: Johnny Cache on Django 1.3

2011-04-04 Thread Charlie Offenbacher
Alright, this was my bad! It was a silly configuration error. Just in case anyone else runs across this, I was using the pattern for local settings files where you do... try: from local_settings import * else: pass ... doesn't work so well if you have a syntax error in local_settings,

jQuery namespace woes - calling third-party scripts

2011-04-04 Thread Andre Terra
Hello. I'm trying to run the supersleight jQuery plugin ( http://allinthehead.com/retro/338/supersleight-jquery-plugin) for fixing PNG transparency in IE6 (this is a corporate intranet project, so I must support it). However, I'm having trouble calling the script because it's telling me jQuery

Re: creating a URL from scratch

2011-04-04 Thread Sandro Dutra
You've to informe on your URLConf. 2011/4/4 jay K. : > > Hello > > I have a website with www.xyz.com/subpage > > I want to change the name of the subpage > > how do you do it? > > thanks > > -- > You received this message because you are subscribed to the Google

Re: select_related() changes type of DecimalField?

2011-04-04 Thread Ian
On Apr 4, 12:05 pm, Carsten Fuchs wrote: > Is this a bug in Django? > If not, is there a better solution to the problem than using > isinstance() in every place where I have to compare DecimalField values? > (I'm still quite new to Python, and might be overlooking

Re: Johnny Cache on Django 1.3

2011-04-04 Thread Roy Smith
Weird choice of name for this project. Should have been "djohnny-cache" :-) On Mon, 2011-04-04 at 13:13 -0700, Charlie Offenbacher wrote: > I read the docs (and the issues in their bug tracker), but my > impression was that the main incompatibility with Django 1.3 is > transactions, which

using a models fields

2011-04-04 Thread jay K.
Hello, I got a couple of fields from a model I want to use so the models.py looks like this * class XZY(): latitude = models.CharField() longitude = models.CharField(.) zoomlevel = models.CharField()* I want to retrieve the data inside latitude, longitude and zoomlevel to

Re: Johnny Cache on Django 1.3

2011-04-04 Thread Charlie Offenbacher
I read the docs (and the issues in their bug tracker), but my impression was that the main incompatibility with Django 1.3 is transactions, which we're not using. Thanks for the reply, ~Charlie On Apr 4, 4:24 am, Daniel Hilton wrote: > On 4 April 2011 08:16, Charlie

Re: Problem if my id key is not an integer.

2011-04-04 Thread andy
Did you add a primary_key=True to your char field? On Apr 4, 11:46 am, "David.D" wrote: > My models all extend my custom model class which id is a CharField not > a PositiveIntegerField like the Django's default > django.db.models.Model . > > So, when I try to add a

creating a URL from scratch

2011-04-04 Thread jay K.
Hello I have a website with www.xyz.com/subpage I want to change the name of the subpage how do you do it? thanks -- 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

[django-ratings]Problem if my id key is not an integer.

2011-04-04 Thread David.D
My models all extend my custom model class which id is a CharField not a PositiveIntegerField like the Django's default django.db.models.Model . So, when I try to add a vote, I got a ValueError: invalid literal for int() with base 10: 'my-char-id' Because the object_id field is defined like this

Re: Advice: project hosting apps

2011-04-04 Thread spawgi
We use an internal implementation of Trac in our org. I think Trac has a good potential if used properly. However the Trac workflows are directed mostly towards development tasks and not QA tasks. Redmine also has good features from what I have read. But I have never used it. Here is a

[Template Filter] How to get rid of the extra 0 after the decimal point?

2011-04-04 Thread David.D
I hope to get this result: 34.000 --> 34 34.100 --> 34.1 34.120 --> 34.12 34.123 --> 34.123 But the output of floatformat filter is like this: 34.000|floatformat:"-3" --> 34 34.100|floatformat:"-3" --> 34.100 34.120|floatformat:"-3" --> 34.120 34.123|floatformat:"-3" --> 34.123 Thank

Form displays as textarea on local server, but text input on remote server

2011-04-04 Thread kelp
Hello, I have a form set up in the following way: from django.db import models from django import forms class ContactForm(forms.Form): subject = forms.CharField(max_length=100) message = forms.CharField(widget=forms.Textarea) sender = forms.EmailField() cc_myself =

Re: Johnny Cache on Django 1.3

2011-04-04 Thread Matteius
Please keep us updated when a new release is available, I've had this on my list of things to try for a while. On Apr 4, 3:24 am, Daniel Hilton wrote: > On 4 April 2011 08:16, Charlie Offenbacher > > > > > > wrote: > > Hi everyone! > > >

Re: multilingual django

2011-04-04 Thread Andre Terra
You'll need to run something like ./manage.py makemessages -l pt_BR This would be the command for generating Brazilian Portuguese language files. -l is the same as --locale=pt_BR. Please refer to the docs for some specifics. These two sections should be the most relevant for you right now:

select_related() changes type of DecimalField?

2011-04-04 Thread Carsten Fuchs
Dear Django list, using Django 1.3 with Python 2.6.5 on Ubuntu 10.04 and mod_wsgi, with Oracle database, I've just experienced a case where the use of select_related() changes the result type of a DecimalField in a related object from decimal.Decimal to float (which in turn breaks my

Re: .Net Developer Job Opening - Valencia, CA

2011-04-04 Thread Casey Greene
Can we ban/filter this entire recruiting firm? We already got this once: http://groups.google.com/group/django-users/browse_thread/thread/c6abb660bc3d3de This user is obviously spamming lots of inappropriate lists:

.Net Developer Job Opening - Valencia, CA

2011-04-04 Thread Makro Tech
Hi This is Vignesh with Makro Technologies, Inc. We have been in business for over 10 years and we are one of the Fast 500 National IT staffing and Solution firms in USA. Our clients include country’s top-notch IT, Healthcare, Pharmaceutical, Financial, Telecom,Government and other industries.

Re: Odd problem with queryset

2011-04-04 Thread Adam Tonks
On Monday, April 4, 2011 4:34:10 PM UTC+1, bruno desthuilliers wrote: > > If you really did test on the very same data set, same forum, *same > thread* (IOW ; same value for "self.pk") etc, you would'nt get an > IndexError, so there's obviously something different. > I was literally just

Re: Odd problem with queryset

2011-04-04 Thread bruno desthuilliers
On 3 avr, 23:12, Adam Tonks wrote: > I have a function in a model to return the first post in a forum thread.  At > the moment, it looks like this: > > return Post.objects.filter(thread = self.pk).order_by('created') > > When I run it in my test forum, the code returns two

Need Help Understanding How To Use Built-In Authentication

2011-04-04 Thread hank23
I'm trying to understand the authentication built-in to django and have some questions. Since the built-in authentication seems to provide many if not all of the forms and views needed, then do I need to code anything but calls to those views, from my own views, which will pass the various bits of

Re: Do you combine you Django decorators?

2011-04-04 Thread andy
Thanks man this is even better. I have though about doing something like this in the past but I thought using signals was how django did things like this. I've been using middleware and never even though about what they really do or how they work -- that's bad. On Apr 4, 2:20 am, Sam Walters

Re: Authentication system

2011-04-04 Thread Bryan
http://docs.djangoproject.com/en/1.3/topics/auth/#limiting-access-to-logged-in-users You can either put the @log_required decorator on each of the views you want protected, or you can do it the raw way (see link), which may offer more flexibility. On Apr 4, 5:22 am, GOUTAM KUMAR RANA

RE: Documentation Checked But Unclear: How to supress form.errors from views when needed?

2011-04-04 Thread Henry Versemann
Yes. First thanks for the response. I'm doing some experimenting with the forms and well as the requests and possibly reusing them as much as possible, and one thing I thought I'd try was to reuse values from a previous screen which some of the same fields names and types, so that when the new

Re: Authentication system

2011-04-04 Thread Tonton
> Briefly, your middleware will check if request.user either > is_authenticated or is_anonymous, then issue a redirect for those not > logged in. > > Shawn > > i don't know maybe test the login state in your urls.py before evrything tonton -- You received this message because you are

Re: Advice: project hosting apps

2011-04-04 Thread Javier Guerra Giraldez
On Mon, Apr 4, 2011 at 8:25 AM, Peter Herndon wrote: > I want to provide per-project issue > tracking, wiki or other documentation building, and a nice view of > each project's git repository. i use Fossil (http://www.fossil-scm.org) here's a nice blog about it:

multilingual django

2011-04-04 Thread jay K.
Hello, Currently I have 2 folders, one for german and english language translations, respectively The translations are inside a django.po file for each language. I want to add a new language How can I do it? thanks -- You received this message because you are subscribed to the Google Groups

Re: Odd problem with queryset

2011-04-04 Thread Dmitry Kharlamov
Sorry, meant None instead of NULL — crazy past week with lots of JS in my life! On Apr 4, 1:35 am, Adam Tonks wrote: > At the suggestion of someone on IRC, I tried accessing the first result from > within my template, using {{ thread.original_author.0 }} (where >

Re: Odd problem with queryset

2011-04-04 Thread Dmitry Kharlamov
Try to instead limit the QuerySet: try: post = Post.objects.filter(thread = self.pk).order_by('created')[: 1].get() except DoesNotExist: post = NULL return post # or do something else http://docs.djangoproject.com/en/1.3/topics/db/queries/#limiting-querysets On Apr 4, 1:35 am, Adam

Re: Advice: project hosting apps

2011-04-04 Thread Kristaps Kūlis
Hi, Redmine(Ruby on Rails) and Trac(Python) are two most popular alternatives. Redmine is far easier to setup for multiple projects. Both support Wiki / issue tracking and git :) Btw, Code.Djangoproject.com uses Trac. On Mon, Apr 4, 2011 at 4:25 PM, Peter Herndon

Python Decorators

2011-04-04 Thread cootetom
Hi all, not exactly a django question but here goes... I'm trying to implement a decorator with one positional argument and one keyword argument. My wrapper function gets the positional argument just fine but the keyword argument throws an error "NameError: name 'as_string' is not defined." Code

Advice: project hosting apps

2011-04-04 Thread Peter Herndon
Hi all, I'm tasked to build an internal project hosting site similar to Github or Bitbucket for my employer, and I'm wondering what the current state-of-the-art is for this. I want to provide per-project issue tracking, wiki or other documentation building, and a nice view of each project's git

Re: Authentication system

2011-04-04 Thread Shawn Milochik
Do the check in middleware instead of using the login_required decorator everywhere. There are snippets on DjangoSnippets for it. They vary slightly in design, so check them out and pick the one that's best for your situation. Briefly, your middleware will check if request.user either

Re: Authentication system

2011-04-04 Thread Tonton
i beleve it is @login_required before the method in views.py to protect access by decorators http://docs.djangoproject.com/en/1.3/releases/1.2/ On Mon, Apr 4, 2011 at 2:22 PM, GOUTAM KUMAR RANA wrote: > How to port authentication system to every page so that only logged

Authentication system

2011-04-04 Thread GOUTAM KUMAR RANA
How to port authentication system to every page so that only logged in will able to view the pages or else it shall redirect to the login page giving error that user should be logged in first. for a custom project is the djangos admin used for login features or we can have our own. please help me

Re: admin cannot edit records with 'add' as primary key

2011-04-04 Thread Marwan Al-Sabbagh
Exactly, I think an assumption was made in the original design of the URLs about the values of the primary keys, maybe that they would be numeric. So this case brakes that assumption. Marwan On Mon, Apr 4, 2011 at 12:52 AM, Marc Aymerich wrote: > > > On Fri, Apr 1, 2011 at

Re: model refuses to save when manytomany field is blank

2011-04-04 Thread Kenneth Gonsalves
please ignore this - there was some validation that was messing with things On Mon, 2011-04-04 at 15:41 +0530, Kenneth Gonsalves wrote: > hi, > > i have a model like this: > class Incident(models.Model): > > escalate = models.IntegerField() > escalatelist = >

model refuses to save when manytomany field is blank

2011-04-04 Thread Kenneth Gonsalves
hi, i have a model like this: class Incident(models.Model): escalate = models.IntegerField() escalatelist = models.ManyToManyField(Escalatelist,null=True,blank=True) other fields removed for clarity. If I save this in admin, I get this error: 'Incident' instance needs to have a

Re: django-admin.py startproject mysite

2011-04-04 Thread Jiten Singh
Hi Santiago, I think there is some problem in your installation of Django 1.3 , i installed it myself and there is no problem with *django-admin.py startproject mysite* even the help of django-admin-py lists startproject command I think re-installation can work. *Best Regards, Jitendra

Re: Johnny Cache on Django 1.3

2011-04-04 Thread Daniel Hilton
On 4 April 2011 08:16, Charlie Offenbacher wrote: > Hi everyone! > > I'm try to install johnny-cache on Django 1.3. I literally followed > the instructions here (http://packages.python.org/johnny-cache/#) > exactly, using the memcached version. > > Evverything runs

django-admin.py startproject mysite

2011-04-04 Thread Santiago Caracol
Hello, the Django (1.3) tutorial says: >From the command line, cd into a directory where you’d like to store your code, then run the command django-admin.py startproject mysite. This will create a mysite directory in your current directory. When I run django-admin.py startproject mysite, I

Re: Read write config from a file. How?

2011-04-04 Thread Roberto De Ioris
On Apr 3, 4:31 am, hollando wrote: > Yes. Thanks for your replies. > > I have one more question. I want to put all my configures into one > file and pass the file name by command line. > My django is deployed as in uwsgi, so I pass the command line by -- > pyargv '-c

Johnny Cache on Django 1.3

2011-04-04 Thread Charlie Offenbacher
Hi everyone! I'm try to install johnny-cache on Django 1.3. I literally followed the instructions here (http://packages.python.org/johnny-cache/#) exactly, using the memcached version. Evverything runs okay, but nothing gets cached at all when I telnet to memcached. When I used cache-machine,

Re: Do you combine you Django decorators?

2011-04-04 Thread Sam Walters
Hi Andy I dont combine them... however: I was using a couple of decorators for almost every view in one project. Ended up putting them in middleware. Are these decorators for every view? Maybe you should consider middleware too. cheers sam_w On Mon, Apr 4, 2011 at 3:26 AM, andy

Re: Documentation Checked But Unclear: How to supress form.errors from views when needed?

2011-04-04 Thread Sam Walters
I dont understand so you render a view with a form once and you get form errors on the initial view? Or Is there a POST/GET with formdata being submitted generating this issue? *which would be by design as fas as i can tell you want form verification to work Note:

Re: noobie cannot get mod_wsgi to import settings

2011-04-04 Thread Sam Walters
Hi I dont usually deal with Apache+WSGI (usually fcgi + nginx) However your script: WSGIScriptAlias /wsgi /var/www/wsgi-scripts One of my apache sites: WSGIScriptAlias / /home/hvv00/hvv/wsgi/hvv.wsgi Point directly this directly to the file. Note: You wont need to chmod 777 anything