Re: AttributeError at /admin/coltrane/entry/add/ 'Entry' object has no attribute 'pubdate'

2012-04-04 Thread akaariai
Do you get a stacktrace from the error? You should get one, and it should point out the code-path to the erroneous pubdate usage. If you do not get one for one reason or another, search your project for the string "pubdate" and go through all locations containing that string. The code snippets you

Re: custom manager to control access

2012-04-04 Thread akaariai
On Apr 4, 3:15 am, Mike Dewhirst wrote: > I have now discarded the idea :) > > I'm not very comfortable with thread locals. I need a bullet-proof > approach which makes data from other companies invisible to members of > this company. I suppose a view decorator is the way to go but I would > have

Problem using django-admin.py in a virtual environment

2012-04-04 Thread DIEGO CENZANO PRADO
I have install django with 'python setup.py install' in a virtual environment called 'django1.3' I run it and receive the following error mesage: (django1.3) C:\Documentos de Diego\Dropbox\Codigo\Django>django-admin.py Traceback (most recent call last): File "C:\Environments\django1.3\Script

Re: Profiling Django (WAS Django database-api)

2012-04-04 Thread Tom Evans
On Tue, Apr 3, 2012 at 11:25 PM, Andre Terra wrote: > Hey Javier, > > Thanks for the reply. My problem with the logs in the past was that they > tended to make the task even slower (due to recursion) but I guess that's > probably because I didn't call the logging from the appropriate places in > t

Re: Django Contrib Auth + Class Based Generic Views

2012-04-04 Thread Sergiy Khohlov
So much code . Ok, lets start 2012/4/4 Matheus Ashton : > urls.py: > > urlpatterns = patterns('', >     url(r'^/login$', LoginView.as_view()), >     url(r'^$', HomeView.as_view(), {}, 'home'), > ) > More simple way is using decorator for checking if user is authorized. Add next string to

Re: Problem using django-admin.py in a virtual environment

2012-04-04 Thread Andre Terra
When you type 'django-admin.py foo' in a command prompt, windows will use the system wide python install which is what is associated with the .py extension. In order to avoid this, you must call 'python django-admin.py foo'. If you don't like having to type 'python' before calling a script, you ca

Re: Profiling Django (WAS Django database-api)

2012-04-04 Thread Javier Guerra Giraldez
On Wed, Apr 4, 2012 at 4:07 AM, Tom Evans wrote: > One pretty cool method I've used for live debugging in the past is to > 'log' to rabbitmq (Note - not celery - raw amqp), and send messages to > a logging exchange. You can use a topic key so that different > processes can be distinguished. a sim

Re: Django Contrib Auth + Class Based Generic Views

2012-04-04 Thread Javier Guerra Giraldez
On Wed, Apr 4, 2012 at 4:14 AM, Sergiy Khohlov wrote: > As result  your views.py should be : > > from django.views.generic import TemplateView > # Create your views here. > class HomeView(TemplateView): >    template_name='home.html' > >  Only three lines of the code ! > You dont  need more! if i

Re: Problem using django-admin.py in a virtual environment

2012-04-04 Thread DIEGO CENZANO PRADO
It worked. Thank you very much. El miércoles 4 de abril de 2012 13:31:58 UTC+2, Andre Terra (airstrike) escribió: > > When you type 'django-admin.py foo' in a command prompt, windows will use > the system wide python install which is what is associated with the .py > extension. In order to avoi

calculate default values for fields based on the content of other fields

2012-04-04 Thread Jaroslav Dobrek
Hello, is there a way to calculate default values for certain fields based on the content of other fields? I am implementing a dictionary. Admins are supposed to add words of certain languages and parts-of-speech. Some words of some part-of-speech and language are, on one hand, morphologically ve

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

2012-04-04 Thread Dan Gentry
Dreamhost shared account http://dashdrum.com/blog/2011/08/django-on-dreamhost/ -- 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 dj

