Re: Calling ffmpeg doesn't work on apache server

2013-06-20 Thread Ovnicraft
On Wed, Jun 19, 2013 at 6:01 PM, Chad Vernon wrote: > I'm trying to use ffmpeg to generate a thumbnail for a video. It works > just fine when I call it from a python shell and when I test it in "python > manage.py shell". However when I try to run from the apache server

Re: Calling ffmpeg doesn't work on apache server

2013-06-20 Thread Chad Vernon
Hi John, Yes I am restarting apache after all changes I do. How do I check what workers I have running? Thanks, Chad On Wednesday, June 19, 2013 4:57:00 PM UTC-7, John wrote: > > Chad, > > Are you restarting apache after each change? It sounds like you have the > default 2 workers and you

Re: __unicode__() addition not working in basic poll application.

2013-06-20 Thread Manjunath Shivanna
Just restart the python interactive Shell... that should solve your problem Regards, Manju On Monday, May 16, 2011 5:32:41 AM UTC-7, maaz muqri wrote: > > Hi, > > class Poll(models.Model): > # ... > def __unicode__(self): > return

How to divide my apps? Good practices?

2013-06-20 Thread galgal
Hi, I'm starting my new project. It's sport-connected. The main part of my app will be league, matches, teams and players. There will be many relations. So, how to make apps and models. I plan to make models: - Season - League (FK to Season) - Team - Match (FK to League and 2FK to

Re: 'SafeText' object has no attribute 'status_code'

2013-06-20 Thread der_fenix
Hello I have problem with render_to_string django it's showme this error message : 'SafeText' object has no attribute 'status_code' my view : def html(request): context = {'inf': Itype.objects.all()} return render_to_string('smg/owl.html',context) Views must return Response

Re: Django ModelForm is_valid & form_valid

2013-06-20 Thread Jacob Valenta
Thank you good sir! You have put an end to my week long head ache! On Thursday, June 20, 2013 12:27:36 PM UTC-4, Jason Arnst-Goodrich wrote: > > This is a common problem to run into. > > def form_valid(self, form): > > customer = form.save(commit=False) > > customer.store =

Re: Multiple Primary Key composed by a Foreign key

2013-06-20 Thread Javier Guerra Giraldez
On Thu, Jun 20, 2013 at 11:52 AM, Saif Jerbi wrote: > I would like to implement multicolumns primary keys in django, i need to are you proposing to implement multicolumn primary keys? or asking how is it done? If the latter, i have bad news: they're not supported (yet)

Multiple Primary Key composed by a Foreign key

2013-06-20 Thread Saif Jerbi
Hi, I would like to implement multicolumns primary keys in django, i need to implement a UserPro model that allow that i have a multiple users who have the same username but belong to different Entreprise this is my code #models.py from django.db import models from django.db.models.signals

Low Level Cache Issue

2013-06-20 Thread Max Vizard
Hi there, I'm having some issues with the low level cache functionality in Django 1.4 and I can't seem to find info relevant to my exact problem. I'm running a separate Python script to check on the status of a Master and Slave MySQL db pair, which then inserts some values into a local

Re: Cannot import mypackage with code in the __init__.py file

2013-06-20 Thread Bill Freeman
Well, that would explain it. For directories the execute bit has to do with directory traversal, rather than the execution of anything. No adjustment to your wsgi config can get around that. I can't advise you about mappings between windows permissions and *nix permissions, not what sshclient

'SafeText' object has no attribute 'status_code'

2013-06-20 Thread cha
Hello I have problem with render_to_string django it's showme this error message : 'SafeText' object has no attribute 'status_code' my view : def html(request): context = {'inf': Itype.objects.all()} return render_to_string('smg/owl.html',context) -- You received this message because

Re: Cannot import mypackage with code in the __init__.py file

2013-06-20 Thread fred
OK, I found a fix but not the cause. The entire project is copied from W7 using sshclient. The directories I'm having trouble with are not executable, when I changed that it all works. Now I wonder if there is something in my wsgi.conf that could be changed to all access to them since I don't

Re: Django ModelForm is_valid & form_valid

2013-06-20 Thread Jason Arnst-Goodrich
This is a common problem to run into. def form_valid(self, form): customer = form.save(commit=False) customer.store = self.request.user.active_profile.store customer.save() return super(CustomerInformationView, self).save(form) super(CustomerInformationView, self).save(form)doesn't really

Re: Django polls application problem

2013-06-20 Thread Satinderpal Singh
On Thu, Jun 20, 2013 at 7:56 PM, Kamal Kaur wrote: > I am new to Django. Creating my first application, Polls. Some field was > missing in database when I tried to enter multiple > choices in a poll from terminal. Even it was not done when admin.py > file was changed to

RE: Cannot import mypackage with code in the __init__.py file

2013-06-20 Thread Sells, Fred
Yes, the files exist and they have read access and are owned by apache. I do use a symlink of "current" to point to my actual project directory to facilitate testing. I ported this from 1.3 by creating a new 1.5 project and then moving the contents of the old to the new. The error looks like

Re: autogenerating SECRET_KEY every time the server runs

2013-06-20 Thread Tom Evans
On Thu, Jun 20, 2013 at 4:29 PM, Michael Cetrulo wrote: > considering that the SECRET_KEY is automatically generated every time a new > project is created [1], wouldn't make more sense to have this logic on > settings.py and generate a new value when loading the app instead

autogenerating SECRET_KEY every time the server runs

2013-06-20 Thread Michael Cetrulo
considering that the SECRET_KEY is automatically generated every time a new project is created [1], wouldn't make more sense to have this logic on settings.py and generate a new value when loading the app instead of saving it as an actual hardcoded value there? eg: #settings.py from

Re: autogenerating SECRET_KEY every time the server runs

2013-06-20 Thread Oscar Carballal
So the SECRET_KEY is stored in the database at syncdb time? What if it gets compromised, you need to modify that table/row? Just asking out of curiosity :-) 2013/6/20 John DeRosa > When we run the development server locally, we often start with an > already-existing

