Trouble with Pythonpath and getting my server to start

2009-11-30 Thread Dave
Hi all, I created a django project and when I try to start the server I get this: Traceback (most recent call last): File "manage.py", line 2, in from django.core.management import execute_manager ImportError: No module named django.core.management I did some Googling and I think it's

Re: style guide/autoformatter/linter for Django templates?

2009-11-30 Thread Steve Howell
Just following up on this a few days later, in case it got lost in the shuffle due to the weekend and U.S. holiday. On Nov 27, 2:18 pm, Steve Howell wrote: > I am wondering if there is a style guide anywhere for writing Django > templates.  Also, are there programs to

Re: django-tagging module not found

2009-11-30 Thread neridaj
I'm running django on ubuntu jaunty-9.04, apache2/mod_wsgi, and nginx. I'm having problems with both of my vhosts resolving to the same document root, as well as 500 errors with one of the domains. my first domain works fine i.e., the url resolves to the correct document root, but when I look up

How to call this function

2009-11-30 Thread David
Hello, In my template file I have {% for value in data %} {% endfor %} "showDomain(...)" is a JavaScript function. I would like this function to be called in each iteration of the for-loop when all_domain == 1. Anybody knows how to call this function? There are no events

django-tagging module not found

2009-11-30 Thread neridaj
Hello, I'm trying to deploy my simple app and I've mirrored the project as it was on my local dev machine. For some reason, when I try to browse to the url I get a 500 error and the error log says ImportError: No module named tagging. I've added PYTHONPATH env vars as follows: export

Re: Creating a Django project alike stackoverflow.com

2009-11-30 Thread Russell Keith-Magee
On Tue, Dec 1, 2009 at 9:53 AM, ~km wrote: > Hello, > > I'm a Python enthusiast and Django newbie. I'm trying to develop a > website with an "Ask and Get an Answer"-Interface, with the goal to > get a strong community; see http://stackoverflow.com to get an idea. > For more

Re: Creating a Django project alike stackoverflow.com

2009-11-30 Thread Stefano Borini
~km wrote: > Hello, > > I'm a Python enthusiast and Django newbie. I'm trying to develop a > website with an "Ask and Get an Answer"-Interface, with the goal to > get a strong community; see http://stackoverflow.com to get an idea. > For more information on stackoverflow.com see >

Re: Creating a Django project alike stackoverflow.com

2009-11-30 Thread Graham Dumpleton
On Dec 1, 12:53 pm, "~km" wrote: > Hello, > > I'm a Python enthusiast and Django newbie. I'm trying to develop a > website with an "Ask and Get an Answer"-Interface, with the goal to > get a strong community; seehttp://stackoverflow.comto get an idea. > For more information

Creating a Django project alike stackoverflow.com

2009-11-30 Thread ~km
Hello, I'm a Python enthusiast and Django newbie. I'm trying to develop a website with an "Ask and Get an Answer"-Interface, with the goal to get a strong community; see http://stackoverflow.com to get an idea. For more information on stackoverflow.com see

Adding a dashboard to admin

2009-11-30 Thread Brian Neal
On my site, users submit content that needs to be approved before getting published. Thus I wanted a simple "dashboard" on the admin page to show me how many pending items from each model are waiting for approval. I created a template tag for the dashboard. I then mulled my options for getting

Re: Modulo not working in query using extra() to define specific where

2009-11-30 Thread Marcos Marín
Yes that was the problem, thanks! On Mon, Nov 30, 2009 at 18:21, Craig Kimerer wrote: > No guarantees that this will fix the issue, but have you tried escaping the > '%'? > > Try `Semestre.objects.extra(where=['num %% 2 = 0'])` and this may give you > your desired

Implement most viewed/clicked item with django

2009-11-30 Thread Joshua Partogi
Dear all, I would like to implement most clicked item with django. Based on your experience, what would be the best approach to do this? Do we add an attribute in the model and update it everytime user view that item? Or is there a better approach that I might have missed here? And another thing,