Re: Django Contrib Auth + Class Based Generic Views

2012-04-04 Thread Sergiy Khohlov
Sound good! Usually project is not so simple (only url.py + settings.py) 2012/4/4 Javier Guerra Giraldez : > On Wed, Apr 4, 2012 at 4:14 AM, Sergiy Khohlov wrote: >> As result  your views.py should be : >> >> from django.views.generic import TemplateView >> # Create your views here. >> class Hom

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

2012-04-04 Thread j_syk
I have a Linode VPS. Best decision I've made. I had tried A Small Orange and Webfaction, was happy with the customer/tech service from both (ASO isn't really setup for easy Django setup), but eventually you may run into situations were you wish you had full access to the server. I use Nginx &

Re: calculate default values for fields based on the content of other fields

2012-04-04 Thread Tom Evans
On Wed, Apr 4, 2012 at 2:09 PM, Jaroslav Dobrek wrote: > Hello, > > is there a way to calculate default values for certain fields based > on the content of other fields? > > […] > > Any ideas how to realize this? > > Jaroslav Three ways immediately spring to mind. You could override Model.save()

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

2012-04-04 Thread Eugenio Minardi
Servage for low-cost websites https://www.servage.net/wiki/Install_Djangounlimited space, domains, ecc. With the coupon code django2012 you can get the discount Eugenio On Wed, Apr 4, 2012 at 3:24 PM, Dan Gentry wrote: > Dreamhost shared account > > http://dashdrum.com/blog/2011/08/django-on-d

Re: Why using Generic Views?

2012-04-04 Thread Dan Gentry
I use generic views - either function or class based - for the common functionality in my apps. As Serge mentioned, a list works pretty much the same in every application, so I just provide a few parameters to a generic view. More complicated forms still require custom code. On Apr 3, 1:07 am, a

ModelForm based on User allows any username without checking

2012-04-04 Thread Bastian
Hi, I have a form that asks the registering user to choose a username. That form is a ModelForm based on the django.contrib.auth.models Users: class usernameForm(forms.ModelForm): class Meta: model = User fields = ('username', ) The strange thing is that when it appears on t

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

2012-04-04 Thread Daniel Sokolowski
I would use Linode VPS. Used WebFaction before however I quickly run into a wall where server was running out of resources when attempting to run 3-4 django sites from one account --- so skip the training wheels and go VPS. Linode has an unbeatable help center - http://library.linode.com/ and grea

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

2012-04-04 Thread Marcin Tustin
I have to say that switching to gunicorn from apache+mod_wsgi has made my site noticeably faster, and uses less memory. I would avoid apache for WSGI apps where the choice exists. On Wed, Apr 4, 2012 at 16:24, Daniel Sokolowski < daniel.sokolow...@klinsight.com> wrote: > I would use Linode VPS. U

Re: calculate default values for fields based on the content of other fields

2012-04-04 Thread Jaroslav Dobrek
> You could override Model.save() on the model you wish to calculate > fields for. This could populate the fields if they are not already > populated and the instance has a base adjective. > I had thought of this possibilty, too. I would prefer it, because it is the simplest one. But I don't under

[ANN]: Plata v1.1 (django-based shop no. 42)

2012-04-04 Thread Matthias Kestenholz
Hi fellow Djangonauts I'm very proud to announce the release of Plata v1.1. Plata is the BSD licensed Django-based shop by the makers of FeinCMS. (It does not have any FeinCMS-dependencies though.) Like many other shop projects such as django-shop, cartridge etc. it grew out of the frustration of

Need Help wtih Importing Data into a Model

2012-04-04 Thread Mark Phillips
I build a model in django (my first, after the tutorial!), and it seems to be working. I can see the tables in the admin interface and interact with them. My problem revolves around adding data to the tables. Here is an example of three tables that I am working on: class Person(models.Model): firs

Re: calculate default values for fields based on the content of other fields

