manytomany field errors

2023-03-21 Thread Abhishek ozha
models::from django.db import models from apps.user.models.users import User class Team(models.Model): user = models.ManyToManyField(User, related_name="staff_teams") team = models.CharField(max_length=50) description = models.TextField(max_length=250) verbose_name_plural = "Teams" def

Re: Stuck with Django

2023-03-21 Thread Jeman Kumar
see the "{" bracket near options? you didn't close it sir. On Wed, 22 Mar, 2023, 1:07 am Vairamuthu Puvanachandran, < vai.pu...@gmail.com> wrote: > my settings.py is having a problem right now, miss matching of the "(", > "{" and "[" > > Can you help me to resolve that? > > vairam > > TEMPLATES

Re: Django error while running

2023-03-21 Thread David Nugent
Any traceback with this at the end: _bootstrap._gcd_import(name[level..], package, level) Is almost always is due to a problem with your settings INSTALLED_APPS, particularly if django\apps\registry.py Is further up the trace. A missing comma between items, perhaps? It would indeed be

Re: Stuck with Django

2023-03-21 Thread Vairamuthu Puvanachandran
my settings.py is having a problem right now, miss matching of the "(", "{" and "[" Can you help me to resolve that? vairam TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': (os.path.join[BASE_DIR, 'templates']), 'APP_DIRS':

Re: Django error while running

2023-03-21 Thread Prosper Lekia
If the clone project has a requirements.txt file, you can run pip install requirements.txt. Else, install Django rest_framework in your virtual environment. On Tue, Mar 21, 2023, 17:06 oba stephen wrote: > Can you share the content of your settings file? The installed apps in > particular... >

Re: Deleted django_content_type table

2023-03-21 Thread shailesh sachan
Done actually restored old db from aws rds. On Tuesday, March 21, 2023 at 7:02:37 PM UTC+5:30 Chetan Ganji wrote: > try one thing > create new db n migrate again with all the models. it will create the > contentype table again. then just restore this table to the old db. > > i hope it solves

Re: Stuck with Django

2023-03-21 Thread yash thadani
Hi Vairam What exactly you are stuck with? Regards Yash On Tue, Mar 21, 2023 at 9:23 PM Vairamuthu Puvanachandran < vai.pu...@gmail.com> wrote: > I am 76 yr old retired Engineer in Canada. > > > > I am new to Python and Django. > > > > I was looking for help and I found your site. > > > > I am

Re: Stuck with Django

2023-03-21 Thread Abdulrahman Abbas
Your attached pictures are not clear On Tue, Mar 21, 2023, 16:53 Vairamuthu Puvanachandran wrote: > I am 76 yr old retired Engineer in Canada. > > > > I am new to Python and Django. > > > > I was looking for help and I found your site. > > > > I am stuck now. > > > > I followed the “polls.app”

Re: Django error while running

2023-03-21 Thread oba stephen
Can you share the content of your settings file? The installed apps in particular... On Tue, 21 Mar 2023, 16:05 Chandresh . T, wrote: > Recently I was running a git clone ( > https://github.com/divanov11/StudyBud.git) > > after doing required steps like migrations, etc. I started to run it by >

Re: Stuck with Django

2023-03-21 Thread Jeman Kumar
you have to add apps to "installed apps" list in settings.py On Tue, 21 Mar, 2023, 9:26 pm Jeman Kumar, wrote: > hello sir, Did you add the apps in the setting.py file? > > On Tue, 21 Mar, 2023, 9:23 pm Vairamuthu Puvanachandran, < > vai.pu...@gmail.com> wrote: > >> I am 76 yr old retired

Re: Stuck with Django

2023-03-21 Thread Jeman Kumar
hello sir, Did you add the apps in the setting.py file? On Tue, 21 Mar, 2023, 9:23 pm Vairamuthu Puvanachandran, < vai.pu...@gmail.com> wrote: > I am 76 yr old retired Engineer in Canada. > > > > I am new to Python and Django. > > > > I was looking for help and I found your site. > > > > I am

Django error while running

2023-03-21 Thread Chandresh . T
Recently I was running a git clone ( https://github.com/divanov11/StudyBud.git) after doing required steps like migrations, etc. I started to run it by (python manage.py runserver) but I got this error. can anyone help me with this, please? Thanks in advance! PS

Re: Deleted django_content_type table

2023-03-21 Thread Chetan Ganji
try one thing create new db n migrate again with all the models. it will create the contentype table again. then just restore this table to the old db. i hope it solves your problem. On Fri, Mar 17, 2023, 02:09 shailesh sachan wrote: > Now i am not able to do anything and i cannot lose the

Re: django multi databases and multi sessions

2023-03-21 Thread Ujjwal Joshi
There is a package for multi-tenancy in django . Also there is another package called django-tenant-users which you can use to manage permission between tenants. If you want to create a multi tenant on your own you can research on the internet. There is tons of information about implementing

Re: Installed Django 4.1 but version is 2.2

2023-03-21 Thread Joao Frankmann
I am running on a containerised virtual environment completely isolated to the system. when I run django --version, it shows me the version 4.1, but when I check the code, it is not the code for 4.1 but the code for 2.2 On Tuesday, 21 March 2023 at 11:20:46 UTC Andréas Kühne wrote: > I am

Re: Installed Django 4.1 but version is 2.2

2023-03-21 Thread Andréas Kühne
I am guessing this is because you are running your systems installed django-admin for setting up the project and not in a virtualenvironment? Before running django-admin startproject mysite, make sure that you have created a virtualenvironment and install the version of django that you want.

Re: Migration of tables from external database to new database

2023-03-21 Thread Brian Carey
mysqldump can be used to extract the table(s) from the old database. This creates a file with the SQL statements to recreate the table which can be read into into the new database with mysql command. As long as you are going from a MySQL DB to another this will work fine. If you are moving from

Installed Django 4.1 but version is 2.2

2023-03-21 Thread Joao Frankmann
I've been using django for a while and today when starting a new project I noticed that when I run: django-admin startproject mysite The settings.py generated file says: Generated by 'django-admin startproject' using Django 2.2.19 and the code is not the new one. I have projects written in

Re: Migration of tables from external database to new database

2023-03-21 Thread nef
Hi, My suggestion is to first create the apps using Django, then create the models respecting the database structure you are willing to migrate, run the makemigrations, migrate which will create a new database with tables having the same structure as those you want to migrate. After that, use