Re: iterate over query set

2021-07-26 Thread DJANGO DEVELOPER
because you have provided the get_department with index 0. so it will only give you the info about first department. On Tue, Jul 27, 2021 at 3:17 AM sum abiut wrote: > I am trying to get the values of the userid by iterating through the > queryset. However not all the values are displayed. I am

Re: OperationalError: foreign key mismatch

2021-07-26 Thread DJANGO DEVELOPER
can you please change your object from this: filename_id = models.ForeignKey(FilenameTbl,db_column='filename_id', to_field='rowid',null=True,blank=True,on_delete=models.SET_NULL) to : filename_id = models.ForeignKey(FilenameTbl,db_column='filename', to_field='rowid',null=True,blank=True,on_delete=

Re: Please remove me from this user group.

2021-07-26 Thread Raphael Polanco
Farewell. On Mon, Jul 26, 2021 at 22:16 Shirley Nelson wrote: > Please remove me from this user group. Thank you. > > Regards, Shirley Nelson > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop recei

Please remove me from this user group.

2021-07-26 Thread Shirley Nelson
Please remove me from this user group. Thank you. Regards, Shirley Nelson -- 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.

Re: Is there a quick and easy way to copy a model instance

2021-07-26 Thread Mike Dewhirst
On 26/07/2021 7:56 pm, Markus Holtermann wrote: Hi Mike, Last time I checked, when you set `instance.pk = None` and then do `instance.save()`, Django will create a new instance. Markus Thanks for responding. I wasn't sufficiently explicit in my subject line nor explanation of the task. Sorr

Re: Added new column to model and run migrations but not applied to database table

2021-07-26 Thread guna visva
having had the unfortunate phase of dealing with it , sorting it requires some patience the issue is the tables in django_migrations is not in sync with rest the rest of your database or migrations files. You have to first remove the addition in field etc and make sure the database tables are

iterate over query set

2021-07-26 Thread sum abiut
I am trying to get the values of the userid by iterating through the queryset. However not all the values are displayed. I am not sure why I am not getting all the values when I iterate through it. users - Users.objects.filter(depid=get_department[0].depid) print(users) #when i test it here it pri

OperationalError: foreign key mismatch

2021-07-26 Thread Wai Yeung
Hello, I'm getting the following error whenever I attempt to save to the table in a SQLite database: foreign key mismatch - "procedure_tbl" referencing "filename_tbl" In models.py, these are the tables that the error is refering to: class FilenameTbl(models.Model): rowid = models.AutoField

What is the necessity of success_url_allowed_hosts on a LogoutView?

2021-07-26 Thread Patrice Chaula
success_url_allowed_hosts: A set of hosts, in addition to request.get_host() , that are safe for redirecting after logout. Defaults to an empty se

Re: CSS not linking with HTML

2021-07-26 Thread Baxtiyor Boboraximov
hello . you must add to sittings.py this code. STATIC_URL = '/static/' STATICFILES_DIRS = (str(BASE_DIR.joinpath('static')),) пт, 28 мая 2021 г. в 23:39, sukhy gill : > Dear Frnds > I am unable to link CSS with HTML > HTML working but CSS not working inside the .html file with t

Re: AttributeError: module 'polls.views' has no attribute 'index'

2021-07-26 Thread DJANGO DEVELOPER
as you mentioned that you're using django 3.2 but your urls.py file is following the pattern of django 1.7. use your urls.py this way : path('your polls url here', views.index, name='index') On Mon, Jul 26, 2021 at 6:45 PM Zain wrote: > Had the same issue. > > Solved, make sure you run each edit

Re: CSS not linking with HTML

2021-07-26 Thread Nikalesh Patil
Try it On Mon, 26 Jul, 2021, 7:55 PM V. J, wrote: > Hello, I'm making a list of potential customers, in about two months, we > will have a business plan ready and we will issue a digital token (ICO) > based on our product in the company. Would you be interested in learning > more ...? > > Dne

Re: use of annotate in django query

2021-07-26 Thread V. J
Hello, I'm making a list of potential customers, in about two months, we will have a business plan ready and we will issue a digital token (ICO) based on our product in the company. Would you be interested in learning more ...? Dne so 5. čvn 2021 19:09 uživatel Lalit Suthar napsal: > just repli

Re: CSS not linking with HTML

2021-07-26 Thread V. J
Hello, I'm making a list of potential customers, in about two months, we will have a business plan ready and we will issue a digital token (ICO) based on our product in the company. Would you be interested in learning more ...? Dne čt 3. čvn 2021 10:06 uživatel sukhy gill napsal: > Dear frnd >

Re: AttributeError: module 'polls.views' has no attribute 'index'

2021-07-26 Thread Zain
Had the same issue. Solved, make sure you run each edited python file during the tutorial. I guess it needs to update. All I know is this fixed the issue. On Monday, April 19, 2021 at 2:07:34 AM UTC+10 avi.me...@gmail.com wrote: > I followed the same tutorial on 17th April 2021 with Python 3.9

Re: Is there a quick and easy way to copy a model instance

2021-07-26 Thread Mike Dewhirst
--(Unsigned mail from my phone) Original message From: Markus Holtermann Date: 26/7/21 20:04 (GMT+10:00) To: Django Users Subject: Re: Is there a quick and easy way to copy a model instance Hi Mike,Last time I checked, when you set `instance.pk = None` and then do `instance

Re: Is there a quick and easy way to copy a model instance

2021-07-26 Thread Markus Holtermann
Hi Mike, Last time I checked, when you set `instance.pk = None` and then do `instance.save()`, Django will create a new instance. Cheers Markus On Mon, Jul 26, 2021, at 9:13 AM, Mike Dewhirst wrote: > I'm archiving a particular child record every time it is saved but > connecting it to anothe

Is there a quick and easy way to copy a model instance

2021-07-26 Thread Mike Dewhirst
I'm archiving a particular child record every time it is saved but connecting it to another parent. Each year I create a new parent and the saving process keeps going but the copied child gets connected to the new parent. That will give me an annual snapshot of the child record. At the momen