Re: regarding virtualenv and python version 3.5 or 3.4 or other versions

2017-08-16 Thread Seo Brain
pyenv - github way - it works for me. thanks. On Wednesday, August 16, 2017 at 2:18:08 AM UTC-7, Avraham Serour wrote: > > on the same link it is mentioned "To not touch the system Python > (generally a bad idea..." > > it is suggested to use pyenv, you may use instead pythonz > > On Wed, Aug

RE: Template Rendering Django 1.11

2017-08-16 Thread Matthew Pava
I found the problem was with a third-party app that was designed for older versions of Django. I was able to correct it and all is well with Django 1.11. The app was django-autocomplete-light v2.2. I never adopted the v3. Since v3 was created, I actually incorporated v2.2 into my project to

Re: Can only get "manage.py runserver" if I use python3 instead of python

2017-08-16 Thread Sol Chikuse
Hi Ja, Just to add to what Antonis said, you can also create virtual environments with Python3 using the below code: *python3 -m venv your_virtual_dir_name* For instance to create a virtual directory with name *mysite* you will have to type: *python3 -m venv mysite* And then you can

Re: how can i create web app like twitter with django

2017-08-16 Thread Sol Chikuse
Hi there, Creating a web app like twitter is no easy task especially for someone with a little idea of Django. So before you attempt to develop a clone of such a gigantic project you should immense yourself in getting to know Django, work on some small projects, taking small baby steps *(Don't

Retrieving objects created in trasaction

2017-08-16 Thread roboslone -
Hi, I have some function (fetcher) that runs in transaction (it has to) and it creates a bunch if new objects that are written to database after transaction is commited. Those objects are added to a many-to-many relation. And on that relation change a signal is fired and handled by my signal

Re: Cannot call imported models in views

2017-08-16 Thread Antonis Christofides
Hi, at some point in your code you have "import pprint". Replace it with "from pprint import pprint". Regards, Antonis Antonis Christofides http://djangodeployment.com On 2017-08-16 12:57, Ladislav Brodecký wrote: > Hi, I installed newest django version and python 3.6 on CentOS 7 together

Re: How to save an invoice document with new record creation in the database

2017-08-16 Thread Alexander Joseph
Thanks for the advice Derek. I actually had just moved the docx creation to the save method after I posted my question yesterday, and you're right, it works much better there On Wed, Aug 16, 2017 at 2:56 AM, Derek wrote: > You may want to initiate the .docx creation via a

Multilevel display for a model in Django admin

2017-08-16 Thread Sahana Prabhakar
I have a model as follows : class Transaction(models.Model): transaction_id = models.AutoField(primary_key=True) transaction_unique_id = models.CharField(max_length=100, null=True, blank=True, unique=True) route_id = models.ForeignKey(FlightScheduleDetail, null=False,

how can i create web app like twitter with django

2017-08-16 Thread rehobotworld4u
i have been given a project in our school to create a web app like twitter with python django and i have only a little ideal of django -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails

Cannot call imported models in views

2017-08-16 Thread Ladislav Brodecký
Hi, I installed newest django version and python 3.6 on CentOS 7 together with postgresql and I get this error everytime I try to call model class in views. I even tried MariaDB instead and I get same error. Traceback (most recent call last): File "manage.py", line 22, in

Re: Row based permissions: In DB or App? ... farewell pain

2017-08-16 Thread Vijay Khemlani
So, please share the specific numbers you got from your profiling. On Wed, Aug 16, 2017 at 6:10 AM, guettli wrote: > > > Am Donnerstag, 10. August 2017 14:30:31 UTC+2 schrieb Vijay Khemlani: >> >> It's still implemented like that in the background, but I'm not sure why >>

Re: Can only get "manage.py runserver" if I use python3 instead of python

2017-08-16 Thread Ja Cre
Thanks Antonis, I am now up and running with virtualenv and working great. I appreciate your help! On Tuesday, 15 August 2017 20:33:58 UTC+1, Antonis Christofides wrote: > > Hi, > > The Python 3 installation is completely separate from Python 2 (the same > would hold if you had both 2.7 or

Re: regarding virtualenv and python version 3.5 or 3.4 or other versions

2017-08-16 Thread Avraham Serour
on the same link it is mentioned "To not touch the system Python (generally a bad idea..." it is suggested to use pyenv, you may use instead pythonz On Wed, Aug 16, 2017 at 3:56 AM, Seo Brain wrote: > Hi Avraham > > Thanks. > > I did install the python V3.6 on my dev-server

Re: Row based permissions: In DB or App? ... farewell pain

2017-08-16 Thread guettli
Am Donnerstag, 10. August 2017 14:30:31 UTC+2 schrieb Vijay Khemlani: > > It's still implemented like that in the background, but I'm not sure why > do you call it slow. > > Here are more docs about guardian being slow:

Re: How to save an invoice document with new record creation in the database

2017-08-16 Thread Derek
You may want to initiate the .docx creation via a trigger in the post_save function; see: https://docs.djangoproject.com/en/1.11/ref/signals/#post-save Also, I would move the "utility" code for creating the invoice number into a separate function, as its easier to test and (possibly) call