m2m admin relationship selector with filter_horizontal and large datasets

2014-12-09 Thread James Y
I have a Category model that is m2m with an Article model and need to make categories selectable in my article admin. So I'm using a filter_horizontal and the problem is that I have thousands of categories and do not want to load them all into the left hand side (lhs) of filter_horizontal. Is

Re: Beginner: What are the pitfalls of using an html form without using django forms? I.e. form.py

2014-12-09 Thread mulianto
Hi Tdkwon, What the benefits using django forms something like : 1. You can reuse it on another view programmatic way, not copy paste html only 2. You have the definition of form in 1 place rather distributed on many views to change it. 3. You have the helptext, error message, validation, css

Re: Modify a queryset and add computed value to the objects

2014-12-09 Thread Russell Keith-Magee
Hi Karim, On Wed, Dec 10, 2014 at 8:07 AM, Karim wrote: > Hi everyone! I have a "Services" model and I would like to get a > QuerySet with all the services filtered based on the distance between > the logged user and the service. > > I have latitude and longitude about the

Re: Beginner: What are the pitfalls of using an html form without using django forms? I.e. form.py

2014-12-09 Thread T Kwn
Thx for the explanation. I thought as much but as a beginner am always worried about some unforseen consequence. On Tuesday, December 9, 2014 1:26:47 AM UTC-8, Daniel Roseman wrote: > > On Tuesday, 9 December 2014 01:37:44 UTC, T Kwn wrote: >> >> I'm created a form where a user can add or remove

Modify a queryset and add computed value to the objects

2014-12-09 Thread Karim
Hi everyone! I have a "Services" model and I would like to get a QuerySet with all the services filtered based on the distance between the logged user and the service. I have latitude and longitude about the user logged in and I filter the services based on the computed distance. At the moment I

Re: Changes to Model does not migrate to sqlite with Django 1.7?

2014-12-09 Thread Tobias Dacoir
Hi, I'm afraid I don't have them. Apparently after deleting my database file and then just running manage.py makemigrations, it deleted the old migration files and started anew. Right now I'm also unable to re-produce it on purpose :( But it happened a couple of times for me since I regularly

Re: Changes to Model does not migrate to sqlite with Django 1.7?

2014-12-09 Thread Tobias Dacoir
Yes of course. Like I said, when I run into this error I have to delete my database file and do a fresh migration anyway. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an

Re: Advice on creating an SFTP frontend in Django

2014-12-09 Thread Андрей Максимов
Hi Paul. I hope you moved to your final goal. Now before me there is the same objective is to make a simple Client Area that allows the downloading of files hosted on SFTP. Unfortunately I can not help you with your questions but I hope if you are advanced with this issue, you will be able

Re: Open a url with user and password

2014-12-09 Thread Florian Schweikert
On 2014-12-07 11:48, Hossein Rashnoo wrote: Please help me. this is quite unrelated to django, maybe it would be better asking this question on the python mailinglist[1] -- Florian [1] https://www.python.org/community/lists/ -- You received this message because you are subscribed to the

Re: Django server and Apache serving static files

2014-12-09 Thread Collin Anderson
Hi, There's a good Apache example here if you haven't seen it. https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/modwsgi/#serving-files Collin On Monday, December 8, 2014 9:32:07 AM UTC-5, pythonista wrote: > > My apache admin is having problems serving static files to the django

Re: Changes to Model does not migrate to sqlite with Django 1.7?

