Re: Custom Admin Command

2016-10-16 Thread Mario R. Osorio
Thanks a lot for your help Dylan, Right after writing I noticed my mistake, I was naming the folder my_app/management/command I renamed it my_app/management/commands and voila!. it worked like a charm. Dtb/Gby === Mario R. Osorio A.S. of Computer Programming and Analysis Web page:

Re: Custom Admin Command

2016-10-16 Thread Dylan Reinhold
Is your my_command file named my_command.py? how are you calling it `manage.py my_command`? Dylan On Sun, Oct 16, 2016 at 7:04 PM, Mario R. Osorio wrote: > > By the way, there are *__init__.py* files in both > my_project/my_app/management/ > and

Re: Custom Admin Command

2016-10-16 Thread Mario R. Osorio
By the way, there are *__init__.py* files in both my_project/my_app/management/ and my_project/my_app/management/command folders ... On Sunday, October 16, 2016 at 9:58:25 PM UTC-4, Mario R. Osorio wrote: > > I am trying to implement a custom admin command. The class is located at >

Custom Admin Command

2016-10-16 Thread Mario R. Osorio
I am trying to implement a custom admin command. The class is located at mt_project/my_app/management/command/my_command and looks like this: class Command(BaseCommand): help = 'This is my command' def handle(self, *args, **options): ... My app is included in Installed_apps. I think

Re: Django Channels

2016-10-16 Thread Amirtpal
Thanks Andrew, -Amirtpal On Monday, October 17, 2016 at 1:27:53 AM UTC+8, Andrew Godwin wrote: > > Hi Amirtpal, > > a) You would use WebSockets for this purpose. I can't give a summary of > how they work here - there's plenty of documentation out there about them - > but they tunnel over

Re: Multiple instances of a Django application operating on different data

2016-10-16 Thread James Schneider
On Sat, Oct 8, 2016 at 2:52 AM, hans.krebs42 wrote: > I'm coding a Django web project. I've created an app and implemented its > functionality - templates, models etc. The website needs to use this > application in two places, and the only difference are the sets of data

Re: Django and Lynda.com

2016-10-16 Thread James Schneider
On Fri, Oct 14, 2016 at 6:53 PM, Paul Handley wrote: > I figured it out. For some reason the presenter did not add the name of > the app at the end of the makemigrations command. I did exactly like he did > and got the wrong result. When I added the name of the app at

Re: A Backup Model in Django?

2016-10-16 Thread Mike Dewhirst
On 17/10/2016 9:11 AM, James Schneider wrote: On Oct 15, 2016 11:40 PM, "Bernd Wechner" > wrote: > > A curious question I've had trouble finding an answer for alas. I have a model that I'd like to backup in the database in a backup

Re: A Backup Model in Django?

2016-10-16 Thread James Schneider
On Oct 15, 2016 11:40 PM, "Bernd Wechner" wrote: > > A curious question I've had trouble finding an answer for alas. I have a model that I'd like to backup in the database in a backup model. This being the pro-forma so to speqk: > > from django.db import models > > class

Re: Django Channels

2016-10-16 Thread Andrew Godwin
Hi Amirtpal, a) You would use WebSockets for this purpose. I can't give a summary of how they work here - there's plenty of documentation out there about them - but they tunnel over HTTP(S) and provide bidirectional communication. b) If the firewall is just limiting ports, then yes. If there's

Django Channels

2016-10-16 Thread Amirtpal
Hi Django folks, Just a couple of questions on using Django Channels a) Assuming I have remote and distributed clients(e.g. custom code deployed inside web applications) and I need that to maintain an asynch flow over https to our backend django server in the cloud, how could I use Django

Re: A Backup Model in Django?

2016-10-16 Thread Vijay Khemlani
For starters, why are you trying to backup a model to the same database instead of just dumping the whole database? On Sun, Oct 16, 2016 at 10:02 AM, Andromeda Yelton < andromeda.yel...@gmail.com> wrote: > I've found myself in the situation of needing to copy model data to new > model instances.

Re: A Backup Model in Django?

2016-10-16 Thread Andromeda Yelton
I've found myself in the situation of needing to copy model data to new model instances. This rapidly turned into a twisty sort of hell where I was doing recursion on graphs in order to preserve all the foreign key references (and then special-casing all the OneToOne fields, because naively

Re: HELP - Writing your first Django app, part 1

2016-10-16 Thread 'Nick Bansal' via Django users
Cheers! got it! On Friday, 14 October 2016 22:45:05 UTC+1, Asad Jibran Ahmed wrote: > > Just save the file inside the *poll *folder. That creates the file. > > Asad Jibran Ahmed > http://blog.asadjb.com > > On Fri, Oct 14, 2016 at 9:55 PM, 'Nick Bansal' via Django users < >

Re: HELP - Django variable in style (width) attribute

2016-10-16 Thread Constantine Covtushenko
Hi Aline, It is not direct answer for what you are asking, but why do you calculate the percentage 2 times? Why just use `with ` tag? With it nor problem at all. Hope that helps. Regards, Constantine C. On Sun, Oct 16, 2016

A Backup Model in Django?

2016-10-16 Thread Bernd Wechner
A curious question I've had trouble finding an answer for alas. I have a model that I'd like to backup in the database in a backup model. This being the pro-forma so to speqk: from django.db import models class MyModel(models.Model): # Declare fields class MyModel_backup(MyModel): def