Django rosetta: a way to automatically create po files for the missing languages

2010-06-19 Thread Jordan
Hello, What is the best way to make Django Rosetta automatically create po files for the missing languages? I want to minimize the process of adding new language. My idea is to make Django Rosetta read the languages from the settings.py file, and after that execute the makemessages command someho

Deploying Django with mod_wsgi

2010-06-19 Thread commonzenpython
Hey guys, im trying to deploy django using MySQl, Apache 2, and mod_wsgi, but i am having lots of difficulties which are causing my sites to go down, i have loaded the mod_wsgi module in the Apache httpd.conf file successfully, but every time i try to put this line f WSGIScriptAlias / "/apache/ dj

Re: Deploying Django with mod_wsgi

2010-06-19 Thread Karen Tracey
On Sat, Jun 19, 2010 at 6:15 PM, commonzenpython wrote: > Hey guys, im trying to deploy django using MySQl, Apache 2, and > mod_wsgi, but i am having lots of difficulties which are causing my > sites to go down, i have loaded the mod_wsgi module in the Apache > httpd.conf file successfully, but e

Re: Serving media files

2010-06-19 Thread Graham Dumpleton
On Jun 20, 3:06 am, Jagdeep Singh Malhi wrote: > now my httpd.conf   file is :- > > Alias /media/ /usr/local/lib/python2.6/dist-packages/django/contrib/ > admin/media/ > > media/> > Order deny,allow > Allow from all > Change this to: Options Indexes Order deny,allow Allow from all

Re: Deploying Django with mod_wsgi

2010-06-19 Thread commonzenpython
im sorry, its causing an error 500, but i know its because of an error in the httpd.conf file, but i dont know what, i have written the sript WSGIScriptAlias / "/apache/ dj_survey.wsgi" exactly how its supposed to be written but its still causing the crash, is there anything besides that script tha

Real time search using Django Sphinx or haystack Xapian

2010-06-19 Thread zweb
" I'm storing a copy of the searchable text in a MyISAM table and using the MySQL search on it." I need to search results to be immediately available as soon as they are updated in DB. This will require me to update the index in real time which is not very efficient. Haystack does provide real t

Re: Deploying Django with mod_wsgi

2010-06-19 Thread Graham Dumpleton
On Jun 20, 11:19 am, commonzenpython wrote: > im sorry, its causing an error 500, but i know its because of an error > in the httpd.conf file, but i dont know what, i have written the sript > WSGIScriptAlias / "/apache/ > dj_survey.wsgi" exactly how its supposed to be written but its still > cau

Re: Deploying Django with mod_wsgi

2010-06-19 Thread Graham Dumpleton
BTW, I really hope you literally have not said: WSGIScriptAlias / "/apache/ dj_survey.wsgi" When you do post the Apache configuration snippet, make sure you don't go editing it to change details. The exact information is needed else it makes it harder to debug what you have done wrong as have t

Re: Deploying Django with mod_wsgi

2010-06-19 Thread commonzenpython
thanks, i have seen the error logs and it says "could not import settings "ash.settings" ( is it on sys path ?)" ash is the name of my project, also i didnt get a 500 error this time, my website just didnt load, i added the following configuration to the httpd.conf : LoadModule wsgi_module modules

Re: Deploying Django with mod_wsgi

2010-06-19 Thread Graham Dumpleton
On Jun 20, 12:48 pm, commonzenpython wrote: > thanks, i have seen the error logs and it says "could not import > settings "ash.settings" ( is it on sys path ?)"  ash is the name of my > project, also i didnt get a 500 error this time, my website just didnt > load, i added the following configura

Re: Deploying Django with mod_wsgi

2010-06-19 Thread lzantal
Hi, If you add your project due to the sys.path then don't add the project name to os.environ['DJANGO_SETTINGS_MODULE'] = 'ash.settings' just add settings. hope it helps lzantal On Jun 19, 2010, at 19:48, commonzenpython wrote: thanks, i have seen the error logs and it says "could no

Re: Deploying Django with mod_wsgi

