Re: New member: Germano Carella. I need help with django, limit_choices_to and admin interface

2018-08-09 Thread germano carella
I found a tutorial! I studied ForeignKey and how it works with sets... Now, I'll learn how to create a form and how to save the new data in set. Thanks! Il 09/08/2018 22:59, Julio Biason ha scritto: Hi Germano, When you use "ManyToMany", you're saying "any book can have any chapter and v

Re: Multi Tenancy

2018-08-09 Thread Mike Dewhirst
On 10/08/2018 12:36 PM, Andrew Fam wrote: Yeah it'll be good to leave some ideas here so that ppl don't have to make painful changes down the line to fit the system later. The current solutions require too much work and are not that flexible. On Friday, August 10, 2018 at 10:32:47 AM UTC+8, Mi

ValueError at /api/list/ invalid literal for int() with base 10: '35/like'

2018-08-09 Thread mounikesh mintu
hey guys when i tried to like a post in drf i have got in to an error models.py class status(models.Model): user=models.ForeignKey(settings.AUTH_USER_MODEL,on_delete=models.CASCADE, null=False) # user=models.ForeignKey(settings.AUTH_USER_MODEL,on_delete=models.CASCADE) content=mod

Re: Multi Tenancy

2018-08-09 Thread Andrew Fam
Yeah it'll be good to leave some ideas here so that ppl don't have to make painful changes down the line to fit the system later. The current solutions require too much work and are not that flexible. On Friday, August 10, 2018 at 10:32:47 AM UTC+8, Mike Dewhirst wrote: > > On 10/08/2018 11:45 A

Re: Multi Tenancy

2018-08-09 Thread Mike Dewhirst
On 10/08/2018 11:45 AM, Andrew Fam wrote: Hi all, I have a saas solution currently sitting in 1 instance using a postgres db. Due to recent expansions, I need to keep the data in the country of which it came from. e.g Malaysia or Philippines will have a database of their own. In addition, some

Multi Tenancy

2018-08-09 Thread Andrew Fam
Hi all, I have a saas solution currently sitting in 1 instance using a postgres db. Due to recent expansions, I need to keep the data in the country of which it came from. e.g Malaysia or Philippines will have a database of their own. In addition, some companies are asking for on - prem version

Re: Array List

2018-08-09 Thread Mike Dewhirst
On 10/08/2018 4:41 AM, Kasper Laudrup wrote: Hi Dheeraj, On 09/08/2018 10.53, Dheeraj Kumar wrote: Can u tell me please. Tell you what? Where to find books or tutorials on how to learn to program in Python? Not really, since I honestly don't know. I'm sure there are some very good books a

Re: New member: Germano Carella. I need help with django, limit_choices_to and admin interface

2018-08-09 Thread germano carella
Hi Julio, Thanks, now is clear. Ok, I created models correctly and createa book in admin interface. Now I can create chapters to add this book. Now I want to learn how to create an interface that allows an user to add a new book, click on next button and add chapters to this book that is se

Re: django

2018-08-09 Thread Welly Iskand
On Friday, August 10, 2018 at 3:54:54 AM UTC+7, vasu wrote: > > while running python manage.py runserver 8080 this in cmd ...i am getting > cant open file 'manage.py' .But i followed the documentation > properly.help me with this > hi vasu you can try use command ./manage.py runserver re

Re: django

2018-08-09 Thread Julio Biason
Hi Vasu, manage.py should be created when you run "django-admin startproject ". It should also create a directory called "" where manage.py exists. That's where you should run the runserver command. On Thu, Aug 9, 2018 at 4:39 PM, vasu wrote: > while running python manage.py runserver 8080 this

Re: New member: Germano Carella. I need help with django, limit_choices_to and admin interface

2018-08-09 Thread Julio Biason
Hi Germano, When you use "ManyToMany", you're saying "any book can have any chapter and vice versa". That's obviously what you don't want. What you want is "A book has a closed set of chapters". This is done by thinking a bit on the other way with Django: Instead of saying "There is a list of chap

django

2018-08-09 Thread vasu
while running python manage.py runserver 8080 this in cmd ...i am getting cant open file 'manage.py' .But i followed the documentation properly.help me with this -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this grou

New member: Germano Carella. I need help with django, limit_choices_to and admin interface

2018-08-09 Thread Germano Carella
Hi, I'm Germano from Italy. I'm new of django. Probably this discussion has many many examples, but I can't find my situation. I have two models, Book and Chapters. These are simple models, I need them only for educational purpose. class Book(models.Model): title=models.CharField(max_length=2

Re: Array List

2018-08-09 Thread Kasper Laudrup
Hi Dheeraj, On 09/08/2018 10.53, Dheeraj Kumar wrote: Can u tell me please. Tell you what? Where to find books or tutorials on how to learn to program in Python? Not really, since I honestly don't know. I'm sure there are some very good books and tutorials for learning Python for beginner

Re: i need help