2012-04-04 Thread Tom Evans
On Wed, Apr 4, 2012 at 4:51 PM, Jaroslav Dobrek wrote: >> You could override Model.save() on the model you wish to calculate >> fields for. This could populate the fields if they are not already >> populated and the instance has a base adjective. >> > > I had thought of this possibilty, too. I wou

Problem with Django tutorial

2012-04-04 Thread maxim
I can't get the tutorial working for me. When I try to run the command: python manage.py syncdb I get this error: Traceback (most recent call last): File "manage.py", line 10, in execute_from_command_line(sys.argv) File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py

Problem with the tutorial.

2012-04-04 Thread maxim
When I try to run the command: python manage.py syncdb I get the following error: Traceback (most recent call last): File "manage.py", line 10, in execute_from_command_line(sys.argv) File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 443, in execute_from_co

Re: Problem with Django tutorial

2012-04-04 Thread Joey Espinosa
Are you using Django 1.4? -- Joey "JoeLinux" Espinosa* * On Wed, Apr 4, 2012 at 12:51 PM, maxim wrote: > I can't get the tutorial working for me. When I try to run the command: > python manage.py

Re: Problem with Django tutorial

2012-04-04 Thread maxim
Yes On Wednesday, 4 April 2012 13:12:27 UTC-4, JoeLinux wrote: > > Are you using Django 1.4? > -- > Joey "JoeLinux" Espinosa* > * > > > > > > On Wed, Apr 4, 2012 at 12:51 PM, maxim wrote: > >> I can

Re: Problem with Django tutorial

2012-04-04 Thread creecode
Hello maxim, On Wednesday, April 4, 2012 9:51:39 AM UTC-7, maxim wrote: I can't get the tutorial working for me. When I try to run the command: > python manage.py syncdb > > My settings file has this for databases: > > 'NAME': '/home/maxim/mysite/mysite.db', # O

Re: Problem with Django tutorial

2012-04-04 Thread creecode
Opps... On Wednesday, April 4, 2012 10:19:13 AM UTC-7, creecode wrote: > > > It looks like are are on some kind of unix/linux variant so you probably > have a touch command. > That should have been "It looks like you are on..." -- You received this message because you are subscribed to the G

Re: Problem with Django tutorial

2012-04-04 Thread maxim
No, I tried removing the file, creating it with touch and I also used sqlite3 to create a table in there to make sure it actually has some database in there: sqlite3 /home/maxim/mysite/mysite.db SQLite version 3.6.23.1 Enter ".help" for instructions Enter SQL statements terminated with a ";" sqli

Re: Problem with Django tutorial

2012-04-04 Thread Joey Espinosa
Which settings.py file are you modifying? I had this problem at first too when I didn't read about Django's changes from 1.3 to 1.4. Here's an excerpt from https://docs.djangoproject.com/en/1.4/releases/1.4/#updated-default-project-layout-and-manage-py : Django 1.4 ships with an updated default p

Re: Problem with Django tutorial

2012-04-04 Thread Joey Espinosa
The correct answer is that the default project layout has changed. See my previous email. Let me know if that works! -- Joey "JoeLinux" Espinosa* * On Wed, Apr 4, 2012 at 1:24 PM, maxim wrote: > No

Re: Problem with Django tutorial

2012-04-04 Thread maxim
Ah, thank you. Your answer fixed the problem. On Wednesday, 4 April 2012 13:25:19 UTC-4, JoeLinux wrote: > > The correct answer is that the default project layout has changed. See my > previous email. Let me know if that works! > -- > Joey "JoeLinux" Espinosa* > * >

Re: Problem with Django tutorial

2012-04-04 Thread maxim
Continuing on in the tutorial, I got to the part where it explains how to use the admin site. It seems that after enabling the admin, it cannot find the css files it uses, so the web page looks very strange. When making a request for an admin page I get the following output from the runserver:

Difficult setup on Suse Linux

