Re: Criar slideShow

2014-06-25 Thread Sandro Dutra
Você está em uma lista de discussão internacional, se espera alguma resposta, escreva em inglês. You're on international group, if you expect some answer, write in english. 2014-06-24 21:50 GMT-03:00 Carlos Andre : > Olá pessoal, tudo bem com todos? > Gostaria de uma

Re: How to fix this error?

2014-03-21 Thread Sandro Dutra
You're trying to use a MySQL database without the proper library installed, download the python-mysql. http://stackoverflow.com/questions/372885/how-do-i-connect-to-a-mysql-database-in-python 2014-03-21 16:34 GMT-03:00 Aayush Aggarwal : > Hello! > > Please help me in

Re: "Beginning Geo Django: Rich Gis Web Applications With Python" Where can I get the book?

2014-02-21 Thread Sandro Dutra
Buy the book and don't be fool! 2014-02-21 10:02 GMT-03:00 Tom Evans : > On Fri, Feb 21, 2014 at 10:15 AM, Ram Shrestha > wrote: > > Dear All, > > I am want to learn GeoDjango in real world application. I believe this > book > > "Beginning Geo

Re: Invalid control character char 30262

2013-11-11 Thread Sandro Dutra
Try to write on top of this file: # -*- coding: utf-8 -*- Maybe help. 2013/11/11 Chi Tak Lam > Is there anyone can help? > > I think i should do a str.replace(old, new)? > but i not sure what i should i set for 'old' and 'new' argument... > > something like this? > "my

Re: Formatacao

2013-10-25 Thread Sandro Dutra
First it's recommeded to post in english. Recomendado postar em inglês. Não sei que essa template tag "foundation" faz, você precisa explicar, tendo em vista que ela não é built-in, já a referência de floatformat está aqui: https://docs.djangoproject.com/en/1.5/ref/templates/builtins/#floatformat

Re: Bug in admin models?

2013-10-25 Thread Sandro Dutra
Sorry, I didn't see the django.contrib.admin. You're overrriding the add method for you model? Because it's appear the add method is returning None: Exception Type: TypeError at /admin/myapp/mymodel/add/ Exception Value: 'NoneType' object has no attribute '__getitem__' 2013/10/25 Derek

Re: Bug in admin models?

2013-10-23 Thread Sandro Dutra
Can't see the django.contrib.admin in INSTALLED_APPS. 2013/10/23 Derek > I am trying to add a model entry, via the admin; I get this error (which > has not happened before), running Django on Ubuntu 12.04 with the test > server. Not sure if there is an error with the

Re: Stuck with TemplateDoesNotExist at /

2013-09-02 Thread Sandro Dutra
Django cannot load the template, probably the path is wrong, try to put this in your settings: TEMPLATE_DIRS = (os.path.join(os.path.dirname(__file__), '..', 'templates').replace('\\','/'),) About the views, I think you don't need to code it if in your urls.py you already used the

Re: Button/URL admin Django interface

2013-07-09 Thread Sandro Dutra
Probably you've to edit the admin base template, only this. 2013/7/9 Giorgos Kontogiorgakis > Hello everyone! > > I am trying to add a button or a URL on my main admin Django interface so > i can call a script from this button/url without executing this by >

Re: model relationship

2013-07-05 Thread Sandro Dutra
https://docs.djangoproject.com/en/1.5/topics/db/models/#relationships 2013/7/5 Kakar Arunachal Service > Hello, > Please guide me in model relationship. When to use many to many, many to > one, one to one relationships??? I'm all confused. > Thank you. > > -- >

Re: Multi-laguage website

2013-07-05 Thread Sandro Dutra
https://docs.djangoproject.com/en/1.5/topics/i18n/translation/# 2013/7/5 Somnath > Hello, > > I'm trying to make multilanguage website by .po file > but i'm unsuccessful. > please give me steps to make multi language django site. > > -- > You received this message

Re: login successfully takes to account/profle