2010-06-19 Thread Graham Dumpleton
On Jun 20, 1:08 pm, lzantal wrote: > Hi, > > If you add your project due to the sys.path then don't add the project   > name to  os.environ['DJANGO_SETTINGS_MODULE'] = 'ash.settings' > just add settings. Which can cause other problems if you have used site name as package prefix in module impor

Re: Deploying Django with mod_wsgi

2010-06-19 Thread lzantal
Hi On Jun 19, 2010, at 20:20, Graham Dumpleton wrote: On Jun 20, 1:08 pm, lzantal wrote: Hi, If you add your project due to the sys.path then don't add the project name to os.environ['DJANGO_SETTINGS_MODULE'] = 'ash.settings' just add settings. Which can cause other problems if y

Re: Deploying Django with mod_wsgi

2010-06-19 Thread Graham Dumpleton
On Jun 20, 1:42 pm, lzantal wrote: > Hi > > On Jun 19, 2010, at 20:20, Graham Dumpleton   > > wrote: > > > On Jun 20, 1:08 pm, lzantal wrote: > >> Hi, > > >> If you add your project due to the sys.path then don't add the   > >> project > >> name to  os.environ['DJANGO_SETTINGS_MODULE'] = 'ash.

Re: A Django project life cycle

2010-06-19 Thread Kenneth Gonsalves
On Saturday 19 June 2010 18:04:33 Sameer Rahmani wrote: > i want to know about a django project life cycle, can any body help me > please? > > i want to know how a django project run under wsgi and development server ? > which files runs first? > does a project run in each request? or it remain i

How can I debug file uploads?

2010-06-19 Thread Joshua Kramer
Hello, I have a page with a file upload field. When I submit the page, it *appears* that the browser is not sending the file data. That is, when I submit the form, the request.FILES{} dictionary contains no file data. What do I need to look at in the debugger to determine why it's missing?

Re: How can I debug file uploads?

2010-06-19 Thread Kenneth Gonsalves
On Sunday 20 June 2010 10:20:16 Joshua Kramer wrote: > I have a page with a file upload field. When I submit the page, it > appears that the browser is not sending the file data. That is, > when I submit the form, the > > request.FILES{} > > dictionary contains no file data. What do I need to

Re: How can I debug file uploads?

2010-06-19 Thread Joshua Kramer
It was not before, but I added the line; so the form looks like: ...and still no dice - there isn't anything in the request.FILES dictionary. On Jun 20, 12:59 am, Kenneth Gonsalves wrote: > On Sunday 20 June 2010 10:20:16 Joshua Kramer wrote:>  I have a page with a > file upload field.  When

Re: How can I debug file uploads?

2010-06-19 Thread Kenneth Gonsalves
On Sunday 20 June 2010 10:52:23 Joshua Kramer wrote: > It was not before, but I added the line; so the form looks like: > > > > ...and still no dice - there isn't anything in the request.FILES > dictionary. > and do you have code like: form = MyForm(request.POST,request.FILES) if form.is_valid

Re: How can I debug file uploads?

2010-06-19 Thread Joshua Kramer
Ok, I had to add the request.FILES element to the form generation routine. Now it apears to work! THANKS! On Jun 20, 1:56 am, Kenneth Gonsalves wrote: > On Sunday 20 June 2010 10:52:23 Joshua Kramer wrote: > > > It was not before, but I added the line; so the form looks like: > > > > > > ...an

Re: static files, nginx, memcached

2010-06-19 Thread Javier Guerra Giraldez
On Fri, Jun 18, 2010 at 5:52 PM, TheIvIaxx wrote: > Its a lot of little files and from what i've seen, the stat call is a > bottleneck.  If they are all in memcache, then it should scream. yes, this sounds like memcached territory. still, we can argue all we want but a little benchmark would t

Re: Selling Django

2010-06-19 Thread Joshua Kramer
These are all great posts! I'll tell you from experience - there are two main concerns with most large companies and web app development: 1. Can I hire people off the street who know product X? 2. How fast can I develop apps with product X? Python and Django should be easy to pick up for compete

Re: Database Design Question