2012-04-04 Thread Martin Sommer
I have Python and Django properly installed, but am not getting the first project to work. When I do this: python manage.py runserver ... I get this: Traceback (most recent call last): File "manage.py", line 14, in ? execute_manager(settings) File "/usr/lib/python2.4/site-packages/django

How to add audio to a Django based webpage?

2012-04-04 Thread Homer
I tried to use command in my templates directly, but it seems it is not working... Here is my code: {% for item in ShowAudio %} {% endfor %} Should I add something else so that it would work? Thanks for your help! -- You received this message because you are subscribed to the Google Groups

Re: Difficult setup on Suse Linux

2012-04-04 Thread Diego Schulz
On Wed, Apr 4, 2012 at 3:47 PM, Martin Sommer wrote: > I have Python and Django properly installed, but am not getting the > first project to work. When I do this: > > python manage.py runserver > > ... I get this: > > Traceback (most recent call last): >  File "manage.py", line 14, in ? >    exec

Image Cropping in template form

2012-04-04 Thread Patrick Sweet
Hi folks, I'm hoping someone can help me with this. I can't get the image_cropping widget to work in my template. I've installed django-image-cropping ( https://github.com/jonasundderwolf/django-image-cropping ) and have set up my models appropriately. It works absolutely perfect in the admin, but

Re: Django Contrib Auth + Class Based Generic Views

2012-04-04 Thread Matheus Ashton
Ok, Thanks for the advices :) but I still have the original problem, when i access the HomeView the template is rendered with a render_to_response view, with a simple Context object and not a RequestContext object, because of that I do not have the authenticated user data in my template... 2012/4/

Re: How to add audio to a Django based webpage?

2012-04-04 Thread Joel Goldstick
On Wed, Apr 4, 2012 at 3:50 PM, Homer wrote: > I tried to use command in my templates directly, but it seems it is > not working... Here is my code: > {% for item in ShowAudio %} > shouldn't this be: > height="25%"width="25%"classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95"> It looks like y

Re: Django Model - create a filter and use it as argument

2012-04-04 Thread akaariai
On Apr 5, 1:00 am, Ivo Marcelo Leonardi Zaniolo wrote: > Hi there, > > I'm need to pass a QuerySet as an argument, like a function pointer that > will be > evaluate in other time. Somebody has one idea how I can do this? > I dont want to create a "box" method to encapsulate it. > > So, can anyone

Re: custom manager to control access

2012-04-04 Thread Mike Dewhirst
Anssi Thanks for that - I'll do some testing. I'm also thinking of middleware to look at the request and discover the company on the way in so I can make it available to everything which processes the request and produces a response. Cheers Mike On 4/04/2012 5:55pm, akaariai wrote: On Ap

Upgrading from django 1.3 to django 1.4 -- timezone support

2012-04-04 Thread Rajat Jain
Hi, I have a MySQL 5.5 backend and I use it via the Django 1.3 framework. I am trying to switch to Django 1.4, but want to know how it will affect me. Currently I store all the timezones in PST. As far as I understand from reading the documents, if I upgrade to 1.4 and keep the USE_TZ = False

Re: How to add audio to a Django based webpage?

2012-04-04 Thread Andy McKay
On Wed, Apr 4, 2012 at 12:50 PM, Homer wrote: > Should I add something else so that it would work? Thanks for your help! There's nothing I've seen yet that's a Django problem. Does the outputted HTML look right? Does that work? If not tell us and we'll see if we can help you figure out how your

Re: base.css 404ing on Django 1.4a1

2012-04-04 Thread swiharta
I had to upgrade my version of django-staticfiles and do collectstatic. Hope that helps. On Thursday, February 2, 2012 12:26:47 PM UTC-5, Alec Taylor wrote: > > Trunk version cannot load Admin CSS. > > First I tried setting the ADMIN_MEDIA_PREFIX to MEDIA_PREFIX, when > that didn't work I tried m