2013-07-05 Thread Sandro Dutra
You already try to put this option in settings.py? LOGIN_REDIRECT_URL = "/" 2013/7/5 Sivaram R > I am developing an django app,now the problem is after successfull > login,it takes me to account/profile which is no longer available in > django urls.But after removing

Re: Custom Authentication

2013-07-03 Thread Sandro Dutra
You can extend the User Model: https://docs.djangoproject.com/en/dev/topics/auth/customizing/#extending-the-existing-user-model 2013/7/3 > Hello, > > I am a newbie to Django and would wish to know if it possible to use the > authentication scheme(from django.contrib

Re: jquery in django

2013-07-01 Thread Sandro Dutra
I really think your problem is not Django related, I suggest you to learn JQuery and post your doubts on related group. 2013/7/1 Harjot Mann > On Mon, Jul 1, 2013 at 10:50 PM, François Schiettecatte > wrote: > > Hi > > > > jQuery is not a

Re: jquery in django

2013-07-01 Thread Sandro Dutra
Say what you try, show your models and your code and maybe we can help or try to find a package that suit your needs: https://www.djangopackages.com/search/?q=search Your first post was not django related and now is lacking information, we can't guess what you're doing correctly or wrong.

Re: jquery in django

2013-07-01 Thread Sandro Dutra
Open your template and type: And code. 2013/7/1 Harjot Mann > How can I embed jquery in django for searching??? > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop

Re: Django-admin-tools unicode problem

2013-06-28 Thread Sandro Dutra
Como o Gilberto postou, pode haver um problema quando o teu editor de textos salva o arquivo do template, tente abrir este template pelo bloco de notas e ao 'salvar como' deve haver um campo lá embaixo para selecionar a 'Codificação', selecione UTF-8 e salve ou tente a configuração relativa no

Re: Django-admin-tools unicode problem

2013-06-26 Thread Sandro Dutra
Jaimerson, ainda assim creio que você deva tentar adicionar ao topo de suas views e/ou dos módulos usados do admin-tools a linha: # -*- coding: utf-8 -*- ou # -*- coding: iso-8859-1 -*- Isso permitirá ao Python ler o arquivo no encoding definido. 2013/6/26 Jaimerson Leandro Amaro de Araújo

Re: Django-admin-tools unicode problem

2013-06-26 Thread Sandro Dutra
Think it's an encode problem. I never use this app but try to add this line o top of your views file: # -*- coding: utf-8 -*- 2013/6/26 Jaimerson Leandro Amaro de Araújo > (I posted this on django-admin-tools mail list, but apparently there's no > one alive there) >

Re: hi [django-users]How to define the response?

2013-06-26 Thread Sandro Dutra
Did you test this code? I think this code has errors... If your objective is parse html/xml/json I think you've to check if the application doesn't provide an API, and use the correct python library to parse. If you need to parse by force, I think you can use BeautifulSoup. 2013/6/26 lx

Re: how to change the root url of a project?

2013-06-26 Thread Sandro Dutra
# urls.py [...] from django.views.generic import TemplateView [...] urlpatterns = patterns('', [...] url(r'mysite/', TemplateView.as_view(template_name="index.html")), [...] ) or import the view you want to use. 2013/6/26 Jani Tiainen > On Wed, 26 Jun 2013 04:40:26 -0700

Re: hi [django-users] How to do something after "return HttpResponse(html)"?

2013-06-25 Thread Sandro Dutra
; > 1. > receive the xml file from client. > > 2. > if (the xml format is ERROR) == True: > return HttpResponse(ERROR FORMAT") > else: > return HttpResponse(RIGHT FORMAT") > #I must give a response first, And do other thing. Because the spend > time of do_

Re: hi [django-users] How to do something after "return HttpResponse(html)"?

2013-06-25 Thread Sandro Dutra
The question is: What you're trying to do? 1. You can do any other process before the return line, the return will be the same... for example: from django.http import HttpResponse from datetime import datetime def current_datetime(request): now = datetime.now() html = "It is

Re: Set function to receive POST request