Re: autogenerating SECRET_KEY every time the server runs

2013-06-20 Thread John DeRosa
When we run the development server locally, we often start with an already-existing database. We don't re-initialize the db unless we have to, because there's been a schema change or a change in the value stored in a table's field. So we'd need SECRET_KEY to not change most of the time! John

Re: Django polls application problem

2013-06-20 Thread Ernest Mundia
Hi Kamal, I am also new to django, but it looks like you misspelled server in runserver, could you maybe just check that you typed it in correctly as in $ python manage.py runserver On Thu, Jun 20, 2013 at 4:26 PM, Kamal Kaur wrote: > I am new to Django. Creating my

Re: user authentication with extended (AbstractUser) user model

2013-06-20 Thread Evan Stone
Thanks for opening the ticket and thanks so much for the explanation as well! -evan On Wednesday, June 19, 2013 7:13:04 PM UTC-5, Russell Keith-Magee wrote: > > > On Thu, Jun 20, 2013 at 4:16 AM, Evan Stone > wrote: > >> Sure thing. Here are the snippets that gave me

Re: Project settings and application settings.

2013-06-20 Thread Jacky Tian
Django settings are meant to be immutable, so your issues might be stemming from the way you're changing settings at runtime. Most Django projects that need to adjust settings at runtime do so by keeping the mutable settings in the database (e.g. a separate app in the project), so that's an

Re: Django import error (Please reply soon)

2013-06-20 Thread Jacky Tian
Add 'myapp' to your INSTALLED_APPS in settings.py, right now Django doesn't know that myapp is an existing package. On Thursday, June 20, 2013 3:06:12 AM UTC-4, sanju wrote: > > > > Hi I have problems with import error in django. Tried looking > > into all possible solutions in Google, but in

Django polls application problem

2013-06-20 Thread Kamal Kaur
I am new to Django. Creating my first application, Polls. Some field was missing in database when I tried to enter multiple choices in a poll from terminal. Even it was not done when admin.py file was changed to show a bunch of choices. Now previous database is dropped and a new one is

Django ModelForm is_valid & form_valid

2013-06-20 Thread Jacob Valenta
Basically, I have a model, a ModelForm, and an UpdateView. I go to the UpdateView (viewing a current customer) and just hit the submit button (changing no data). What results is an error from the model: *Cannot assign None: "Customer.store" does not allow null values.* (*I do not have a field

Re: Django import error (Please reply soon)

2013-06-20 Thread abhijeet shete
Hi Sanju, Whenever you create any app in django you need to add that app's name under INSTALLED_APPS in settings.py file. It looks like you commented that line on which you added the name of app(myapp) under INSTALLED_APPS in your settings file. Uncomment that line and then try again hope it

Re: Creating database views, functions, stored procedures etc

2013-06-20 Thread akaariai
On 20 kesä, 14:32, Mark Robson wrote: > Hi, > > I've got a Django application which uses a mixture of managed and unmanaged > models. > > The managed models get their tables created in the usual way, the unmanaged > ones via a number of .sql files in the application/sql

Re: Django import error (Please reply soon)

2013-06-20 Thread Gabriel
What is the command you're trying to run, and where in the file tree are you when you do it? - Gabe On Thu, Jun 20, 2013 at 4:06 AM, sanju wrote: > > > Hi I have problems with import error in django. Tried looking > > into all possible solutions in Google, but in

Creating database views, functions, stored procedures etc

2013-06-20 Thread Mark Robson
Hi, I've got a Django application which uses a mixture of managed and unmanaged models. The managed models get their tables created in the usual way, the unmanaged ones via a number of .sql files in the application/sql directory. This works fine, but I also have some views and user-defined

Project settings and application settings.

2013-06-20 Thread piir . dk
Hello all, I want to have an application settings modifying the project settings but it doesn't seems to work. For development purpose I need to authenticate users against my application database. In Production the authentication is done by Apache, it then sends the REMOTE_USER, correctly.

Django import error (Please reply soon)

2013-06-20 Thread sanju
Hi I have problems with import error in django. Tried looking into all possible solutions in Google, but in vain.I am posting my files here.Please look into it and correct it as soon as possible.Thanks in Advance! This is my hierarchy: c:/Users/Sanju/ mysite -myapp -> _init_.py

Re: countries phone prefixes

2013-06-20 Thread Nigel Legg
That is cool. Nice one. Regards, Nigel Legg 07914 740972 http://twitter.com/nigellegg http://uk.linkedin.com/in/nigellegg On 20 June 2013 10:38, Roberto López López wrote: > > Ok, answering my own question: django-country-dialcode > > > > On 06/20/2013 11:35 AM, Roberto

Re: countries phone prefixes

2013-06-20 Thread Roberto López López
Ok, answering my own question: django-country-dialcode On 06/20/2013 11:35 AM, Roberto López López wrote: > Hi, > > I need a sort of prepopulated foreign key with countries and their phone > prefixes, to add to my models. Does anyone know any 3rd party package or > service providing this?

countries phone prefixes

2013-06-20 Thread Roberto López López
Hi, I need a sort of prepopulated foreign key with countries and their phone prefixes, to add to my models. Does anyone know any 3rd party package or service providing this? Thanks. Cheers, Roberto -- You received this message because you are subscribed to the Google Groups "Django users"

Re: Anyone using django tabs ?

2013-06-20 Thread tony gair
The answer I think is no , ah well. On Thursday, 20 June 2013 09:28:39 UTC, tony gair wrote: > > I am trying django tabs for my site navigation and was wondering is I have > to list multiple tabs in the html file thats inherits from base.html > > {% if request.user.is_superuser %} > {%

Anyone using django tabs ?

2013-06-20 Thread tony gair
I am trying django tabs for my site navigation and was wondering is I have to list multiple tabs in the html file thats inherits from base.html {% if request.user.is_superuser %} {% activetab "topnav" "home" %} {% activetab "topnav" "admin" %} {% endif %} or can I say {% if

Re: Cannot import mypackage with code in the __init__.py file

2013-06-20 Thread Tom Evans
On Wed, Jun 19, 2013 at 7:51 PM, fred wrote: > I'm upgrading to django 1.5.1 on CentOs 6.4 with python 2.6.6 although I'm > developing on a W7 with the django debug server. > > I am getting executing my view.py and most of the modules it uses. But in > one

Re: reverse funtion gives me url including server path

2013-06-20 Thread Tom Evans
On Wed, Jun 19, 2013 at 3:32 PM, Jiří Kupka wrote: > Hi! I have little trouble with reverse function in my project. When I run it > over ./manage runserver, everything is fine - reverse gives me url in > /page/xx format. When I run my project over apache2 using this conf

Re: reverse funtion gives me url including server path

2013-06-20 Thread Jiří Kupka
Solved... I just delete this line with PythonOption and now, everything works right. Thanks for you advice! Jirka Dne čtvrtek, 20. června 2013 10:35:02 UTC+2 Jiří Kupka napsal(a): > > Ok, I rewrote it on PythonOption django.root /. Now, reverse returns > right url, but... for some reason, on

Re: reverse funtion gives me url including server path

2013-06-20 Thread Jiří Kupka
Ok, I rewrote it on PythonOption django.root /. Now, reverse returns right url, but... for some reason, on every page like /page/xx I get error 404. It's not only /page/xx, it's media and static files folder too. The only page that works is homepage without css and js, as a result of error 404