2010-06-19 Thread Torsten Bronger
Hallöchen! llanitedave writes: > [...] > > I guess it's mostly a normalization question. > > And while I was typing out a long explanatory discussion to > enlarge on the problem, I stumbled across the answer. > > I'll need to use a separate table for each sample type to store > its unique set of

Primary key error for ManyToManyField in a legacy database

2010-06-19 Thread derek
I have a legacy database setup like this: class Team(models.Model): id = models.AutoField(primary_key=True, db_column='TeamID') name = models.CharField(max_length=100, db_column='TeamName') groupings = models.ManyToManyField(Grouping, related_name='groupings', db_table='teamgrouping')

Re: Serving media files

2010-06-19 Thread Kenneth Gonsalves
On Saturday 19 June 2010 10:48:57 Jagdeep Singh Malhi wrote: > packeages/ > packages -- Regards Kenneth Gonsalves Senior Associate NRC-FOSS at AU-KBC -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-u

Re: Clean method across multiple models?

2010-06-19 Thread derek
On Jun 17, 2:50 am, JHeasly wrote: > Hello all, > > Is there a sane way to make a clean [1] method that depends on fields > from across multiple models? > > I've got a view that uses two form classes and want to write custom > validation that checks clean_data fields in both models and I'm > looki

Re: Seeking Django vs. Joomla comparison

2010-06-19 Thread Federico Capoano
Bytheway Joomla is also a framework.. is a Content Management Framework. I've been using it for years but I have to say that from a performance point of view is CRAP. I also think that the scopes of Django and Joomla are very different. Django will never have the large adoption that Joomla has, be

Re: Serving media files

2010-06-19 Thread Jagdeep Singh Malhi
On Jun 19, 3:12 pm, Kenneth Gonsalves wrote: > On Saturday 19 June 2010 10:48:57 Jagdeep Singh Malhi wrote:> packeages/ > > packages change this "packages" , but problem is not solve > -- > Regards > Kenneth Gonsalves > Senior Associate > NRC-FOSS at AU-KBC -- You received this message becau

A Django project life cycle

2010-06-19 Thread Sameer Rahmani
Hi all i want to know about a django project life cycle, can any body help me please? i want to know how a django project run under wsgi and development server ? which files runs first? does a project run in each request? or it remain in memory ? and any other useful information thanks all --

Re: A Django project life cycle

2010-06-19 Thread Venkatraman S
On Sat, Jun 19, 2010 at 6:04 PM, Sameer Rahmani wrote: > > i want to know about a django project life cycle, can any body help me > please? > > i want to know how a django project run under wsgi and development server ? > which files runs first? > does a project run in each request? or it remain

Re: Serving media files

2010-06-19 Thread Graham Dumpleton
On Jun 19, 3:18 pm, Jagdeep Singh Malhi wrote: > On Jun 17, 5:03 pm, Graham Dumpleton > wrote: > >  i copy the media  directory in  my  "/home/yourname/mysite" > directory. > > > Thus, run Python and go: > > > >>> import django > > >>> import os > > >>> os.path.dirname(django.__file__) > > impo

Re: Database Design Question

2010-06-19 Thread srbasl
I'm thinking you should be able to do this without having users create tables. Three separate tables should be enough. Maybe more if you want to get fancy. Sample table: holds sample id & sample type (fk) Sample type table: holds sample type id & comma separated list which defines number and ty

Re: Database Design Question

2010-06-19 Thread S Basl
Ok.. that wasn't really ideal, a better (and more normalized) solution might look a bit like this: Sample Table: -> sample_id (pk) -> sample_type_id (fk) -> other descriptive fields Sample Type Table: -> sample_type_id (pk) -> other descriptive fields Attribute Type Table: -> attribute_type_id (p

Re: Error I continue to get

2010-06-19 Thread Mike
I also get this error. I have python for windows version 2.6. I am using the standard windows xp shell. I have installed the latest version of django from the command line. How can I fix this? On Jun 11, 3:40 pm, Kenneth Gonsalves wrote: > On Friday 11 June 2010 12:05:50 Sam Lai wrote: > > > Th

How to merge TinyMCE to django flatpage

