Newbie question on serving static files from apache

2014-11-14 Thread pythonista
I am using django 1.7 and apache. I do not understand the instructions on the django tutorial. The files were delivered as expected in debug mode and locally from the django web server. Can someone provide me with a simple example or link to a site. Thanks -- You received this message becau

Re: Django-mssql repo has switched to Git

2014-11-14 Thread pythonista
I am connecting django linux and windows 7 to sql server.successfully django 1.7 and python 2.7.8 I was successful with django-azure-pyodbc The 3 other packages that I tried did not work. On Friday, November 14, 2014 9:37:41 PM UTC-5, Michael Manfre wrote: > > A heads up to anyone using Django-

Re: Django-mssql repo has switched to Git

2014-11-14 Thread Larry Martell
On Fri, Nov 14, 2014 at 9:36 PM, Michael Manfre wrote: > A heads up to anyone using Django-mssql. The project has shifted from Hg to > Git (still on Bitbucket). For most people, this will have no impact. If any > of you had a dependency to a specific changeset, you will need to update the > refere

Django-mssql repo has switched to Git

2014-11-14 Thread Michael Manfre
A heads up to anyone using Django-mssql. The project has shifted from Hg to Git (still on Bitbucket). For most people, this will have no impact. If any of you had a dependency to a specific changeset, you will need to update the reference to use Git instead of Hg. I've been using Git daily for a f

Users can give permissions they don't have.

2014-11-14 Thread RLF_UNIQUE
I want to make a "manager" user, who has a set of permissions (less than what I have as admin). I want "manager" to be able to create users, groups, permissions, etc, but restrict them to ONLY the permissions they have (if I give them permission to add user, they can just give new user all avail

Re: Database "postgres" does not exist error when running test command

2014-11-14 Thread Aliane Abdelouahab
how about this http://stackoverflow.com/a/19426770/861487 Le vendredi 14 novembre 2014 18:10:41 UTC+1, Daniel Grace a écrit : > > Hi, > I get an error when running the test command: > >python manage.py test flow > > Creating test database for alias 'default'... > Traceback (most recent call last):

Re: django 1.7 migrations upgrade from south: db.delete_foreign_key replacement?

2014-11-14 Thread drakkan
Il giorno venerdì 14 novembre 2014 23:35:46 UTC+1, Markus Holtermann ha scritto: > > Hey Nicola, > > Django's migration system doesn't natively support "drop this foreign key > constraint from the database", because you shouldn't be able to run into > such a situation with the migration system

Re: django 1.7 migrations upgrade from south: db.delete_foreign_key replacement?

2014-11-14 Thread Markus Holtermann
Hey Nicola, Django's migration system doesn't natively support "drop this foreign key constraint from the database", because you shouldn't be able to run into such a situation with the migration system at all (if you do, that's a bug from my point of view). I suggest you go with a "RunSQL" oper

Re: Migrations and FileField storage

2014-11-14 Thread Markus Holtermann
Hey Nico, if you want to dynamically determin the upload / storage path you should use the "upload_to" parameter with a callable: https://docs.djangoproject.com/en/1.7/ref/models/fields/#django.db.models.FileField.upload_to inside the callable you can safely access the settings without influe

Re: custom query app

2014-11-14 Thread John Schmitt
On Thu, Nov 13, 2014 at 03:08:01PM -0500, Clifford Ilkay wrote: > On 11/13/2014 02:33 PM, John Schmitt wrote: > > I have a big django project with multiple apps, models, and the models have > > quite a few fields. > > > > A request came that asked for a page that allows the user to pick and > > c

Re: live server tests

2014-11-14 Thread Larry Martell
On Fri, Nov 14, 2014 at 1:41 PM, Larry Martell wrote: > I have a suite of selenium live server tests that have been running > fine (django 1.6, python 2.7, centos 6.5). The host they were running > on died and I moved them to a new host. They are failing there with: > > ERROR: setUpClass > ---

live server tests

2014-11-14 Thread Larry Martell
I have a suite of selenium live server tests that have been running fine (django 1.6, python 2.7, centos 6.5). The host they were running on died and I moved them to a new host. They are failing there with: ERROR: setUpClass -- Tr

Postgres function json_array_elements does not found while django's tests

2014-11-14 Thread Volodymyr B
Hi all I have class method in django model which is use json_array_elements function. In case when it performs by browser it works fine. But in tests it fails with: python manage.py test Traceback (most recent call last): File "path_to_project/dj_server/model_animations/*tests.py*", line 9

Database "postgres" does not exist error when running test command