2018-08-09 Thread Kasper Laudrup
Hi Aladin, On 09/08/2018 15.07, Aladin Masen wrote: Please how can i use the django_markdown  with django 2 You probably can't, since the library seems to be unmaintained and not updated for use with Django 2, unless you want to fork it and make the changes needed for supporting Django 2.

Re: issue with bootstrap

2018-08-09 Thread Kasper Laudrup
Hi Tosin, On 09/08/2018 14.52, Tosin Ayoola wrote: Halo guyz working on a Django project that requires me using bootstrap but the issue I'm having is that I can use the load static to include bootstrap @ be base_generic.html, but can't use it with the index page, tried fixing it, what s

Deploying a Frozen Django app over IIS

2018-08-09 Thread Clay Records
Hello, I’m trying to deploy my Django application to another server so that it can run over IIS. I can deploy the application just fine when there is a local installation of Python to use, but I don’t want to require this other server to download Python just to run this website. I have been usin

Re: Recursive one-to-many foreign key on the same table

2018-08-09 Thread Tosin Ayoola
thanks for the response but can you help me go through the code probably i'm the person making mistake in my code this the github link: https://github.com/olaneat/ask_the_schools On Thu, Aug 9, 2018 at 3:00 PM, Marius Räsener wrote: > Hey Philip, > > while I can't help you with your actual imple

i need help

2018-08-09 Thread Aladin Masen
Please how can i use the django_markdown with django 2 -- 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 t

How to add a language in Django that its not supported by default?

2018-08-09 Thread Deniz Bazan
Im trying to make a website in 5 languages. The main language should be kurdish but it is not supported by Django default. I tried already the how to add new languages into Django?

Re: New language adding error('Unknown language code si.')

2018-08-09 Thread Deniz Bazan
Hi Kumara, did you find a solution for your question, because i have same problem. Am Montag, 30. April 2018 14:04:01 UTC+2 schrieb lakshitha kumara: > > Hello Jason, > > *Thanks you for your reply but **unfortunately** that example not working > any more with django 2 and python 3 .* > > > *T

issue with bootstrap

2018-08-09 Thread Tosin Ayoola
Halo guyz working on a Django project that requires me using bootstrap but the issue I'm having is that I can use the load static to include bootstrap @ be base_generic.html, but can't use it with the index page, tried fixing it, what should I do, how to i fix this and move on ? -- You receive

Re: Recursive one-to-many foreign key on the same table

2018-08-09 Thread Jason
i would look at https://github.com/django-mptt/django-mptt and see if that fits your needs. Sounds like you want to implement a limited level tree structure in a db table. If so, this package is a very good one. -- You received this message because you are subscribed to the Google Groups "Dj

Re: Recursive one-to-many foreign key on the same table

2018-08-09 Thread Marius Räsener
Hey Philip, while I can't help you with your actual implementation I wanted to link you to this presentation abuot the topic, it's worth time spend I think ... https://www.youtube.com/watch?v=CRxjoklS8v0&index=7&list=PLY_che_OEsX3aZo5RttI6Fj2XZ7nTjhBu recursive models are tricky, especially to

Recursive one-to-many foreign key on the same table

2018-08-09 Thread Phlip Pretorius
I want to build a one-to-many recursive foreign key on a table in Django. The concept is something like this: Table: staff/person staff numberSurnameFirstnamesSupervisor 4637ZondoJulien 859076VanderbildtJohn4637 Tha

Re: Django Generic Date Views

2018-08-09 Thread Michal Petrucha
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On Thu, Aug 09, 2018 at 07:54:29PM +0800, Gerald Brown wrote: > One thing I discovered is that I had the line for the url.py file in my top > level url.py.  I moved it to myapp/url.p but still same 404 error, however > no longer get the "has no attri

Re: Django Generic Date Views

2018-08-09 Thread Gerald Brown
One thing I discovered is that I had the line for the url.py file in my top level url.py.  I moved it to myapp/url.p but still same 404 error, however no longer get the "has no attribute" error How do I call this view?  Tried from the browser "http://127.0.0.1:8000/today/"; and I get "__init__

Re: Field forced to not-null

2018-08-09 Thread Phlip Pretorius
Thank you Andréas and Jason That solved my problem Regards, Phlip On Monday, August 6, 2018 at 3:02:01 PM UTC+2, Andréas Kühne wrote: > > Hi Philip, > > The field is required because you haven't allowed it to be blank - and > django admin requires fields to have the following attributes if you

Re: data retrival from django db.sqlite3

2018-08-09 Thread Kasper Laudrup
Hi Ruban, On 08/09/2018 08:48 AM, ruban bharath wrote: how to retrieve a selected data from django inbuilt database If you don't want to use SQL and sqlites client program, you can use the dbshell command with django manage, eg.: # ./manage,py dbshell Kind regards, Kasper Laudrup -- You

Re: Learning django

2018-08-09 Thread diloudup
There is also a wonderful tutorial on Djangogirls. But it is not quite the last version 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 from it, send an email to django-users