2013-06-24 Thread Sandro Dutra
Do you already read this: https://docs.djangoproject.com/en/dev/ref/contrib/csrf/#ajax it appears to pass csrf via ajax has some incoveniences... 2013/6/24 Sandro Dutra <hexo...@gmail.com> > So sorry, but I never try to do this via AJAX request, but I know there's > a way, Dja

Re: Set function to receive POST request

2013-06-24 Thread Sandro Dutra
So sorry, but I never try to do this via AJAX request, but I know there's a way, Django probably provides a way... 2013/6/24 Hélio Miranda > Nadae, > tried that disses you, but gives the same error > > -- > You received this message because you are subscribed to the Google

Re: Set function to receive POST request

2013-06-24 Thread Sandro Dutra
You've to write {% csrf_token %} after the tag, for example: {% csrf_token %} ... 2013/6/24 Hélio Miranda > Hi! > My problem is this, I have the following function: > *def delete (request, id):* > * if request.method == 'POST':* > * my_painting

Re: Get url parameters

2013-05-15 Thread Sandro Dutra
gfsp = GridFSProxy() gfsp.variable Where variable is the variable name that contains the data storing the number you want yo retrieve. I think it can solve your problem. 2013/5/15 Hélio Miranda : > So I mean the client side in my application I have to be able to access only >

Re: Get url parameters

2013-05-15 Thread Sandro Dutra
Your view is returning a GridFSProxy object, not a class/method variable. You've to call a instance of your GridFSProxy, so you'll can access the relative data. 2013/5/15 Hélio Miranda : > Hi > > I need to get a parameter from the url and do not know how. > If my url looks

Translation: DjangoUnicodeDecodeError

2012-10-25 Thread Sandro Dutra
Hi, I'm having a little problems with translations... I've various {% trans "anything" %}, everything is correctly configured, I do the makemessages and compilemesages with sucess, and everything works correctly, but I've a problem, when I insert special characters in *.po files, I get

Re: Django-registration tutorial + code

2012-05-16 Thread Sandro Dutra
I always used the native authentication API and it's sufficient for me, well documented: https://docs.djangoproject.com/en/1.4/topics/auth/ 2012/5/16 francescobocca...@libero.it > Hi all, > i'n new of Django and i like to create an registration user form my web >

Re: Django-registration tutorial + code

2012-05-16 Thread Sandro Dutra
I always used the native authentication API and it's sufficient for me, well documented: https://docs.djangoproject.com/en/1.4/topics/auth/ 2012/5/16 francescobocca...@libero.it > Hi all, > i'n new of Django and i like to create an registration user form my web >

Re: Help - Which IDE is best to use.

2012-05-14 Thread Sandro Dutra
Again... Please search before create one more of this messages about "What's IDE is best?". The best IDE is the IDE you fell confortable using. There 666 topics about this here, search... 2012/5/14 Eneldo Serrata > Aptana or Eclipse with PyDev Plugin > http://pydev.org/

Re: Presentation Viewer on django

2012-05-07 Thread Sandro Dutra
About PDF's you can use any PDF API for Python like reportlab and see examples like this: https://docs.djangoproject.com/en/dev/howto/outputting-pdf/?from=olddocs PPT is a proprietary and closed spec format from MS Powerpoint, probably you've to reverse engineering (or search for format spec) to

Re: Admin area hyperlinks to sub categories

2012-04-11 Thread Sandro Dutra
more: https://docs.djangoproject.com/en/1.4/ref/contrib/admin/actions/ 2012/4/11 Sandro Dutra <hexo...@gmail.com> > # File: admin.py > from django.contrib import admin > from distribute.models import Categories > (...) > class CategoriesAdmin(admin.ModelAdmin): > l

Re: Admin area hyperlinks to sub categories

2012-04-11 Thread Sandro Dutra
# File: admin.py from django.contrib import admin from distribute.models import Categories (...) class CategoriesAdmin(admin.ModelAdmin): list_display = ['category'] (...) (...) admin.site.register(Categories, CategoriesAdmin) (...) 2012/4/11 Swaroop Shankar V > Hi,