2014-11-14 Thread Daniel Grace
Hi, I get an error when running the test command: >python manage.py test flow Creating test database for alias 'default'... Traceback (most recent call last): File "C:\landy\lib\site-packages\django\db\backends\__init__.py", line 133, in ensure_connection self.connect() File "C:\landy\li

Re: Using Django with Gulp.js

2014-11-14 Thread Cal Leeming [iops.io]
No problem at all. Also one more thing, to access settings constants from templates you'll need this; http://stackoverflow.com/questions/433162/can-i-access-constants-in-settings-py-from-templates-in-django Gulp sadly does have many of the same performance problems that Grunt has, however the dif

django 1.7 migrations upgrade from south: db.delete_foreign_key replacement?

2014-11-14 Thread drakkan
Hi, I'm migrating my app to 1.7 and to builtin django migrations from south, I need something like this: http://south.readthedocs.org/en/latest/databaseapi.html#db-delete-foreign-key how to remove a foreign key using django builtin migration api? Please note that my purpose is to remove the fo

Re: set the css class of a form widget based on the data

2014-11-14 Thread Michael Palumbo
Thanks Russell, that works well. On Thu, Nov 13, 2014 at 11:30 PM, Russell Keith-Magee < russ...@keith-magee.com> wrote: > Hi Michael, > > The best bet would be to write a custom widget, and override the render() > method. render() takes the name of the widget, the value to render, and a > dicti

Re: django 1.7 - help with change in "Save as new" behavior when related inlines are marked to be deleted

2014-11-14 Thread Jonathan Morgan
re: "There shouldn't be a delete box for unsaved items, right?" This is a special case - you are taking an existing record and "Save as new"-ing (or however you say that), so there are existing associated records that you are copying as well. But, in this case, I think the user would change a

Re: django 1.7 - help with change in "Save as new" behavior when related inlines are marked to be deleted

2014-11-14 Thread Jonathan Morgan
Hello, Thanks for replying! Sorry for delayed response. I am not using custom forms or custom templates. It looks like, with "Save as new", django first makes a full copy of the base record and all the child records, including those that are marked for deletion, and then it subsequently tries

Re: form mixin for modelform ?

2014-11-14 Thread Michael Palumbo
Thanks for your response James. I am not well familiar with the metaclasses, I do not really see how to do it. What do you think of adding the fields in the init this way? extra_fields = {'extra1': forms.CharField(required=False), 'extra2': forms.CharField(required=False)} class ModelFormA(forms

Re: Is django framework feasible for developing online LMS?

2014-11-14 Thread Avraham Serour
I second nginx, just because of the config files are much simpler and easier to understand, once I started using it I never considered using apache again. personally I like postgres, I wouldn't suggest mysql because it doesn't support ACID, but I can understand people have different tastes I perso

Replacing usage of form._errors in Django 1.7

2014-11-14 Thread Alasdair Nicol
Hi, I'm upgrading to Django 1.7, and updating my forms to use the new form.add_errors() method. I have one remaining pattern which uses form._errors. class MyForm(forms.Form): ... def clean(): cleaned_data = super(MyForm, self).clean() if not self._errors: do_

Re: Is django framework feasible for developing online LMS?

2014-11-14 Thread Some Developer
On 14/11/2014 07:20, Pradip Shahi wrote: *Avraham Serour,* Sorry man, I mean to heart django guys.. I am pretty much sure with mysql as a backend and javascript on client. Would you help me decide on web server.. I had some research on Apache with mod wsgi, gnuicorn and nginx. Thank you.

Re: Using Django with Gulp.js

2014-11-14 Thread Some Developer
Awesome answer. Thanks. The only reason I considered using a Python HTML library was because I thought you might need to edit the base template to change the JavaScript and CSS links from the individual files to the main concatenated files when deploying to production. I didn't realise you co

Re: django 1.7 - help with change in "Save as new" behavior when related inlines are marked to be deleted

2014-11-14 Thread Alex Marandon
On Wednesday, 12 November 2014 21:42:43 UTC+1, Collin Anderson wrote: > > Hello, > > That does seem odd. Are you using a custom form or custom template at all? > I bumped into this issue too. I made a minimal project that triggers the issue : # model.py from django.db import models class Autho

Re: Is django framework feasible for developing online LMS?

2014-11-14 Thread Krishnakant Mane
Look at this. http://www.metastudio.org/home/On 11/14/2014 12:50 PM, Pradip Shahi wrote It might interest you and perhaps u will also learn how they did it in Jango. Happy hacking. Krishnakant. : *Avraham Serour,* Sorry man, I mean to heart django guys.. I am pretty much sure with mysql as a