data retrival from django db.sqlite3

2018-08-09 Thread ruban bharath
how to retrieve a selected data from django inbuilt database -- 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 t

Re: Django Generic Date Views

2018-08-09 Thread Michal Petrucha
On Wed, Aug 08, 2018 at 05:42:06AM -0700, Gerald Brown wrote: > > > On Wednesday, August 8, 2018 at 8:15:21 PM UTC+8, Jason wrote: > > > > what have you tried so far? What issues are you having with the > > documentation examples? > > > > "can't get them to work" is really uninformative, RIGHT

Required UI designer

2018-08-09 Thread pranay reddy
Requirements:- JavaScript,css,Ajax, jQuery,html5 and xhtml Location: Bangalore Exl techno solutions Exp package:2-3 lpa Experience required:0-2 year Interested cadidates send mail to pranai.re...@ekatechserv.com or pranaireddy...@gmail.com -- You received this message because you are subscribed

Re: django models

2018-08-09 Thread Mike Dewhirst
On 9/08/2018 6:40 PM, Ramandeep Kaur wrote: I removed pip install django-generate-secret-key and now i am getting invalid syntax error. Thanks guys:) Did you follow all the steps? Have you looked closely at the traceback for clues to fix the syntax error? I'm going off the air now until the

Re: Array List

2018-08-09 Thread Dheeraj Kumar
Can u tell me please. On Thu 9 Aug, 2018, 2:15 PM Kasper Laudrup, wrote: > Hi Dheeraj, > > On 08/09/2018 10:31 AM, Dheeraj Kumar wrote: > > It is a basic question put in interview for python developer where > > mentioned django too. > > > > Yes, this seems like it should be fairly easy to implem

Re: Array List

2018-08-09 Thread Kasper Laudrup
Hi Dheeraj, On 08/09/2018 10:31 AM, Dheeraj Kumar wrote: It is a basic question put in interview for python developer where mentioned django too. Yes, this seems like it should be fairly easy to implement for anyone with basic experience in Python or any other programming language. I sugg

Re: django models

2018-08-09 Thread Mike Dewhirst
On 9/08/2018 5:25 PM, Ramandeep Kaur wrote: when i run my manage.py server its giving me invalid syntax error.   File "C:\Users\Dell\vms2\vms2\settings\base.py", line 18     from .base import *pip install django-generate-secret-key                          ^ SyntaxError: invalid syntax There is

Re: Array List

2018-08-09 Thread Dheeraj Kumar
It is a basic question put in interview for python developer where mentioned django too. On Thu 9 Aug, 2018, 1:55 PM Kasper Laudrup, wrote: > Hi Dheeraj, > > On 08/09/2018 10:22 AM, Dheeraj Kumar wrote: > > Array = [0,0,4,2,6,9,0,5,2,0,9,5,9] > > Make it in squnce n tell maximum value n repitati

Re: Array List

2018-08-09 Thread Kasper Laudrup
Hi Dheeraj, On 08/09/2018 10:22 AM, Dheeraj Kumar wrote: Array = [0,0,4,2,6,9,0,5,2,0,9,5,9] Make it in squnce n tell maximum value n repitation value without using in build function. How is this related to Django? Kind regards, Kasper Laudrup -- You received this message because you are

Array List

2018-08-09 Thread Dheeraj Kumar
Array = [0,0,4,2,6,9,0,5,2,0,9,5,9] Make it in squnce n tell maximum value n repitation value without using in build function. -- 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

Re: django models

2018-08-09 Thread Kasper Laudrup
Hi Ramandeep, On 08/09/2018 09:57 AM, Ramandeep Kaur wrote: hi kasper,this is my settings.py What you have added to your settings.py doesn't make any sense. It is not valid Python code as your Python interpreter correctly tells you. I have no idea what you tried to achieve by writing that.

Re: django models

2018-08-09 Thread Ramandeep Kaur
import os import sys from django.core.exceptions import ImproperlyConfigured from .base import *pip install django-generate-secret-key def get_env_variable(var_name): try: return os.environ[var_name] except KeyError: error_msg = "Set the %s environment variable" % var_name raise ImproperlyConfig

Re: django models

2018-08-09 Thread Kasper Laudrup
Hi Ramandeep, On 08/09/2018 09:25 AM, Ramandeep Kaur wrote: when i run my manage.py server its giving me invalid syntax error.   File "C:\Users\Dell\vms2\vms2\settings\base.py", line 18     from .base import *pip install django-generate-secret-key                          ^ SyntaxError: invalid

Re: django models

2018-08-09 Thread Ramandeep Kaur
when i run my manage.py server its giving me invalid syntax error. File "C:\Users\Dell\vms2\vms2\settings\base.py", line 18 from .base import *pip install django-generate-secret-key ^ SyntaxError: invalid syntax On Thu, Aug 9, 2018 at 12:14 PM, Mike Dewhirst wrote: