Re: models.py => Mandatory to create tables?

2018-09-10 Thread Benjamin SOULAS
Finally I recreate a new DB and it works now -- 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 email to django-users+unsubscr...@googlegroups.com. To post to this group, se

_mysql_connector.MySQLInterfaceError: Table 'table_name already exists

2018-09-10 Thread Sonali Vighne
Hi I am getting above error when * I am running python manage.py migrate command * *This table are already created in database when I make migration for first time. * *Please help there any way to handle this exception in models.py or view.py* *Thanks in Advance.* -- You received this message

Models which link to Groups (by ForeignKey)

2018-09-10 Thread Benjamin SOULAS
Hello everyone, I want to implement a model which make references to 2 groups, to do this, I thought I had to defined, in the model which links the 2 groups, a foreign key for each Group like this: from django.contrib.auth.models import Group from django.db import models class GroupLinker(mod

Re: Models which link to Groups (by ForeignKey)

2018-09-10 Thread Jason
https://stackoverflow.com/questions/2642613/what-is-related-name-used-for-in-django As you can see there, its for the relation from Group to GroupLinker. That relation name is the same for both fields, so you need to specify something unique. -- You received this message because you are subsc

Re: Models which link to Groups (by ForeignKey)

2018-09-10 Thread Benjamin SOULAS
Ow, ok, I got it, thx a lot But in order to create this object (retrieve my groups from the ORM), should I implement something specific? Because for my request, I just want to specify the group names and then, in my app, retrieve those, create my link between the groups... I thought I had to r

Re: Different results of running pure SQL query from Django and from PGAdmin

2018-09-10 Thread pierre-louis . kabaradjian
Here is the body of the code that runs the query and fetch results: with connection.cursor() as cursor: sql = ( ... ) cursor.execute(sql, [params...]) columns = [col[0] for col in cursor.description] for row in cursor.fetchall(): print(row) The results from t

ftp deploy django

2018-09-10 Thread Tim Vogt (Tim Vogt)
Perhaps little off topic but I have two issues where i need help with. For creating and deploying my django. 1) somehow I cannot let my django project run anymore.. Brew install on other project killed some links. timvogt$ python manage.py runserver dyld: Library not loaded: @executable_path/..

Re: Django Nested Query with Aggregate.Sum()

2018-09-10 Thread mab . mobile . 01
Hello Simon, I tried implementing your recommendations today and all appeared to go well except that I was not getting any results from the query for remaining seating on the html template. I took a look at my reservation table and the data was gone. I had the data in an original table I copie

Re: Django Nested Query with Aggregate.Sum()

2018-09-10 Thread mab . mobile . 01
Ok, data transfer error fixed and data now in table. However, I am still not getting a value for {{i.seats_remaining}}. It comes out blank. I had an error in the view that I corrected as below but still does not give results. def winery_events_view(request): winery_events = WineryEvents.o

How to publish Django 2 Application using WHM/Cpanel?

2018-09-10 Thread Django Lover
Dear Django Community!! I have a dedicated centos server with root access with WHM, I am new to python. Please, Can you give me information about how I can launch my Django website?? But the condition is- 1- Server have 4 user account(i.e. A, B,C,D). 2- I want to install Django only for user

Re: How to publish Django 2 Application using WHM/Cpanel?

2018-09-10 Thread TimT Vogt
This Might give Some guidance https://easyaspython.com/how-to-consolidate-multiple-django-projects-b7c9bb940a59 Verstuurd vanaf mijn iPhone > Op 11 sep. 2018 om 08:06 heeft Django Lover het > volgende geschreven: > > Dear Django Community!! > > I have a dedicated centos server with root acce