Re: Problemas con syncdb

2012-04-03 Thread Sandro Dutra
# Or *path to database file* if using *sqlite3*. 2012/4/3 DIEGO CENZANO PRADO > I am trying to do the tutorial and I get an error doing 'python manage.py > syncdb'. I am using the DATABASES as it is created and I've try to use > sqlite3 and mysql backends. I tried it in

Re: where do you host your django app and how to you deploy it?!

2012-04-02 Thread Sandro Dutra
Webfaction, Excelente support, service it's up to date, well documented and good price. deployment made with WSGI. 2012/4/2 fix3d > Where do you host your django app and how to you deploy it?! > > Please share personal exp. > > -- > You received this message because

Re: Template file not recognized for some strange reason

2012-03-30 Thread Sandro Dutra
Try something like this: import os abspath = lambda *p: os.path.abspath(os.path.join(*p)) PROJECT_ROOT = abspath(os.path.dirname(__file__)) [...] TEMPLATE_DIRS = (abspath(PROJECT_ROOT, "templates"),) 2012/3/30 Tom Evans > 2012/3/30 Juan Pablo Martínez

Re: Autofill dropdown with django

2012-03-22 Thread Sandro Dutra
I think it's more Javascript/AJAX than Django, obviously you'll need to do a function that uses HttpRequest.is_ajax(), but in the end, the core of this code is more Javascript/AJAX than Django. 2012/3/22 Karthik Abinav > hey, > > I needed a autocomplete utility in one

Re: Django making box

2012-03-13 Thread Sandro Dutra
"The task that I should do is to click on a box and it generates new boxes above it by every clicking on it." I think JavaScript (jQuery) is the best option to achieve this. 2012/3/13 Sophia > Hi guys, > > I'm completely a beginner in writing Django codes, I read the

Re: How do I go to "/admin/" on my local domain?

2012-03-13 Thread Sandro Dutra
Probably you forget to launch the dev server. python manage.py runserver Only after this you can open your browser and go to admin, if it's correctly configured on urls.py. 2012/3/13 Sumaiya > From Tutorial 2: "Now, open a Web browser and go to "/admin/" on your >

Re: Problems getting started

2012-03-07 Thread Sandro Dutra
I don't know how it's works on a Linux box, but on Windows we've to put Python/Scripts on PATH variable to use the command directly. 2012/3/7 Clark > After installing Django I am attempting to start a new project. After > creating a directory for this, I tried using the

Re: Error on Tutorial Part 3 - https://docs.djangoproject.com/en/1.3/intro/tutorial03/

2012-02-29 Thread Sandro Dutra
Try: 'C:\Python27\my_Djando_projects\mysite\My_Templates\polls\index.html' 'C:\Python27\my_Djando_projects\mysite\My_Templates\polls\' 'C:\Python27\my_Djando_projects\mysite\My_Templates\' Or: abspath = lambda *p: os.path.abspath(os.path.join(*p)) PROJECT_ROOT = abspath(os.path.dirname(__file__))

Re: error while testing

2012-02-13 Thread Sandro Dutra
Think it's a name conflict with the model Location, probably it's registered 2 times in "admin.py" (line 4), or try to change the model name. 2012/2/13 xina towner : > I'm getting this error when I try to do my tests, can anybody help me > please? > > Traceback (most recent

Re: https://code.djangoproject.com/ticket/16909

2012-02-10 Thread Sandro Dutra
[...]Django 1.4, scheduled for March 2012.[...] from https://docs.djangoproject.com/en/dev/releases/1.4-alpha-1/ 2012/2/10 Craig Blaszczyk : > Hi All, > > I need the bugfix from this ticket. This ticket is assigned to Version 1.3, > and was closed as fixed 5 months ago.

Re: MySQL Query

2012-02-08 Thread Sandro Dutra
Probably you've to install python-mysqldb. 2012/2/8 Bill : > Hello > > I am completing the Django tutorials, however I am having a problem > when syncing the DB to Django.  I am getting the following message. > Any help would be appreciated. > >