2014-12-09 Thread Collin Anderson
Hi, Another silly question: have you made the initial migration(s) for your app yet? Collin On Monday, December 8, 2014 6:07:11 AM UTC-5, Tobias Dacoir wrote: > > Ok, here is part of the User Model: > > class User(AbstractBaseUser, PermissionsMixin): > > SEX = ( > ('m', 'male'), >

Re: Open a url with user and password

2014-12-09 Thread Erik Cederstrand
> Den 09/12/2014 kl. 14.39 skrev Collin Anderson : > My first guess is that it's using NTLM authentication instead of basic auth. > If you curl -i http://portal:8080/ what "authenticate" headers do you get? > > Also, you should consider upgrading to python 2.7 if you

Re: Local timezone in django admin

2014-12-09 Thread Collin Anderson
Hi Vamsy, What database are you using? Collin On Monday, December 8, 2014 4:35:46 AM UTC-5, vamsy krishna wrote: > > Hi, > > The default timezone in our application is UTC (stored in the database). > However I would like to display the datetime fields on the admin interface > based on the

Re: django-reversion live site with source code

2014-12-09 Thread Collin Anderson
Hi, I used it may years ago, though don't currently. I think it's really as simple the example in the docs: import reversion class YourModelAdmin(reversion.VersionAdmin): pass admin.site.register(YourModel, YourModelAdmin) http://django-reversion.readthedocs.org/en/latest/ Collin On

Re: I cannot connect with my database remote server mysql django

2014-12-09 Thread Collin Anderson
Hi, Also, make sure that the remote server allows for remote connections to your database using your username. Collin On Sunday, December 7, 2014 9:28:49 AM UTC-5, rush wrote: > > Just put correct password into settings. That will fix the error. > > -- > wbr, > rush. > > > >

Re: Connect django project with sharepoint 2013

2014-12-09 Thread Collin Anderson
Hi, You may have better luck using the ip address directly instead of "portal". Collin On Saturday, December 6, 2014 11:46:23 PM UTC-5, Hossein Rashnoo wrote: > > I need this connection for adding list items and save my users data on > sharepoint database. I ran it in command line and when i

Re: Open a url with user and password

2014-12-09 Thread Collin Anderson
Hi, My first guess is that it's using NTLM authentication instead of basic auth. If you curl -i http://portal:8080/ what "authenticate" headers do you get? Also, you should consider upgrading to python 2.7 if you haven't :) Collin On Sunday, December 7, 2014 5:48:02 AM UTC-5, Hossein Rashnoo

Re: How to set choice limit of given number on ModelMultipleChoiceField in Django?

2014-12-09 Thread Collin Anderson
Hi, On the html form, you could probably use javascript to filter out the value in the many to many when you select the primary language. In the django form, you could add extra validation by defining form.clean_further_languages(self) Collin On Sunday, December 7, 2014 12:37:22 AM UTC-5,

Re: Bug in staticfiles' HashedFileMixin?

2014-12-09 Thread Collin Anderson
Hi Bernhard, Yes, on quick glance this looks like a bug. It looks like all replacements get applied to all matching files. Feel free to open a ticket if you haven't. (If you have, feel free to link to it in case someone else finds this.) Collin On Saturday, December 6, 2014 3:29:53 PM UTC-5,

Re: Error: 'NoneType' object has no attribute 'strip'

2014-12-09 Thread Collin Anderson
Hi, Looking at your traceback, it doesn't look like it's calling your custom save() method. Do your current tracebacks show your custom save method? You could try print(vars(self)) right before saving to see if there is a None that shouldn't be there. Again, if the traceback is happening in

Re: Backup vs Audit

2014-12-09 Thread Lachlan Musicman
Sorry, what I should have lead with is "at the moment there is no point and click backup solution for your whole package". On 9 December 2014 at 21:33, Lachlan Musicman wrote: > I've used dbbackup with success - a cronjob to copy out the database > (and replace the testing and

Re: Backup vs Audit

2014-12-09 Thread Lachlan Musicman
I've used dbbackup with success - a cronjob to copy out the database (and replace the testing and staging databases with "yesterday's data") and copy it to another machine. Regards the Django admin interface, there are a number of points to consider: - the base interface will always be in the

Re: Backup vs Audit

2014-12-09 Thread Tom Evans
On Tue, Dec 9, 2014 at 10:06 AM, Andrea Zakowicz wrote: > Most of the tools I've found is administered from commands and no template > Django admin. > What I want is to do both operations from the manager but found nothing. > Help!! > For example, proven tools are

Re: Backup vs Audit

2014-12-09 Thread Andrea Zakowicz
Most of the tools I've found is administered from commands and no template Django admin. What I want is to do both operations from the manager but found nothing. Help!! For example, proven tools are auditlog and dbbackup. El lunes, 8 de diciembre de 2014 10:22:49 UTC-3, Andrea Zakowicz

Re: Beginner: What are the pitfalls of using an html form without using django forms? I.e. form.py

2014-12-09 Thread Daniel Roseman
On Tuesday, 9 December 2014 01:37:44 UTC, T Kwn wrote: > > I'm created a form where a user can add or remove other users from a > group. Because the number of available users is unknown beforehand, I > needed to create a checkbox form where the number of elements is dynamic. > However, I

Re: django ModelForm: error name 'self' is not defined

2014-12-09 Thread Daniel Roseman
On Tuesday, 9 December 2014 06:17:57 UTC, JAI PRAKASH SINGH wrote: > > hello all, > > > I am trying to make a registration form using User model so i am using > ModelForm > > as I am using bootstrap template i need to add some atribute like class > placeholder > > so i am using widget, am