Re: Abridged summary of django-users@googlegroups.com - 25 updates in 10 topics

2016-10-24 Thread juliana kofi
Request Method: GETRequest URL: http://127.0.0.1:8000/Django Version: 1.10.2Python Version: 3.5.2Installed Applications:['django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles',

Re: Running django on demand via my PyQt4 Standalone app

2016-10-24 Thread Avraham Serour
does this help? https://docs.djangoproject.com/en/1.10/topics/settings/#calling-django-setup-is-required-for-standalone-django-usage On Tue, Oct 25, 2016 at 12:13 AM, Vinicius Assef wrote: > On 24 October 2016 at 16:30, Avraham Serour wrote: > > > >

Re: Running django on demand via my PyQt4 Standalone app

2016-10-24 Thread Gergely Polonkai
Hello, I think installing Django purely for its ORM is a huge overkill. Why not, for example, SQLAlchemy? Or Qt's own DB layer (I'm making an educated guess here; if GTK has one, maybe Qt has its own, too.) If you actually want to use the web framework functionality, though, that's another

Re: Running django on demand via my PyQt4 Standalone app

2016-10-24 Thread Vinicius Assef
On 24 October 2016 at 16:30, Avraham Serour wrote: > > Django is a webframework, but it is not an all or nothing thing, you don't > need to use everything, you may just use the ORM, define your models, import > them from your application. This is an interesting scenario,

Re: transferring data between Postgres databases

2016-10-24 Thread Mike Dewhirst
On 25/10/2016 7:09 AM, Erik Cederstrand wrote: Den 24. okt. 2016 kl. 06.04 skrev Mike Dewhirst: I have a user who has done a lot of work (instead of playing) in the staging server and now wants to get that work into the production database. I'm about to research

Re: Django 1.8: Existing Migrations Files Erroring After FK Model Removed

2016-10-24 Thread Tim Graham
I'm not sure. It looks like the crash happens when creating the model in the migration, not during the RunPython function. Could you create a minimal project that reproduces the crash so I can step through it? On Monday, October 24, 2016 at 3:22:18 PM UTC-4, dy...@dylan-jenkinson.nz wrote: > >

Re: transferring data between Postgres databases

2016-10-24 Thread Erik Cederstrand
> Den 24. okt. 2016 kl. 06.04 skrev Mike Dewhirst : > > I have a user who has done a lot of work (instead of playing) in the staging > server and now wants to get that work into the production database. > > I'm about to research selective dump and load capabilities of

Re: Django 1.8: Existing Migrations Files Erroring After FK Model Removed

2016-10-24 Thread dylan
Hi Tim, Traceback is below. As a temporary measure to get me going I have commented out the existing migrations that added and removed the migrations. There is an initial migration that adds the FK, a RunPython that checks for the FK to perform some logic, and a migration to remove the FK.

Method must be called with Class instance

2016-10-24 Thread Carlos GarcĂ­a
Hi, I'm creating a app which do a request to a API and the result is showing on a web page. My code is this: Models.py from django.db import models from django.template import Template, Context from django.http import HttpResponse import requests, json class HotelService(models.Model):

Re: Method must be called with Class instance

2016-10-24 Thread ludovic coues
It's a python error. First argument of method on an object is always the object itself, named self by convention. For exemple, class Greet: def hello(self, name): print("Hello %s!" % name) Python will take care of passing this argument when you call the method.

Re: Running django on demand via my PyQt4 Standalone app

2016-10-24 Thread Avraham Serour
> Q1: Is it good idea to start a new QThread who runs the script os.system("web/manage.py runserver")? No, don't do that. > Q3: If no - what is the best method to start a django server on demand via my PyQt4 App and to stop it? If the idea is to use django from within a desktop app, you don't

Re: Read Only by user in Django Admin

2016-10-24 Thread Derek
Would it be possible to add these extra admin methods into a parent class; and then have all your individual model admins inherit from it? Ditto for the models.py On Sunday, 8 February 2015 21:15:42 UTC+2, Hangloser Firestarter wrote: > > Solved. > > In __init__.py > ... > from

Re: Read Only by user in Django Admin

2016-10-24 Thread Naveen Kumar
Hello, This looks perfect when i don't have any fields in list_editable. This code is not working with list_editable. On Sunday, February 8, 2015 at 8:14:26 PM UTC+5:30, Hangloser Firestarter wrote: > > Hello. > I am using the admin backend of a system, but not all users of this > backend can

Running django on demand via my PyQt4 Standalone app

2016-10-24 Thread Dam ian
Hi, I work on some Smart Home UI / Controlling system using PyQt4, now I'm in the point where i need a Web Server to share a "Admin Page" to let the user change some Smart Home settings (via web page of course :p ). I searched the internet for a answer / idea and I think that the django server

Re: Methods in Models

2016-10-24 Thread Asad Jibran Ahmed
Any method that works *only* with the model data and is used in multiple places in the application should be a part of the model. Next, if you have functions that operate on multiple pieces of data (or more than 1 model instances) you should put them in the view where they are used. But if these

Methods in Models

2016-10-24 Thread Deep Shah
What kind of methods should be part of the models and what should be in the views? Can anyone give me an example of a method which should be in a Model than the views file? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from

Django project structure

2016-10-24 Thread Deep Shah
I have a django project which is a loyalty program for restaurants. The different database tables are- Users (and extending it with User Profiles), Restaurant Company (the entire chain), Branches, Offers, Points (points which users get on visiting a particular restaurant) etc. How do I

Re: transferring data between Postgres databases

2016-10-24 Thread Vineet Kothari
You will have to dump the back up file for that you can either use GUI based tool as other friends has suggested or you can use command line .There may be more ways please read two scoops of Django book On Oct 24, 2016 9:39 AM, "'Aaron C. de Bruyn' via Django users" <