Re: No Module named URLS

2012-02-06 Thread Sandro Dutra
If I understand you're writing a template for admin, and this is not required 'cause the admin template is called by the contrib 'django.contrib.admin', in INSTALLED_APPS (settings file), only if you want to customize admin, you can override the admin files, putting them o

Re: what is the best IDE to use for Python / Django

2012-01-23 Thread Sandro Dutra
The best IDE is that you fell comfortable using it. 2012/1/21 goosfancito : > El 21/01/12 08:52, kenneth gonsalves escribió: > >> On Sat, 2012-01-21 at 03:34 -0800, John Yeukhon Wong wrote: >>> >>> While it has been asked a trillion times already, let me say TRY UT >>>

Re: tutorial 2 admin site problem

2012-01-18 Thread Sandro Dutra
'Cause you only reproduce the steps and don't try to understand what's happening. In URLS file you'll see the administration is pointed to '^admin/', so you'll acess the administration via www.yoursite.com/admin, in your case, running on localhost and port 8000 localhost:8000/admin, it's obvious

Re: Which IDE should I use for Django?

2011-12-21 Thread Sandro Dutra
I bought PyCharm at launch and I did not regret. Today all my Python work, not only Django, is made with PyCharm, I'm using 1.5.4 and when I can, I'll upgrade to version 2. PyCharm is payed, but if you'll work on a open source project, you can apply to a Open Source Project License:

Re: iterating through lists in templates

2011-11-25 Thread Sandro Dutra
Think you're not undesrtanding... Example: python code: myList = ["one", "two", "three"] for item in myList: print item output: one two three django template tag "for" can get the itens in list in same way... but you get the itens and the instance variables of the model model: class

Re: iterating through lists in templates

2011-11-25 Thread Sandro Dutra
Number of Images: {{ imageList.count }} {% for image in imageList %} Image NameImage File {{ image.name }}{{ image.file }} {% endfor %} 2011/11/25 Ivo Brodien : > You should pass a list of images to the template and iterate over this list. > > On Nov 25, 2011, at 14:18, marjenni

Re: Django app, part 1, error with the database

2011-11-01 Thread Sandro Dutra
'NAME': 'C:/Users/songbird/Desktop/bdd/' # Or path to database file if using sqlite3. You're using a SQLite database, so you've to provide the full path to SQLite database file, for example: 'NAME': 'C:/Users/songbird/Desktop/bdd/mydb.db3' instead only the path to directory. 2011/11/1 Nikolas

Re: framework web comparison

2011-04-07 Thread Sandro Dutra
I choose Django, in first place, for one motive: Python. But first I tested others web frameworks based on Python, like: Pylons and Turbo Gears, but Django offer me a excellent documentation with a simple tutorial and community support, a free and complete book and on a few minutes I've a project

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: new subpage in django

2011-03-30 Thread Sandro Dutra
Probably adding "http://www.xzy.com/subpage/subpage2; to your URLConf. 2011/3/30 jay K. : > hello, > > what i'm trying to do is to create a subpage for a website written in django > > e.g. > > for http://www.xzy.com/subpage I'd like to add 'subpage2', so it would look

Django 1.3 - Question about static files

2011-03-25 Thread Sandro Dutra
Hello everyone! I'm using Python 2.7.x with Django 1.3 and I've some questions about the new way to set the static files for the dev server. My Settings: - abspath = lambda *p:

Re: Looking for IDE + FTP