2010-06-19 Thread Steven Han
Hi, I am reading the book of . I want to merge a simple rich-text editor to flatpage following the chapter 3. In the url.py ,I have added the link to the urlpatterns. like this: urlpatterns = patterns('', (r'^admin/',inlcude(admin.site.urls)), (r'^tiny_mce/(?P.*)$','django.views.static.serv

soaplib -> "No CSRF or session cookie."

2010-06-19 Thread Börni
Hello together, i'm using this snippet http://djangosnippets.org/snippets/979/ . This shows an “No CSRF or session cookie.” error. I need to know how to decorate my view my_soap_service = MySoapService() with csrf_exempt decorator. I've no idea how to use the decorator in this context. Thank yo

Re: A Django project life cycle

2010-06-19 Thread Magnus Valle
Can anyone give OP a useful answer? On Sat, Jun 19, 2010 at 13:41, Venkatraman S wrote: > > On Sat, Jun 19, 2010 at 6:04 PM, Sameer Rahmani wrote: >> >> i want to know about a django project life cycle, can any body help me >> please? >> >> i want to know how a django project run under wsgi and

Re: A Django project life cycle

2010-06-19 Thread Sameer Rahmani
>> http://www.catb.org/~esr/faqs/smart-questions.html >> http://www.djangobook.com/ just for more information , i read django book , i know what i want , and if you don't want to help please don't send me those link. > Can anyone give OP a useful answer? what do you mean by OP -- You received th

Re: A Django project life cycle

2010-06-19 Thread Karen Tracey
On Sat, Jun 19, 2010 at 8:34 AM, Sameer Rahmani wrote: > Hi all > > i want to know about a django project life cycle, can any body help me > please? > > i want to know how a django project run under wsgi and development server ? > which files runs first? > does a project run in each request? or i

Re: Error I continue to get

2010-06-19 Thread Sam Lai
I quote from a previous post of mine - """ That error message looks like Windows to me. try adding the word python at the start of that command. If you are indeed on Windows, how did you install Python? The easiest one I've used is the ActiveState's ActivePython distribution for Windows; sets eve

Re: UnicodeDecodeError (ordinal not in range) when deleting an inline item - 1.2.1

2010-06-19 Thread Federico Capoano
The same code on my computer offline works without problems, so I guess It's a server configuration problem, what do you think? I read the this bit here: http://docs.djangoproject.com/en/dev/howto/deployment/modpython/#if-you-get-a-unicodeencodeerror And it says to write something similar to: ex

Re: soaplib -> "No CSRF or session cookie."

2010-06-19 Thread Rolando Espinoza La Fuente
On Sat, Jun 19, 2010 at 6:32 AM, Börni wrote: > Hello together, > i'm using this snippet http://djangosnippets.org/snippets/979/ . > > This shows an “No CSRF or session cookie.” error. I need to know how > to decorate my view > > my_soap_service = MySoapService() > > with csrf_exempt decorator. >

Re: How to merge TinyMCE to django flatpage

2010-06-19 Thread Mario
Steven, You need to read the 1st paragraph on page 25 closely. Also make sure the java scripts are loaded correctly. I personally use Firefox Firebug to debug the failing scripts. Finally using the Django Dev Server will not display the TinyMCE widgets. You need to make changes on your Apache Co

Django Sphinx or haystack Xapian

2010-06-19 Thread zweb
I need to implement search solution over models in mysql. Anyone has experience with both or has gone through same decision making? What should I consider before choosing one or other? (Mysql text search will not work as I use INNODB. Solr is powerful but I heard it is very memory hungry and it

Re: Serving media files

2010-06-19 Thread Jagdeep Singh Malhi
now my httpd.conf file is :- Alias /media/ /usr/local/lib/python2.6/dist-packages/django/contrib/ admin/media/ Order deny,allow Allow from all WSGIScriptAlias / /home/jagdeep/mysite/apache/django.wsgi Order allow,deny Allow from all but my http://localhost/admin/ is not show in graphi

Re: Serving media files

2010-06-19 Thread Justin Myers
Have you set your MEDIA_ROOT, MEDIA_URL and ADMIN_MEDIA_PREFIX settings in settings.py? On Jun 19, 12:06 pm, Jagdeep Singh Malhi wrote: > now my httpd.conf   file is :- > > Alias /media/ /usr/local/lib/python2.6/dist-packages/django/contrib/ > admin/media/ > > media/> > Order deny,allow > Allow

Re: Django Sphinx or haystack Xapian

2010-06-19 Thread Nick Arnett
On Sat, Jun 19, 2010 at 9:21 AM, zweb wrote: > I need to implement search solution over models in mysql. > > Anyone has experience with both or has gone through same decision > making? > > What should I consider before choosing one or other? I'm making a similar decision... as far as I can see,

get item value in Field.__init__()

2010-06-19 Thread ev
I have a form to edit my model. There is a select box in this form. By default there are all the data in this select box. My goal is exclude some data from select box, depending on current item data. So, to achieve my goal, I need to know field value of the current model item in the __init__ method

Re: Django Sphinx or haystack Xapian

2010-06-19 Thread Nick Arnett
On Sat, Jun 19, 2010 at 9:21 AM, zweb wrote: > > (Mysql text search will not work as I use INNODB. Solr is powerful but > I heard it is very memory hungry and it is in Java. Whoosh is not yet > as mature as others. So that leaves choice between Django Sphinx and > Haystack Xapian.) I meant to m

Re: admin filters getting reset after admin action

2010-06-19 Thread derek
On Jun 18, 9:18 pm, swinton wrote: > On Jun 17, 4:13 pm, derek wrote: > > > On Jun 17, 5:44 am, rahul jain wrote: > > > > Hi there, > > > > I have some filters set-up on admin page. As soon as I perform admin > > > action. All filters are getting reset. > > > > Is this is a bug from framework ?

Re: admin filters getting reset after admin action

2010-06-19 Thread rahul jain
well I solved that problem with one line of statement. before self.message_user just use this return HttpResponseRedirect(request.get_full_path()) Hope it helps. --RJ On Sat, Jun 19, 2010 at 11:09 AM, derek wrote: > On Jun 18, 9:18 pm, swinton wrote: >> On Jun 17, 4:13 pm, derek wrote: >

Control blank=False when creating/updating with code

2010-06-19 Thread Alexandre González
Hi! I have some models with mix attribs: blank=False or blank=True, when I try to create/update object form admin interface, the restrictions works without problem, but I'm doing it from django-piston (API) so I need to do it by code with this. I do that with this code: object = MyClass(user=requ

inlineformset_factory - minimum number of completed forms and custom validation

2010-06-19 Thread ALJ
Can anyone point me in the right direction regarding customer validation of forms via an inlineformset_factory? I want to make sure at least one form is completed and that no two forms have the same date. (I have to admit, I'm getting confused by how all the different classes relate to each other)

Re: Database Design Question

2010-06-19 Thread llanitedave
Now that's a fascinating idea, because the three-table solution is very similar to something I tried in the 1990's using a tool called 4th Dimension. I've been out of database development for about a decade, and this is my first foray into Django since doing the tutorials. The previous database h

Re: inlineformset_factory - minimum number of completed forms and custom validation

2010-06-19 Thread ALJ
... sorry ... I forgot to use formset.non_form_errors() -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@g

apache configuration to get host to use portals app/url within django project

2010-06-19 Thread wynfred
I have searched these forums and online for an answer to this question, but I'm not sure about the best practice. We are using django 1.2.1 with apache and mod_python on ubuntu. We have created a portals app within a django project to handle customized portals (with hosts like portal1.oursite.com)

Re: Django Sphinx or haystack Xapian

2010-06-19 Thread zweb
I am tilting towards Haystack Xapian solution over django sphinx mainly for two reasons 1) Haystack supports - Solr, Xapian and Whoosh. So in future I can easily migrate from Xapian to Solr as my need grows. 2) Sphinx has slow index update. Updating index takes as much time as building a new o

django - Datagrid

2010-06-19 Thread Bjørn Høj Jakobsen
Hi Is there anybody who has implemented jqqrid 3.7 with json and made it work?. I keep getting an error from FF Error: uncaught exception: jqGrid - No such method: navGrid http://127.0.0.1:8000/static/jquery/js/ jquery-1.4.2.min.js">