Form text from database

2009-11-30 Thread Bayuadji
Hi all, There's a requirement in my project that the text for form field and field error could be specified from database, so that the admin can change the text and the error text as he/she like. could it be done? and also any suggestions about this problem is welcome thanks -djibon- --

multilingual flatpages

2009-11-30 Thread Nev
Hey, Today I did a bunch of searching and reading to find what is the best way to have flatpages presented in multiple languages. Flatpages apparently don't support internationalization and I went down several avenues looking for the recommended way, and finding various things that appeared way

Re: Modulo not working in query using extra() to define specific where

2009-11-30 Thread Craig Kimerer
No guarantees that this will fix the issue, but have you tried escaping the '%'? Try `Semestre.objects.extra(where=['num %% 2 = 0'])` and this may give you your desired result. Looks like an issue with python string formatting. Alternatively, you could try `print

custom query unique and ordered

2009-11-30 Thread Ali Rıza Keleş
Hi all, I need a little custom db query. My db table with sample data: id content_id author_id order is_public 1 68 1 1 1 3 189 2 2 1 4 154 2

django-treebeard or a simple model?

2009-11-30 Thread pablo platt
Hi, I'm building a simple catalog. I have nested categories. Each category can have either child categories or products but not both types. I need to read only one level of child nodes at a time to create categories and maybe move a branch. I think I'm going to use two types of models instead of

Re: admin order field on foreign key related object

2009-11-30 Thread Karen Tracey
On Mon, Nov 30, 2009 at 3:59 AM, Richard Mendes wrote: > [snip] > This code works fine but it orders based on the subquestion_id from the > Subquestion model, > I like to have it ordered based on subquestion_nr. I thought the code > should have been something like

Re: Trouble Getting Past the Congratulations Page

2009-11-30 Thread Karen Tracey
On Sun, Nov 29, 2009 at 10:59 PM, Guze wrote: > > The idea of using the dev server has a lot of appeal, and I was upset > when I thought it wouldn't work remotely. I can't have it "listen" to > all ip's cause the regular everyday apache server has some of these > it's

Re: Prevent brute-force password attacks?

2009-11-30 Thread tie
Here is a fresh module dealing with brute force cracking attempts: http://code.google.com/p/django-brutebuster/ On Nov 9, 11:57 pm, Adam Seering wrote: > Hi, >         Does there exist any code for Django to help defeat brute-force login > attempts?  Something like blocking IP

Help with Custom Manager and UNION query?

2009-11-30 Thread Info Cascade
Hi -- I've been programming with Django about a year, and really like it, but I've run into something that I can't quite solve on my own. I think someone else may be able to offer the answer, or at least a hint to send me in the right direction. I have two tables I want to search in

Re: callback called twice for the same comment_will_be_posted signal

2009-11-30 Thread Bill Freeman
Might you have managed to register it twice? (Just a stab in the dark.) On Mon, Nov 30, 2009 at 3:19 PM, cirip wrote: > Hi, > > I am getting multiple signals (2) called for each comment that is > submitted. The same for comment_will_be_posted. > > Code: > > def

Re: Error: No module named polls

2009-11-30 Thread Rafael Vieira
Please Baba send-me your project. I want see your error 2009/11/30 Baba Samu > 2.6 > > On Nov 30, 8:54 pm, Rafael Vieira wrote: > > what python's version you are using? > > > > 2009/11/30 Baba Samu > > > > > > > > >

Re: Dynamicly preset forms in the admin interface

2009-11-30 Thread Kai Timmer
2009/11/29 rebus_ : > I  imagine some of core devs or django gurus would maybe have better > ideas on how to do this (or can even tell you if this is documented > somewhere). What i wonder is: Isn't this a fairly common thing? I could think of so many situations where you would

Re: What exactly does order_with_respect_to do?

2009-11-30 Thread Preston Holmes
On Nov 29, 4:50 pm, Continuation wrote: > In the doc (http://docs.djangoproject.com/en/dev/ref/models/options/ > #order-with-respect-to) it is mentioned that  order_with_respect_to > marks an object as "orderable" with respect to a given field. > > What exactly does

callback called twice for the same comment_will_be_posted signal

2009-11-30 Thread cirip
Hi, I am getting multiple signals (2) called for each comment that is submitted. The same for comment_will_be_posted. Code: def comment_wbp(sender, comment, request, **kwargs): logging.debug("comment_will_be_posted called") from django.contrib.comments.signals import comment_will_be_posted

Re: Error: No module named polls

2009-11-30 Thread Baba Samu
2.6 On Nov 30, 8:54 pm, Rafael Vieira wrote: > what python's version you are using? > > 2009/11/30 Baba Samu > > > > > thanks, but i have tried changing the database_name to DATABASE_ENGINE > > = 'sqlite3'  and database name to DATABASE_NAME =

Re: Error: No module named polls

2009-11-30 Thread Rafael Vieira
what python's version you are using? 2009/11/30 Baba Samu > thanks, but i have tried changing the database_name to DATABASE_ENGINE > = 'sqlite3' and database name to DATABASE_NAME = 'poll.db' > > and i still get the same message. > > maybe i should delete n start

Re: Error: No module named polls

2009-11-30 Thread Baba Samu
thanks, but i have tried changing the database_name to DATABASE_ENGINE = 'sqlite3' and database name to DATABASE_NAME = 'poll.db' and i still get the same message. maybe i should delete n start again since im just following the tutorial and i have this inconsistencies at the very

Trying to Migrate Databases: Getting "auth_group_permissions' doesn't exist"

2009-11-30 Thread Daniel Howard
Hello, I started development on an older version of Django, and the system Django was subsequently upgraded. The system is presently at 1.1. I am trying to migrate from sqlite to MySQL. I have tried a few different approaches but none seem to work. Either of these approaches yields the same

Re: Django + Cherokee Web Server

2009-11-30 Thread Gary D
one thing I can add is that, is that possibly-- your development and production environment may not be identical (going with what Jarek said) and an error is happening on your production environment that gets bypassed in the development machine this has happened to me a few times GD On Nov

Re: Error: No module named polls

2009-11-30 Thread DGSpotman
I had a similar problem yesterday (I'm also new), and again, it was because of capitalization. For some reason my settings.py file got renamed to SETTINGS.py. Don't know how that happened, but when I reset the filename to all lower case, things worked. Hope this helps, Michael On Nov 30, 10:21 

Re: Error: No module named polls

2009-11-30 Thread Rafael Vieira
Hi, do you have change file settings.py section DATABASE_ENGINE = 'sqlite3', I recommend sqlite3 if you are new in django; and in Section DATABASE_NAME use your name database .db for example DATABASE_ENGINE = 'sqlite3' DATABASE_NAME = 'mybanco.db' Sorry about my text but i am brazilian and my

HELP PyAMF - Django + FLEX

2009-11-30 Thread Rafael Vieira
Good afternoon people, I am starting with pyAmf framework, and I have questions about how to integrate models of Django with RemoteObjects of FLEX; -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Modulo not working in query using extra() to define specific where

2009-11-30 Thread Marcos Marín
Hi, I'm trying to do a query where I select all rows where a field is divisible by 2. In pure SQL this is what I want: select * from contenido_semestre where num % 2 = 0; which works fine. When trying to do it with Django I do Semestre.objects.extra(where=['num % 2 = 0']) But this gets me an empty

Re: Error: No module named polls

2009-11-30 Thread Baba Samu
first of all thank very much. the problem was i named the folder 'POLLS', in stead of 'polls' it seems to be case sensitive anyway, i changed it and now i get Error: Django doesn't know which syntax to use for your SQL statements, because you haven't specified the DATABASE_ENGINE setting.

order_with_respect_to doesn't work for model related to self

2009-11-30 Thread cerberos
I have a model that's related to itself, the instance names are not unique. I want to order by full path so the result is like a list of directory paths a a/b a/b/c a/c b/d/g b/e It's obvious why order_with_respect_to it doesn't work (although a mention of this exception in the docs would be

Looking for new maintainers for django-localeurl and django-tinymce

2009-11-30 Thread Joost Cassee
Hi all, Since I am no longer actively using them, I have difficulty finding the time to maintain the django-localeurl and -tinymce projects. I am therefore looking for people to take over ownership over these projects. Please mail me or respond to this post if you are interested. Regards, Joost

Can't run Django from the command line using just "manage.py runserver", following attempt to install Python2.6 on windows 7.

2009-11-30 Thread Rodrigo Cea
Following an abortive attempt to install Python2.6 on Windows 7, I can't run the Django dev server without prepending "python" before "manage.py runserver". I tried recently to install Python2.6 on a windows 7 system that already has python 2.5 installed. I had problems running some Django

Re: Best way to customize create form in admin

2009-11-30 Thread fxvazquez
Hello again: I'm going to explain how I solved the problem above finally: My "solution" is to override the admin's change_form.html template replacing the loops: {% for fieldset in adminform %} ... {% endfor %} and {% for inline_admin_formset in inline_admin_formsets %} ... {% endfor %} with

Re: Is it possible to 'order' the left side of a filter_horizontal?

2009-11-30 Thread rc
Tim, The ordering meta option on my model did the trick. Thanks for the solution. Reed On Nov 25, 1:50 pm, Tim Valenta wrote: > Well, you've got a couple of options.  One is easiest and most > straightforward, but could impact performance.  The second is a little >

Re: ModelMultipleChoiceField with checkboxes: How to generate the HTML "checked" option?

2009-11-30 Thread Gloria
> > Hmmm... what are you trying to do by passing the queryset?  Doesn't that > send your form everybody's data, instead of just the active user? No, it doesn't. It returns all available options that users can optionally select. Users selections of these fields are stored elsewhere. > If I >

Re: virtualenv, PIP, fabric and patches to external projects

2009-11-30 Thread Wes Winham
We solve this problem by keeping forks of the external projects on github, bitbucket, etc. Since PIP works so nicely with those tools, it's pretty easy to do. You'll also find that beyond the initial work of creating your own fork (which is actually really really easy on both github and

Re: popup forms

2009-11-30 Thread andreas schmid
Emily Rodgers wrote: > > On Oct 13, 1:20 pm, andreas schmid wrote: > >> thank you very much for pointing me to the right path!! >> ill try to understand the behaviour and report about my progress... >> >> Andrew Ingram wrote: >> >>> I'm assuming you are doing this

Re: Error: No module named polls

2009-11-30 Thread Radhikavk
Vardhan Varma-2 wrote: > > did you named your project as 'mysite' and your app as 'polls' ... > also make sure __init__.py exists inside directory polls (manage.py should > create that ). > > hope that helps, > > --Vardhan > > > > > Have you given your projevt name as mysite and

Re: What exactly does order_with_respect_to do?

2009-11-30 Thread anentropic
I've been wondering this too, the docs aren't clear. On Nov 30, 12:50 am, Continuation wrote: > In the doc (http://docs.djangoproject.com/en/dev/ref/models/options/ > #order-with-respect-to) it is mentioned that  order_with_respect_to > marks an object as "orderable"

admin order field on foreign key related object

2009-11-30 Thread Richard Mendes
Hello Django Users, This is my first time using the admin site of Django and ran into some trouble when i wanted to order specific columns. What i like to do is order a foreign key related object column in the list_display view. I have the following code: model: class

Re: Django + Cherokee Web Server

2009-11-30 Thread Jarek Zgoda
Wiadomość napisana w dniu 2009-11-27, o godz. 17:42, przez hcarvalhoalves: >>> I'm able to configure Cherokee to run my Django project correctly, >>> using the included wizard. The problem is, if an exception is >>> thrown, >>> Cherokee just shows a "Unhandled Exception" page. I figured out