2011-02-08 Thread Sandro Dutra
I'm using PyCharm... 2011/2/8 Karen McNeil > I have three Django sites that I've been working on recently and I've > been doing most of the development work in Dreamweaver. I don't use > any of the wysiwyg features (or, pretty much, any of the Dreamweaver > program

Re: Where Is My Javascript Code's Problem?

2011-01-21 Thread Sandro Dutra
LOL! What are you trying to do, guy? It's obvius the alert box will appear, 'cause it's a visual element. But the rest of the code only set a bunch of variables, it's not printing anything, it's not launching any alert, so what are you waiting to happen? 2011/1/21 hank23

Re: Static files ...

2010-11-13 Thread Sandro Dutra
As m1chael said it's a very common subject and it's already answered several times on this list. Simple do a searh and you'll find your answer. 2010/11/13 m1chael > Hi.. > > This is a common subject! > > Your best bet is to just configure apache or lighthttpd to serve your >

Re: Noob » Tutorial » UnicodeDecodeError in ‘bas ehttp.py’

2010-10-21 Thread Sandro Dutra
To use unicode characters, I put on the top of source file: -*- coding: utf-8 -*- and before any string I put an "u", like: u"My unicode string". On templates, I save the file as utf-8. There's no workaround, only code. 2010/10/21 PureVirtual <1min...@gmail.com> > For people who might have the

Re: The problem about load css/js when developing.

2010-10-17 Thread Sandro Dutra
1. settings.py [...] MEDIA_ROOT = "/absolute/path/to/media/" [...] 2. urls.py [...] from django.conf import settings [...] (r"^your-media-dir/(.*)$", "django.views.static.serve", {"document_root": settings.MEDIA_ROOT}), [...] 3. your base template [...] [...] 2010/10/17 Daniel Roseman

Re: Serve static file from cdn

2010-10-08 Thread Sandro Dutra
Really... As Daniel said, I can't see any problem... only refer your static into your templates like: Your javascript URL: http://commondatastorage.googleapis.com/static/media/node.js On template: (...) (...)

Re: admin site not working, problem with urls.py?

2010-10-06 Thread Sandro Dutra
king, it > > definitely works, but its like its missing a template. > > Do yout hink its b/c the version of django on teh server is old? > > Its 1.0.4 > > > > If thats the problem, what is the easiest way to upgrade django on > > Ubuntu 8.10? > > >

Re: admin site not working, problem with urls.py?

2010-10-06 Thread Sandro Dutra
; 8.10? > > Thanks! > Lisa > > > On Tue, Oct 5, 2010 at 6:34 PM, Sandro Dutra <hexo...@gmail.com> wrote: > >> You have to check if you enable the "admin" application on your >> settings.py. >> >> 2010/10/5 Sithembewena Lloyd Dube <

Re: admin site not working, problem with urls.py?

2010-10-05 Thread Sandro Dutra
You have to check if you enable the "admin" application on your settings.py. 2010/10/5 Sithembewena Lloyd Dube > Hey Lisa, > > Look at this line (supplied by you): > > > # (r'^ccu/', include('ccu.foo.urls')), > > ^^ the line above is correct. > > Now, the line that's giving

Re: PyDev create new project wizard creates two folders in Aptana Studio 3?

2010-10-05 Thread Sandro Dutra
When you try to create a project, Aptana duplicates the root directory automatically. A issue... To correct this, you only have to observe the path when you're creating the Django project. 2010/10/2 payala > > Check if you are in the python perspective > > On 1 oct, 19:34,

Re: IDE for Python/django

2010-09-27 Thread Sandro Dutra
I like Eric and Aptana. 2010/9/27 João Rodrigues > http://code.google.com/p/trespams-vim/ > > On 27 September 2010 14:00, girish shabadimath > wrote: > > actually i use vim for writing python scripts , i wanted IDE to easy my > > tasks of

Re: Recommend a book

2010-09-24 Thread Sandro Dutra
"The Definitive Guide to Django: Web Developement Done Right", Apress, updated Django 1.1 "Pratical Django Projects", Apress, updated Django 1.1 2010/9/24 Shawn Milochik > > On Sep 24, 2010, at 6:53 AM, Franklin Einspruch wrote: > > > I recommend against Beginning Django

Re: Pylons vs. Django

2010-09-06 Thread Sandro Dutra
1. It's possible to use Mako and SQLAlchemy with Django too, as Steven writes. 2. As Bruno writes, Django it's a easy-learn piece of software and Pylons uses third-party software (and 2 powerfull ones), so, to extract the full power of Pylons you've a major learning curve, while Django is sit and