twitter

2012-04-04 Thread Randa Hisham
hey iam looking for django app that working with twitter stream api,any recommends? -- Randa Hesham Software Developer Twitter:@ro0oraa FaceBook:Randa Hisham ٍ -- You received this message because you are subscribed to the G

Re: twitter

2012-04-04 Thread Ovnicraft
On Wed, Apr 4, 2012 at 8:13 PM, Randa Hisham wrote: > hey > iam looking for django app that working with twitter stream api,any > recommends? > Hello i recommend you use https://dev.twitter.com/docs/twitter-libraries#python and integrate with you django project. Regards, > > > -- > Randa Hesha

Re: base.css 404ing on Django 1.4a1

2012-04-04 Thread Alec Taylor
Unknown command: 'collectstatic' Note: I am running the latest official build of Django (1.4) with the latest dev build of django-staticfiles. Also of relevance: > python manage.py help | grep -i "static" satchmo_copy_static (yes, I am running a satchmo shop) On Thu, Apr 5, 2012 at 11:13 AM

Django 1.5 static files strangeness

2012-04-04 Thread Mike Dewhirst
I'm getting odd static files 404 behaviour switching to DEBUG = False on my Windows XP dev machine. My staging server is Linux running under Apache and the same code and the same version of Django and that is running fine with DEBUG = FALSE See the 200 versus 404 info below ... #

Re: Django Contrib Auth + Class Based Generic Views

2012-04-04 Thread Sergiy Khohlov
As I understand you would like to send some values to the templates ? Are you eould like to check if user is authenticated ? I 've understand near to nothing from your last message. 2012/4/5 Matheus Ashton : > Ok, Thanks for the advices :) but I still have the original problem, when i > access t

Port Django to Javascript

2012-04-04 Thread DvD
Hi folks, I created a project not long ago and I'm currently maintaining it called Broke which wants to be a porting to Javascript of Django https://github.com/brokenseal/broke-client You can find it featured inside the todomvc project from addy osmani https://github.com/addyosmani/todomvc ( ht

Re: Port Django to Javascript

2012-04-04 Thread Marcin Tustin
What's the motivation for this project? Who (especially already being familiar with python and django) would want to use this, and for what? On Thu, Apr 5, 2012 at 07:22, DvD wrote: > Hi folks, > I created a project not long ago and I'm currently maintaining it called > Broke which wants to be a

Re: Port Django to Javascript

2012-04-04 Thread kenneth gonsalves
On Thu, 2012-04-05 at 07:36 +0100, Marcin Tustin wrote: > What's the motivation for this project? Who (especially already being > familiar with python and django) would want to use this, and for > what? frankly these are not questions to be asked of an open source project. -- regards Kenneth Go

Where to load global static data?

2012-04-04 Thread Lars Ruoff
Hi, i'm using Django the first time for a browser game project. I will need to have some globally accessible, static data like string tables for every view. These would be loaded from XML files. For the moment all i have figured out with Django is that my code will be called via callbacks for the v

Where to load global static data?

2012-04-04 Thread Lars Ruoff
Hi, i'm using Django the first time for a browser game project. I will need to have some globally accessible, static data like string tables for every view. These would be loaded from XML files. For the moment all i have figured out with Django is that my code will be called via callbacks for the v

Re: Where to load global static data?

2012-04-04 Thread Lars Ruoff
Sorry, that message went off (twice!) while i was in the middle of typing :-) The question is: How do i load static global data once and for all at server startup. I.e. i'd like to have that data in memory and accessible from any view during the lifetime of the server, so that it needs NOT to be l

Where/how to load global static data?

2012-04-04 Thread Lars Ruoff
Hi, i'm using Django the first time for a browser game project. I will need to have some globally accessible, static data like string tables for every view. These would be loaded from XML files. For the moment all i have figured out with Django is that my code will be called via callbacks for the v