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 solução que permita referen
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 fixing this error.When is u
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 Django: Rich Gis Web Applications With Python" is t
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 text".replace(char 3026
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
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
> Yes,
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 model (which has worked
>
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 TemplateView.as
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
> terminal/command line.Is there any e
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.
>
> --
> You received this message because
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 because you are subscribed to
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 that account/profile and h
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 import auth) on a custom mad
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 search engine but a JavaScript library which helps you
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.
2013/7
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 receiving emails from it, send
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
edit
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
>
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)
>
>
> Hello, I'm stuck in a e
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
> hi :
# 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 (PDT)
> yang guang wr
ceive 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_something() ma
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 n
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
> So sorry, but I never try to do this via AJAX request, but I know there's
> a way, Django probably pro
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 Groups
> "Django user
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 Movie.objects.get = (id = id)*
> *
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
> the id, then just se
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 like this:
> http://loca
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 DjangoUnico
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
> site
> (login, logout, profile u
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
> site
> (login, logout, profile u
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/
>
> El 14/05/2012, a las
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 w
more:
https://docs.djangoproject.com/en/1.4/ref/contrib/admin/actions/
2012/4/11 Sandro Dutra
> # File: admin.py
> from django.contrib import admin
> from distribute.models import Categories
> (...)
> class CategoriesAdmin(admin.ModelAdmin):
> list_di
# 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,
> Could anyone provid
# 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 windows and in unix. Ras
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 you are subscribed to the Go
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 :
> > Try
> > TEMPLATE_DIRS = ("C:/Users/Do
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 of my applications and I w
"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 book online
> for Django, so
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
> local domain -- e.g., http:/
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 command: "django-
> adm
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__))
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 call last):
> File "/
[...]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. This was fixed after the 1
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.
>
> C:\Python27\Django-131\django\bin\mysite>manage.py s
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 'yourtemplatesdir/admin/'
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
>>> YOURSELF.
>>
>> you were req
'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 yo
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:
http://www.jet
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 ImageModel
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 wrote:
>
>> Hi al
'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 S
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 u
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 Groups
> "Django users" group.
> To
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
> like
>
> http://www.xzy.co
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: os.path.absp
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 features), but I like it beca
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
> Here's my javascrip
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
> static files...
>
>
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 m
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
> On
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:
(...)
(...)
, its really funky looking, 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
> Thanks!
> Lisa
>
>
> On Tue, Oct 5, 2010 at 6:34 PM, Sandro Dutra wrote:
>
>> You have to check if you enable the "admin" application on your
>> settings.py.
>>
>> 2010/10/5 Sithembewena Lloyd Dube
>>
>> Hey Lisa,
>>>
>&
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 you trouble is:
>
>
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, Brandon Taylor wrote
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 writing script (like auto-completion) ,,,i dont want GUI
"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 E-Commerce in favor of T
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
70 matches
Mail list logo