Re: Django after migration UndefinedColumn error in production

2019-10-22 Thread wd
hi,

You may need to check that the database django connect to is the same as
you checked that the column is exists?

On Tue, Oct 22, 2019 at 8:32 PM red  wrote:

> Hi everyone,
>
>
> I have a website in production. I have an app, with a model. It contained
> a markdown_file attribute:
>
> markdown_file=models.FileField(upload_to='/media/')
>
> But since the number of file is limited, I decided to make it a
> markdown_filename attribute with a choices selection box:
>
> markdown_filename=models.CharField(max_length=30,null=True,blank=True,choices=MENU_MARKDOWN_FILE_CHOICES)
>
> Therefore, I modified this model and made migrations locally. I pushed the
> code in production and run:
>
> python manage.py migrate
>
> After I checked with showmigrations and sqlmigrate, that the modification
> I made were there. Then, I checked in the database, that the fields were
> correctly modified. But, I still get this error, when trying to access the
> website:
>
> ERROR:django.request:Internal Server Error: /Traceback (most recent call 
> last):
>   File 
> "/srv/data/web/vhosts/default/local/lib/python3.7/site-packages/django/db/backends/utils.py",
>  line 84, in _execute
> return self.cursor.execute(sql, params)
> psycopg2.errors.UndefinedColumn: column showcase_subpage.markdown_file does 
> not exist
> LINE 1: ...bpage"."slug", "showcase_subpage"."html_content", "showcase_...
>  ^
> The above exception was the direct cause of the following exception:
> Traceback (most recent call last):
>   File 
> "/srv/data/web/vhosts/default/local/lib/python3.7/site-packages/django/core/handlers/exception.py",
>  line 34, in inner
> response = get_response(request)
>   File 
> "/srv/data/web/vhosts/default/local/lib/python3.7/site-packages/django/core/handlers/base.py",
>  line 115, in _get_response
> response = self.process_exception_by_middleware(e, request)
>   File 
> "/srv/data/web/vhosts/default/local/lib/python3.7/site-packages/django/core/handlers/base.py",
>  line 113, in _get_response
> response = wrapped_callback(request, *callback_args, **callback_kwargs)
>   File "./showcase/views.py", line 10, in home
> return render(request, 'showcase/home.html', context)
>   File 
> "/srv/data/web/vhosts/default/local/lib/python3.7/site-packages/django/shortcuts.py",
>  line 36, in render
> content = loader.render_to_string(template_name, context, request, 
> using=using)
>   File 
> "/srv/data/web/vhosts/default/local/lib/python3.7/site-packages/django/template/loader.py",
>  line 62, in render_to_string
> return template.render(context, request)
>   File 
> "/srv/data/web/vhosts/default/local/lib/python3.7/site-packages/django/template/backends/django.py",
>  line 61, in render
> return self.template.render(context)
>   File 
> "/srv/data/web/vhosts/default/local/lib/python3.7/site-packages/django/template/base.py",
>  line 171, in render
> return self._render(context)
>   File 
> "/srv/data/web/vhosts/default/local/lib/python3.7/site-packages/django/template/base.py",
>  line 163, in _render
> return self.nodelist.render(context)
>   File 
> "/srv/data/web/vhosts/default/local/lib/python3.7/site-packages/django/template/base.py",
>  line 937, in render
> bit = node.render_annotated(context)
>   File 
> "/srv/data/web/vhosts/default/local/lib/python3.7/site-packages/django/template/base.py",
>  line 904, in render_annotated
> return self.render(context)
>   File 
> "/srv/data/web/vhosts/default/local/lib/python3.7/site-packages/django/template/loader_tags.py",
>  line 150, in render
> return compiled_parent._render(context)
>   File 
> "/srv/data/web/vhosts/default/local/lib/python3.7/site-packages/django/template/base.py",
>  line 163, in _render
> return self.nodelist.render(context)
>   File 
> "/srv/data/web/vhosts/default/local/lib/python3.7/site-packages/django/template/base.py",
>  line 937, in render
> bit = node.render_annotated(context)
>   File 
> "/srv/data/web/vhosts/default/local/lib/python3.7/site-packages/django/template/base.py",
>  line 904, in render_annotated
> return self.render(context)
>   File 
> "/srv/data/web/vhosts/default/local/lib/python3.7/site-packages/django/template/defaulttags.py",
>  line 166, in render
> len_values = len(values)
>   File 
> "/srv/data/web/vhosts/default/local/lib/python3.7/site-packages/django/db/models/query.py",
>  line 256, in __len__
> self._fetch_all()
>   File 
> "/srv/data/web/vhosts/default/local/lib/python3.7/site-packages/django/db/models/query.py",
>  line 1242, in _fetch_all
> self._result_cache = list(self._iterable_class(self))
>   File 
> "/srv/data/web/vhosts/default/local/lib/python3.7/site-packages/django/db/models/query.py",
>  line 55, in __iter__
> results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, 
> chunk_size=self.chunk_size)
>   File 
> 

Re: how to set up a calculated field in Django?

2019-10-22 Thread wd
hi,

Besides the solution provided by @nm,  maybe you can do it by using
database trigger ...

On Tue, Oct 22, 2019 at 2:05 AM Eileen Bauer  wrote:

> Hi,
> i have the following items in my model:
> mother_alive = models.IntegerField(choices=YES_NO_CHOICES, blank=True,
> null=True, default=1)
> father_alive = models.IntegerField(choices=YES_NO_CHOICES, blank=True,
> null=True, default=1)
>
> and I'd like to set up a generated field for them so I'd be able to detect
> whether the child is an orphan or not. In MySQL i believe it'd look like
> this:
> orphan varchar(101) GENERATED ALWAYS AS (mother_alive+father_alive)
> VIRTUAL,
>
> I don't know how to change my model to do that...
>
> Any help?
>
> -Eileen
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/32b1c56f-f52d-4b63-bd93-db25cc1e89a6%40googlegroups.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CABexzmiDjxRCBJR%2B-0o3OavfFMASL%2BtSpSWmi66nxbrp8nz9uA%40mail.gmail.com.


Re: Daphne behavior question: Application close timeout and caching

2019-10-22 Thread wd
https://asgi.readthedocs.io/en/latest/specs/main.html#specification-details
here
is the spec for ASGI, you can check what the doc says.

On Wed, Oct 23, 2019 at 7:49 AM DeVonte Applewhite <
devonte_applewh...@trimble.com> wrote:

> Does anyone have an idea where I can get more information on Daphne
> behavior?
>
> On Tuesday, October 8, 2019 at 5:47:25 PM UTC-6, DeVonte Applewhite wrote:
>>
>> Hello,
>>
>> I am using Daphne to run a Quart app (
>> https://pgjones.gitlab.io/quart/index.html#) and I wanted to use caching
>> to improve performance.
>>
>> I looked at the settings for Daphne and have a question about the below
>> option:
>>
>>   --application-close-timeout APPLICATION_CLOSE_TIMEOUT
>> The number of seconds an ASGI application has to
>> exit
>> after client disconnect before it is killed
>>
>> Does Daphne launch an application upon receiving a request, then kill it
>> after the application gives a response every time?
>> If this is the case, I assume in memory caching would not work since the
>> process running the app would be killed after every request.
>>
>> Can someone give more information on the behavior of Daphne regarding the
>> application close timeout?
>>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/6149f3a3-c87c-4ab6-a059-3a4b78343a18%40googlegroups.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CABexzmiUuFrnfk-8tgDKroURkeLfF9pGioVpb%2BZQOz-rY%2BNmqA%40mail.gmail.com.


Re: Daphne behavior question: Application close timeout and caching

2019-10-22 Thread wd
hi,

Daphne support both http and websocket connect, if it's an http connection,
I think daphne will close the application when the application gives a
response. But if it's a websocket connection, it will keep the connection
and last until the websocket connect close.


On Wed, Oct 9, 2019 at 7:46 AM DeVonte Applewhite <
devonte_applewh...@trimble.com> wrote:

> Hello,
>
> I am using Daphne to run a Quart app (
> https://pgjones.gitlab.io/quart/index.html#) and I wanted to use caching
> to improve performance.
>
> I looked at the settings for Daphne and have a question about the below
> option:
>
>   --application-close-timeout APPLICATION_CLOSE_TIMEOUT
> The number of seconds an ASGI application has to
> exit
> after client disconnect before it is killed
>
> Does Daphne launch an application upon receiving a request, then kill it
> after the application gives a response every time?
> If this is the case, I assume in memory caching would not work since the
> process running the app would be killed after every request.
>
> Can someone give more information on the behavior of Daphne regarding the
> application close timeout?
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/7cf9d264-e5f3-4486-98c9-60a891eca48f%40googlegroups.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CABexzmh99kDHwG71zMHCCOM8nL8%3DAJLub8qmW2zORXbumXWw4Q%40mail.gmail.com.


Re: database could't connect in python to atom

2019-10-22 Thread wd
hi,

Maybe you need to check what mysql.connector is. What's the output for
'dir(mysql.connector)' ?

On Wed, Oct 23, 2019 at 11:08 AM MEGA NATHAN 
wrote:

> Hi.
>
> AttributeError: module 'mysql.connector' has no attribute 'connect'
>
>
>
>
>
> regards
> Meganathan,
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/20f71ae7-75ed-4126-b786-6c675041d9f9%40googlegroups.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CABexzmjm0g4xm75Q-vLHJZ%2BOoymu6Sqa1CqBSJX%3DusSnVN9GtQ%40mail.gmail.com.


Re: Auto assigning 2 types of user roles on sign up

2019-10-22 Thread wd
hi,

A user could have many roles, it's all depends on your design. My
understanding is:
1. When user directly sign up, he will be assigned the primary role.
2. When user sign up by an invitation, he will be assigned the member role.
3. So can a user in member role invite other users?

The 'save()' method you mentioned is the 'save' method for django models?
You can simply use model class to create an instance and save it to db
later.

u = User(name='Lucy')
u.save()

Maybe you can check the docs here
https://docs.djangoproject.com/en/2.2/topics/db/models/ .

On Wed, Oct 23, 2019 at 9:37 AM Stephanie Semerville <
stephanie.semervi...@gmail.com> wrote:

> I am new to Django and trying to create a website that has two user roles
> primary and member. What i would like to happen is for by default a primary
> user to sign up and be assigned the primary role. When that primary user
> logs into the website, I would like them to have the ability to invite new
> users to the website. When that new user receives the invitation email and
> is redirected to the same sign up form, I would like that user to be auto
> assigned the member role on form submit. I have heard about the save()
> method but not sure how to use it and what file it goes in. Would the
> process change if all users can potentially be both roles?
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/c80f1b02-d1e8-4a9d-a8ca-80af61260e79%40googlegroups.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CABexzmgF7s61Umbhe3-rLhfTC_V%2BQYkDCec-T0G89Hd4K5%2BYVA%40mail.gmail.com.


Re: database could't connect in python to atom

2019-10-22 Thread Suraj Thapa FC
You are using wrong syntax for connecting sql

On Wed, 23 Oct, 2019, 8:38 AM MEGA NATHAN, 
wrote:

> Hi.
>
> AttributeError: module 'mysql.connector' has no attribute 'connect'
>
>
>
>
>
> regards
> Meganathan,
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/20f71ae7-75ed-4126-b786-6c675041d9f9%40googlegroups.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPjsHcGHsVeLf5%3D4Ea5_MoS33WW8OgYezvCFMaDoiG%3DPP%3DQ2OA%40mail.gmail.com.


Re: Daphne with absolute path to ASGI file

2019-10-22 Thread wd
hi,

I checked the source code for Daphne, it uses import_by_path to import
application

def import_by_path(path):
> """
> Given a dotted/colon path, like project.module:ClassName.callable,
> returns the object at the end of the path.
> """
> module_path, object_path = path.split(":", 1)
> target = importlib.import_module(module_path)
> for bit in object_path.split("."):
> target = getattr(target, bit)
> return target
>
>
The importlib.import_module
https://docs.python.org/3/library/importlib.html#importlib.import_module seems
not support a path as it's args.

In linux, we can use command like 'cd path && daphne
project.asgi:application' to run the application in any path, but I don't
know if windows support it.

On Wed, Oct 23, 2019 at 3:57 AM BR  wrote:

> I've been using Daphne for months without issue, and have reorganized my
> project structure to make things a bit easier. However, it appears that
> Daphne needs to be run from the folder containing the Django project module
> like so:
>
> daphne project.asgi:application
>
> How can I specify the full path to project.asgi:application?
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/4fbd3a46-3939-492a-a893-86d96fbe21f5%40googlegroups.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CABexzmhVrVui6x-EyUGUUQdBtKqDpWjwPd9K_DogjgJPdwm45g%40mail.gmail.com.


database could't connect in python to atom

2019-10-22 Thread MEGA NATHAN
Hi.

AttributeError: module 'mysql.connector' has no attribute 'connect'





regards
Meganathan,

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/20f71ae7-75ed-4126-b786-6c675041d9f9%40googlegroups.com.


Auto assigning 2 types of user roles on sign up

2019-10-22 Thread Stephanie Semerville
I am new to Django and trying to create a website that has two user roles 
primary and member. What i would like to happen is for by default a primary 
user to sign up and be assigned the primary role. When that primary user 
logs into the website, I would like them to have the ability to invite new 
users to the website. When that new user receives the invitation email and 
is redirected to the same sign up form, I would like that user to be auto 
assigned the member role on form submit. I have heard about the save() 
method but not sure how to use it and what file it goes in. Would the 
process change if all users can potentially be both roles?

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/c80f1b02-d1e8-4a9d-a8ca-80af61260e79%40googlegroups.com.


Re: Getting ```AttributeError: 'str' object has no attribute 'state_forwards'``` when running a migrations, Down there is the migrations file. please help

2019-10-22 Thread Jorge Gimeno
Can you post your models.py files, please?

-Jorge

On Tue, Oct 22, 2019, 6:07 PM fils-aime walnes andre <
walnesfilsa...@gmail.com> wrote:

> Merci freo
>
> Le lundi 21 octobre 2019, adonis simo  a écrit :
>
>>
>> # Generated by Django 2.2.3 on 2019-10-21 22:00
>>
>>
>>
>> from django.db import migrations, models
>>
>> import django.db.models.deletion
>>
>> import django_extensions.db.fields
>>
>>
>>
>>
>>
>> class Migration(migrations.Migration):
>>
>>
>>
>> dependencies = [
>>
>> ('restaurant_app', '0002_auto_20191017_1650'),
>>
>> ('hotel', '0001_initial'),
>>
>> ]
>>
>>
>>
>> operations = [
>>
>>
>>
>> migrations.CreateModel(
>>
>> name='Action',
>>
>> fields=[
>>
>> ('id', models.AutoField(auto_created=True, primary_key=
>> True, serialize=False, verbose_name='ID')),
>>
>> ('created', django_extensions.db.fields.
>> CreationDateTimeField(auto_now_add=True, verbose_name='created')),
>>
>> ('modified', django_extensions.db.fields.
>> ModificationDateTimeField(auto_now=True, verbose_name='modified')),
>>
>> ('name', models.CharField(max_length=100)),
>>
>> ('deleted', models.BooleanField(default=False)),
>>
>> ],
>>
>> options={
>>
>> 'ordering': ('-modified', '-created'),
>>
>> 'get_latest_by': 'modified',
>>
>> 'abstract': False,
>>
>> },
>>
>> ),
>>
>> ,
>>
>> migrations.CreateModel(
>>
>> name='TypeDeService',
>>
>> fields=[
>>
>> ('id', models.AutoField(auto_created=True, primary_key=
>> True, serialize=False, verbose_name='ID')),
>>
>> ('created', django_extensions.db.fields.
>> CreationDateTimeField(auto_now_add=True, verbose_name='created')),
>>
>> ('modified', django_extensions.db.fields.
>> ModificationDateTimeField(auto_now=True, verbose_name='modified')),
>>
>> ('nomservice', models.CharField(default='Tout les
>> services', max_length=50, verbose_name='Nom de service')),
>>
>> ('sigle', models.CharField(default='TS', max_length=50,
>> verbose_name='Sigle')),
>>
>> ('deleted', models.BooleanField(default=False,
>> verbose_name='produit effacee')),
>>
>> ],
>>
>> options={
>>
>> 'verbose_name': 'Type de service',
>>
>> },
>>
>> ),
>>
>> migrations.RemoveField(
>>
>> model_name='payementhotel',
>>
>> name='mode_payement_hotel',
>>
>> ),
>>
>> migrations.RemoveField(
>>
>> model_name='payementhotel',
>>
>> name='montant_paye',
>>
>> ),
>>
>> migrations.RemoveField(
>>
>> model_name='payementhotel',
>>
>> name='montant_restant',
>>
>> ),
>>
>> migrations.RemoveField(
>>
>> model_name='payementservice',
>>
>> name='mode_payement',
>>
>> ),
>>
>> migrations.RemoveField(
>>
>> model_name='payementservice',
>>
>> name='montant_paye',
>>
>> ),
>>
>> migrations.RemoveField(
>>
>> model_name='payementservice',
>>
>> name='montant_restant',
>>
>> ),
>>
>> migrations.RemoveField(
>>
>> model_name='taches',
>>
>> name='status',
>>
>> ),
>>
>> migrations.AddField(
>>
>> model_name='agent',
>>
>> name='deleted',
>>
>> field=models.BooleanField(default=False),
>>
>> ),
>>
>> migrations.AddField(
>>
>> model_name='agent',
>>
>> name='role',
>>
>> field=models.CharField(blank=True, max_length=100, null=True,
>> verbose_name='Role'),
>>
>> ),
>>
>> migrations.AddField(
>>
>> model_name='etages',
>>
>> name='deleted',
>>
>> field=models.BooleanField(default=False, verbose_name='produit
>> effacee'),
>>
>> ),
>>
>> migrations.AddField(
>>
>> model_name='factservice',
>>
>> name='montant_paye',
>>
>> field=models.IntegerField(default=0, verbose_name='Montant
>> payé'),
>>
>> ),
>>
>> migrations.AddField(
>>
>> model_name='factservice',
>>
>> name='montant_restant',
>>
>> field=models.IntegerField(default=0, verbose_name='Montant
>> restant'),
>>
>> ),
>>
>> migrations.AddField(
>>
>> model_name='facturationreservation',
>>
>> name='montant_paye',
>>
>> field=models.IntegerField(default=0, verbose_name='Montant
>> payé'),
>>
>> ),
>>
>> migrations.AddField(
>>
>> model_name='facturationreservation',
>>
>> name='montant_restant',
>>
>> field=models.IntegerField(default=0, 

Re: Getting ```AttributeError: 'str' object has no attribute 'state_forwards'``` when running a migrations, Down there is the migrations file. please help

2019-10-22 Thread fils-aime walnes andre
Merci freo

Le lundi 21 octobre 2019, adonis simo  a écrit :

>
> # Generated by Django 2.2.3 on 2019-10-21 22:00
>
>
>
> from django.db import migrations, models
>
> import django.db.models.deletion
>
> import django_extensions.db.fields
>
>
>
>
>
> class Migration(migrations.Migration):
>
>
>
> dependencies = [
>
> ('restaurant_app', '0002_auto_20191017_1650'),
>
> ('hotel', '0001_initial'),
>
> ]
>
>
>
> operations = [
>
>
>
> migrations.CreateModel(
>
> name='Action',
>
> fields=[
>
> ('id', models.AutoField(auto_created=True, primary_key=
> True, serialize=False, verbose_name='ID')),
>
> ('created', django_extensions.db.fields.Cr
> eationDateTimeField(auto_now_add=True, verbose_name='created')),
>
> ('modified', django_extensions.db.fields.Mo
> dificationDateTimeField(auto_now=True, verbose_name='modified')),
>
> ('name', models.CharField(max_length=100)),
>
> ('deleted', models.BooleanField(default=False)),
>
> ],
>
> options={
>
> 'ordering': ('-modified', '-created'),
>
> 'get_latest_by': 'modified',
>
> 'abstract': False,
>
> },
>
> ),
>
> ,
>
> migrations.CreateModel(
>
> name='TypeDeService',
>
> fields=[
>
> ('id', models.AutoField(auto_created=True, primary_key=
> True, serialize=False, verbose_name='ID')),
>
> ('created', django_extensions.db.fields.Cr
> eationDateTimeField(auto_now_add=True, verbose_name='created')),
>
> ('modified', django_extensions.db.fields.Mo
> dificationDateTimeField(auto_now=True, verbose_name='modified')),
>
> ('nomservice', models.CharField(default='Tout les
> services', max_length=50, verbose_name='Nom de service')),
>
> ('sigle', models.CharField(default='TS', max_length=50,
> verbose_name='Sigle')),
>
> ('deleted', models.BooleanField(default=False,
> verbose_name='produit effacee')),
>
> ],
>
> options={
>
> 'verbose_name': 'Type de service',
>
> },
>
> ),
>
> migrations.RemoveField(
>
> model_name='payementhotel',
>
> name='mode_payement_hotel',
>
> ),
>
> migrations.RemoveField(
>
> model_name='payementhotel',
>
> name='montant_paye',
>
> ),
>
> migrations.RemoveField(
>
> model_name='payementhotel',
>
> name='montant_restant',
>
> ),
>
> migrations.RemoveField(
>
> model_name='payementservice',
>
> name='mode_payement',
>
> ),
>
> migrations.RemoveField(
>
> model_name='payementservice',
>
> name='montant_paye',
>
> ),
>
> migrations.RemoveField(
>
> model_name='payementservice',
>
> name='montant_restant',
>
> ),
>
> migrations.RemoveField(
>
> model_name='taches',
>
> name='status',
>
> ),
>
> migrations.AddField(
>
> model_name='agent',
>
> name='deleted',
>
> field=models.BooleanField(default=False),
>
> ),
>
> migrations.AddField(
>
> model_name='agent',
>
> name='role',
>
> field=models.CharField(blank=True, max_length=100, null=True,
> verbose_name='Role'),
>
> ),
>
> migrations.AddField(
>
> model_name='etages',
>
> name='deleted',
>
> field=models.BooleanField(default=False, verbose_name='produit
> effacee'),
>
> ),
>
> migrations.AddField(
>
> model_name='factservice',
>
> name='montant_paye',
>
> field=models.IntegerField(default=0, verbose_name='Montant
> payé'),
>
> ),
>
> migrations.AddField(
>
> model_name='factservice',
>
> name='montant_restant',
>
> field=models.IntegerField(default=0, verbose_name='Montant
> restant'),
>
> ),
>
> migrations.AddField(
>
> model_name='facturationreservation',
>
> name='montant_paye',
>
> field=models.IntegerField(default=0, verbose_name='Montant
> payé'),
>
> ),
>
> migrations.AddField(
>
> model_name='facturationreservation',
>
> name='montant_restant',
>
> field=models.IntegerField(default=0, verbose_name='Montant
> restant'),
>
> ),
>
> migrations.AddField(
>
> model_name='reservation',
>
> name='arrival_hour',
>
> field=models.TimeField(blank=True, null=True, verbose_name='Heure
> arrivee'),
>
> ),
>
> migrations.AddField(
>
> model_name='reservation',
>
> 

Re: Daphne behavior question: Application close timeout and caching

2019-10-22 Thread DeVonte Applewhite
Does anyone have an idea where I can get more information on Daphne 
behavior?

On Tuesday, October 8, 2019 at 5:47:25 PM UTC-6, DeVonte Applewhite wrote:
>
> Hello,
>
> I am using Daphne to run a Quart app (
> https://pgjones.gitlab.io/quart/index.html#) and I wanted to use caching 
> to improve performance.
>
> I looked at the settings for Daphne and have a question about the below 
> option:
>
>   --application-close-timeout APPLICATION_CLOSE_TIMEOUT
> The number of seconds an ASGI application has to 
> exit
> after client disconnect before it is killed
>
> Does Daphne launch an application upon receiving a request, then kill it 
> after the application gives a response every time?
> If this is the case, I assume in memory caching would not work since the 
> process running the app would be killed after every request.
>
> Can someone give more information on the behavior of Daphne regarding the 
> application close timeout?
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/6149f3a3-c87c-4ab6-a059-3a4b78343a18%40googlegroups.com.


Re: Complete book

2019-10-22 Thread Tato
A big thanks from brazil for the doc. Its seems very helpful

Em ter, 22 de out de 2019 17:52, victor jack 
escreveu:

> Thanks a lot for sharing
>
> On 19 Oct 2019, at 15:09, ISAAC NELSON S.B. KARGBO <
> insbkar...@njala.edu.sl> wrote:
>
> 
> Try this one out
>
> On Sat, Oct 19, 2019, 13:47 Md Nayem Tushar  wrote:
>
>> Have any easy and properly complete book in django? pls ans me
>>
>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/b523ac3b-9aad-4c1b-a4f9-d9310b6f69da%40googlegroups.com
>> 
>> .
>>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAA4EwCsFAkvbZ99z5aT9jX-R849Gkxg%3DTbSaSRvE-qUShgOL6w%40mail.gmail.com
> 
> .
> 
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/E13DDDE6-5FEA-413A-B3AF-97BE709454C9%40gmail.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAJPi9yFSZBJTdmg_Z7aMRLhK2-2NiGONrny2YHuB4ZgiEnpzfA%40mail.gmail.com.


Re: Complete book

2019-10-22 Thread victor jack
Thanks a lot for sharing 

> On 19 Oct 2019, at 15:09, ISAAC NELSON S.B. KARGBO  
> wrote:
> 
> 
> Try this one out
> 
>> On Sat, Oct 19, 2019, 13:47 Md Nayem Tushar  wrote:
>> Have any easy and properly complete book in django? pls ans me
>> -- 
>> 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 view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/b523ac3b-9aad-4c1b-a4f9-d9310b6f69da%40googlegroups.com.
> 
> -- 
> 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/CAA4EwCsFAkvbZ99z5aT9jX-R849Gkxg%3DTbSaSRvE-qUShgOL6w%40mail.gmail.com.
> 

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/E13DDDE6-5FEA-413A-B3AF-97BE709454C9%40gmail.com.


Re: Daphne with absolute path to ASGI file

2019-10-22 Thread BR
This is Windows by the way

On Tuesday, October 22, 2019 at 3:56:47 PM UTC-4, BR wrote:
>
> I've been using Daphne for months without issue, and have reorganized my 
> project structure to make things a bit easier. However, it appears that 
> Daphne needs to be run from the folder containing the Django project module 
> like so:
>
> daphne project.asgi:application
>
> How can I specify the full path to project.asgi:application?
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b7c81be7-f918-494b-b0d0-406d5e1805cf%40googlegroups.com.


[no subject]

2019-10-22 Thread Perceval Maturure
dear Django users
Is there a way to display data  from a single model on 3 different
bootstrap cards ordered by created date.
So at the end I can 3 cars each with 2 different items/ records from the
model

-- 
Sent from Gmail Mobile

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFZtZmCJ5L6SkGdqA7wNS-WV-thORM8%3Dj1P9VrwoDAkkogDh7Q%40mail.gmail.com.


Daphne with absolute path to ASGI file

2019-10-22 Thread BR
I've been using Daphne for months without issue, and have reorganized my 
project structure to make things a bit easier. However, it appears that 
Daphne needs to be run from the folder containing the Django project module 
like so:

daphne project.asgi:application

How can I specify the full path to project.asgi:application?

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/4fbd3a46-3939-492a-a893-86d96fbe21f5%40googlegroups.com.


Re: Updates in production not showing up

2019-10-22 Thread James Gutu
Restart you uwsgi and/or nginx server.

On Tue, Oct 22, 2019 at 4:32 PM Tommy Delage  wrote:

> I'm using django suit on digitalocean
>
> Anything I do in the files *.py doesn't show up in the production
> environement,
>
> DigitalOcean doesn't want to go and take a look because those are files in
> the application,
>
> I'm stuck big time, could you help me and go in my application and make a
> minor change and tell me step by step how you did?
>
> I wish we could discuss this in private for the logins and stuff,
>
> Also I never used this Google Group thing so I don't know how or when I'm
> gonna receive an answer
>
> Greatly appreciated
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/f9c37712-72fc-4ff0-bcf1-05a83fc1fe50%40googlegroups.com
> 
> .
>


-- 

-- 
Regards,
James Gutu

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAOnWGOJH0_aWE8YZ4kY%3DtbLPXOGe7%2BOatZkkXV1GWciTapmLwA%40mail.gmail.com.


Re: Updates in production not showing up

2019-10-22 Thread Suraj Thapa FC
What's the error


On Tue, 22 Oct, 2019, 9:02 PM Tommy Delage,  wrote:

> I'm using django suit on digitalocean
>
> Anything I do in the files *.py doesn't show up in the production
> environement,
>
> DigitalOcean doesn't want to go and take a look because those are files in
> the application,
>
> I'm stuck big time, could you help me and go in my application and make a
> minor change and tell me step by step how you did?
>
> I wish we could discuss this in private for the logins and stuff,
>
> Also I never used this Google Group thing so I don't know how or when I'm
> gonna receive an answer
>
> Greatly appreciated
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/f9c37712-72fc-4ff0-bcf1-05a83fc1fe50%40googlegroups.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPjsHcFFRq5tc9dWtff5_1CDuVRYYi3jXhqsnG3Rmy6wiNnEMw%40mail.gmail.com.


New model_mommy release + Deprecation Warning

2019-10-22 Thread Bernardo Fontes
Hi to all Django users,

Maybe a few people from the group use model_mommy lib to help with your
tests fixtures. As one of the maintainers of the project, I'm here to
announce its latest and final release 2.0.0 because the lib is now called
*model_bakery*.

All the information to help you to migrate your project from model_mommy to
model_bakery and the reasons behind this renaming can be found here:
https://model-mommy.readthedocs.io/en/latest/

Thanks,

-- 
Bernardo Fontes
http://berinfontes.com
http://pessoas.cc
Skype: bernardoxhc
+55 11 98398 2378

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAHiHhz%2B2pkdFjJpdG0UtY53RqVG0Y55x%3DziyJmFHOBRj7c%3DfeA%40mail.gmail.com.


Re: Querying works on shell but not on the Django program code

2019-10-22 Thread Olivier Dugast
sorry, I forgot the brackets. The correct code is:  trick = models.Manage()

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/ae2dff0b-3ab9-4d25-9908-131fdc304642%40googlegroups.com.


Re: Querying works on shell but not on the Django program code

2019-10-22 Thread Olivier Dugast


Le mercredi 10 juillet 2019 13:26:53 UTC+2, Solomon Mbak a écrit :
>
> I'm a complete novice to python and Django.
>
> I have tried several solutions I found on stack overflow, but I still get 
> the same issue. I've tried querying from shell and it works well, but not 
> on my code. 
>
> I've installed `pylint` using 
>
> pip install pylint-django
>
> I have also changed the Linter settings on Settings > User Settings > 
> Python from `pyLint` to `pylint_django` and also to `flake8`, but no 
> positive results.
> I still get the message "Class Courses has no 'objects' member 
> pylint(no-member)"
>
> These are my codes from models.py:
>
> class Courses(models.Model):
> course_title = models.CharField(max_length=200)
> course_image = models.ImageField(upload_to='course_images/')
> course_duration = models.TimeField() 
> 
>  def __str__(self):
>  return self.course_title
>
> The views.py looks like this:
>
> from django.shortcuts import render
> from django.http import HttpResponse
> from .models import Courses
> 
> def homepage(request):
> cos = Courses.objects.all()
> context={ 'courses': cos }
> 
> return render(request, "main/home.html", context) 
>
> I need help. I'm completely stuck. 
>


Same for me with a code that comes from a site of initiation to django. In 
fact it seems that writing Courses.objects.all() is not correct. According 
to the django doc, you have to add a Manager attribute . I don't really 
understand why, but it works.
In:
 class Courses(models.Model):
 you add :
  trick = models.Manager
Then in def homepage(request):  you add
cos= Courses.trick.all()

Your error should disappear as it did for my code. 

Sorry if my point is not correct but I used an automatic translator to 
answer you.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/6c92eb57-f5c3-4889-b41c-34d8f0ff3123%40googlegroups.com.


Updates in production not showing up

2019-10-22 Thread Tommy Delage
I'm using django suit on digitalocean

Anything I do in the files *.py doesn't show up in the production 
environement,

DigitalOcean doesn't want to go and take a look because those are files in 
the application,

I'm stuck big time, could you help me and go in my application and make a 
minor change and tell me step by step how you did?

I wish we could discuss this in private for the logins and stuff,

Also I never used this Google Group thing so I don't know how or when I'm 
gonna receive an answer

Greatly appreciated

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f9c37712-72fc-4ff0-bcf1-05a83fc1fe50%40googlegroups.com.


Language to LANG

2019-10-22 Thread Jean-Michel Vourgère
Hi

I ported my old password validation system based on good old cracklib to the 
new password validators. https://github.com/nirgal/django-cracklib/

I am wondering how to get a proper translation for external library calls.
I am using this stuff:

DJANGO_LANGUAGE_TO_LOCALE = {  # UTF-8 version is a requirement
'af': 'af_ZA.UTF-8',
'ar': 'ar_SA.UTF-8',
'ast': 'ast_ES.UTF-8',
'az': 'az_AZ.UTF-8',
'be': 'be_BY.UTF-8',
'bg': 'bg_BG.UTF-8',
'bn': 'bn_BD.UTF-8',
'br': 'br_FR.UTF-8',
'bs': 'bs_BA.UTF-8',
'ca': 'ca_ES.UTF-8',

os.putenv('LANG', django.utils.translation.get_language())
crack.FascistCheck(password)



Is there a way to convert django locale to GNU locale other that my ugly 
hardcoded table?

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/2212724.ZFP6dMKeL1%40deimos.


signature.asc
Description: This is a digitally signed message part.


Re: how to set up a calculated field in Django?

2019-10-22 Thread nm
One way I can think of is to add a property 
 to your model. 
I believe something like this should work:

```
## in your model class:
mother_alive = models.IntegerField(choices=YES_NO_CHOICES, blank=True, 
null=True, default=1)
father_alive = models.IntegerField(choices=YES_NO_CHOICES, blank=True, 
null=True, default=1)

@property
def is_orphan(self):
return self.mother_alive == 0 and self.father_alive == 0  # not 
sure what the "no" value is, you have to set it appropriately
```
You'll then be able to access it as an attribute of the model:
```
Child.objects.get(id=1).is_orphan
# True or False
```

This value will not be stored in the database, though, and you won't be 
able to filter children by the `is_orphan` column, because there'll be no 
such column.

Another approach would be to use annotations 
.
 
With annotations, you can do aggregations, just like with any other model 
field.


On Monday, 21 October 2019 20:05:04 UTC+2, Eileen Bauer wrote:
>
> Hi,
> i have the following items in my model:
> mother_alive = models.IntegerField(choices=YES_NO_CHOICES, blank=True, 
> null=True, default=1)
> father_alive = models.IntegerField(choices=YES_NO_CHOICES, blank=True, 
> null=True, default=1)
>
> and I'd like to set up a generated field for them so I'd be able to detect 
> whether the child is an orphan or not. In MySQL i believe it'd look like 
> this:
> orphan varchar(101) GENERATED ALWAYS AS (mother_alive+father_alive) 
> VIRTUAL,
>
> I don't know how to change my model to do that...
>
> Any help?
>
> -Eileen
>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/cd4aed5d-223b-4c9a-9678-aa0fd5b9464f%40googlegroups.com.


Re: unable to validate and save modelform data into mysql database...

2019-10-22 Thread lemme smash
okay, man. seems like you need to read and repeat everything you know about 
python and django. i highly recommend you to go through django tutorial.

On Monday, October 21, 2019 at 3:49:01 PM UTC+3, Gourab Mahapatra wrote:
>
> Traceback:
>
> File 
> "C:\Users\Admin\PycharmProjects\autotask\AutoTaskVenv\lib\site-packages\django\core\handlers\exception.py"
>  
> in inner
>   34. response = get_response(request)
>
> File 
> "C:\Users\Admin\PycharmProjects\autotask\AutoTaskVenv\lib\site-packages\django\core\handlers\base.py"
>  
> in _get_response
>   115. response = self.process_exception_by_middleware(e, 
> request)
>
> File 
> "C:\Users\Admin\PycharmProjects\autotask\AutoTaskVenv\lib\site-packages\django\core\handlers\base.py"
>  
> in _get_response
>   113. response = wrapped_callback(request, 
> *callback_args, **callback_kwargs)
>
> File 
> "C:\Users\Admin\PycharmProjects\autotask\AutoTaskVenv\lib\site-packages\django\contrib\auth\decorators.py"
>  
> in _wrapped_view
>   21. return view_func(request, *args, **kwargs)
>
> File "C:\Users\Admin\PycharmProjects\autotask\autotask\dashboard\views.py" 
> in add_job
>   41. if form.is_valid():
>
> File 
> "C:\Users\Admin\PycharmProjects\autotask\AutoTaskVenv\lib\site-packages\django\forms\forms.py"
>  
> in is_valid
>   185. return self.is_bound and not self.errors
>
> File 
> "C:\Users\Admin\PycharmProjects\autotask\AutoTaskVenv\lib\site-packages\django\forms\forms.py"
>  
> in errors
>   180. self.full_clean()
>
> File 
> "C:\Users\Admin\PycharmProjects\autotask\AutoTaskVenv\lib\site-packages\django\forms\forms.py"
>  
> in full_clean
>   381. self._clean_fields()
>
> File 
> "C:\Users\Admin\PycharmProjects\autotask\AutoTaskVenv\lib\site-packages\django\forms\forms.py"
>  
> in _clean_fields
>   402. value = getattr(self, 'clean_%s' % name)()
>
> File "C:\Users\Admin\PycharmProjects\autotask\autotask\dashboard\forms.py" 
> in clean_job
>   46. job_db = Job.objects.get(job_name=job)
>
> File 
> "C:\Users\Admin\PycharmProjects\autotask\AutoTaskVenv\lib\site-packages\django\db\models\manager.py"
>  
> in manager_method
>   82. return getattr(self.get_queryset(), name)(*args, 
> **kwargs)
>
> File 
> "C:\Users\Admin\PycharmProjects\autotask\AutoTaskVenv\lib\site-packages\django\db\models\query.py"
>  
> in get
>   408. self.model._meta.object_name
>
> Exception Type: DoesNotExist at /dashboard/add_job/
> Exception Value: Job matching query does not exist.
>
> but when i use the query on cmd prompt then it works fine.
> How to fix this? plz help
>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/bbb58f0a-3b59-493f-9c64-8aad911b78fd%40googlegroups.com.


Django after migration UndefinedColumn error in production

2019-10-22 Thread red
Hi everyone,


I have a website in production. I have an app, with a model. It
contained a markdown_file attribute:

|markdown_file=models.FileField(upload_to='/media/')|

But since the number of file is limited, I decided to make it a
markdown_filename attribute with a choices selection box:

|markdown_filename=models.CharField(max_length=30,null=True,blank=True,choices=MENU_MARKDOWN_FILE_CHOICES)|

Therefore, I modified this model and made migrations locally. I pushed
the code in production and run:

|python manage.py migrate|

After I checked with showmigrations and sqlmigrate, that the
modification I made were there. Then, I checked in the database, that
the fields were correctly modified. But, I still get this error, when
trying to access the website:

|ERROR:django.request:InternalServerError:/Traceback(most recent call
last):File"/srv/data/web/vhosts/default/local/lib/python3.7/site-packages/django/db/backends/utils.py",line
84,in_execute
returnself.cursor.execute(sql,params)psycopg2.errors.UndefinedColumn:column
showcase_subpage.markdown_file does notexist LINE 1:...bpage"."slug",
"showcase_subpage"."html_content", "showcase_...^Theabove exception was
the direct cause of the following exception:Traceback(most recent call
last):File"/srv/data/web/vhosts/default/local/lib/python3.7/site-packages/django/core/handlers/exception.py",line
34,ininner response
=get_response(request)File"/srv/data/web/vhosts/default/local/lib/python3.7/site-packages/django/core/handlers/base.py",line
115,in_get_response response
=self.process_exception_by_middleware(e,request)File"/srv/data/web/vhosts/default/local/lib/python3.7/site-packages/django/core/handlers/base.py",line
113,in_get_response response
=wrapped_callback(request,*callback_args,**callback_kwargs)File"./showcase/views.py",line
10,inhome
returnrender(request,'showcase/home.html',context)File"/srv/data/web/vhosts/default/local/lib/python3.7/site-packages/django/shortcuts.py",line
36,inrender content
=loader.render_to_string(template_name,context,request,using=using)File"/srv/data/web/vhosts/default/local/lib/python3.7/site-packages/django/template/loader.py",line
62,inrender_to_string
returntemplate.render(context,request)File"/srv/data/web/vhosts/default/local/lib/python3.7/site-packages/django/template/backends/django.py",line
61,inrender
returnself.template.render(context)File"/srv/data/web/vhosts/default/local/lib/python3.7/site-packages/django/template/base.py",line
171,inrender
returnself._render(context)File"/srv/data/web/vhosts/default/local/lib/python3.7/site-packages/django/template/base.py",line
163,in_render
returnself.nodelist.render(context)File"/srv/data/web/vhosts/default/local/lib/python3.7/site-packages/django/template/base.py",line
937,inrender bit
=node.render_annotated(context)File"/srv/data/web/vhosts/default/local/lib/python3.7/site-packages/django/template/base.py",line
904,inrender_annotated
returnself.render(context)File"/srv/data/web/vhosts/default/local/lib/python3.7/site-packages/django/template/loader_tags.py",line
150,inrender
returncompiled_parent._render(context)File"/srv/data/web/vhosts/default/local/lib/python3.7/site-packages/django/template/base.py",line
163,in_render
returnself.nodelist.render(context)File"/srv/data/web/vhosts/default/local/lib/python3.7/site-packages/django/template/base.py",line
937,inrender bit
=node.render_annotated(context)File"/srv/data/web/vhosts/default/local/lib/python3.7/site-packages/django/template/base.py",line
904,inrender_annotated
returnself.render(context)File"/srv/data/web/vhosts/default/local/lib/python3.7/site-packages/django/template/defaulttags.py",line
166,inrender len_values
=len(values)File"/srv/data/web/vhosts/default/local/lib/python3.7/site-packages/django/db/models/query.py",line
256,in__len__
self._fetch_all()File"/srv/data/web/vhosts/default/local/lib/python3.7/site-packages/django/db/models/query.py",line
1242,in_fetch_all self._result_cache
=list(self._iterable_class(self))File"/srv/data/web/vhosts/default/local/lib/python3.7/site-packages/django/db/models/query.py",line
55,in__iter__ results
=compiler.execute_sql(chunked_fetch=self.chunked_fetch,chunk_size=self.chunk_size)File"/srv/data/web/vhosts/default/local/lib/python3.7/site-packages/django/db/models/sql/compiler.py",line
1100,inexecute_sql
cursor.execute(sql,params)File"/srv/data/web/vhosts/default/local/lib/python3.7/site-packages/django/db/backends/utils.py",line
67,inexecute
returnself._execute_with_wrappers(sql,params,many=False,executor=self._execute)File"/srv/data/web/vhosts/default/local/lib/python3.7/site-packages/django/db/backends/utils.py",line
76,in_execute_with_wrappers
returnexecutor(sql,params,many,context)File"/srv/data/web/vhosts/default/local/lib/python3.7/site-packages/django/db/backends/utils.py",line
84,in_execute
returnself.cursor.execute(sql,params)File"/srv/data/web/vhosts/default/local/lib/python3.7/site-packages/django/db/utils.py",line
89,in__exit__ 

Admin site error reporting

2019-10-22 Thread Dieter Gyselinck
When a change form is accessed in the admin site and an error occurs we 
receive an error screen if debug equals True.  If I  run into the same 
error on production, where debug equals False, I don't receive an error 
email.  The error handling is probably configured correctly as I do get 
error emails when the error occurs outside of the admin pages.  I have the 
impression that there is an issue with the error reporting in the admin.  
Does anybody know what is happening and is there a possible solution?  

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/95a5d69b-9158-4a90-93b1-60c9f99c2f29%40googlegroups.com.


Re: Getting ```AttributeError: 'str' object has no attribute 'state_forwards'``` when running a migrations, Down there is the migrations file. please help

2019-10-22 Thread fils-aime walnes andre
Merci freo

Le lundi 21 octobre 2019, adonis simo  a écrit :

>
> # Generated by Django 2.2.3 on 2019-10-21 22:00
>
>
>
> from django.db import migrations, models
>
> import django.db.models.deletion
>
> import django_extensions.db.fields
>
>
>
>
>
> class Migration(migrations.Migration):
>
>
>
> dependencies = [
>
> ('restaurant_app', '0002_auto_20191017_1650'),
>
> ('hotel', '0001_initial'),
>
> ]
>
>
>
> operations = [
>
>
>
> migrations.CreateModel(
>
> name='Action',
>
> fields=[
>
> ('id', models.AutoField(auto_created=True, primary_key=
> True, serialize=False, verbose_name='ID')),
>
> ('created', django_extensions.db.fields.Cr
> eationDateTimeField(auto_now_add=True, verbose_name='created')),
>
> ('modified', django_extensions.db.fields.Mo
> dificationDateTimeField(auto_now=True, verbose_name='modified')),
>
> ('name', models.CharField(max_length=100)),
>
> ('deleted', models.BooleanField(default=False)),
>
> ],
>
> options={
>
> 'ordering': ('-modified', '-created'),
>
> 'get_latest_by': 'modified',
>
> 'abstract': False,
>
> },
>
> ),
>
> ,
>
> migrations.CreateModel(
>
> name='TypeDeService',
>
> fields=[
>
> ('id', models.AutoField(auto_created=True, primary_key=
> True, serialize=False, verbose_name='ID')),
>
> ('created', django_extensions.db.fields.Cr
> eationDateTimeField(auto_now_add=True, verbose_name='created')),
>
> ('modified', django_extensions.db.fields.Mo
> dificationDateTimeField(auto_now=True, verbose_name='modified')),
>
> ('nomservice', models.CharField(default='Tout les
> services', max_length=50, verbose_name='Nom de service')),
>
> ('sigle', models.CharField(default='TS', max_length=50,
> verbose_name='Sigle')),
>
> ('deleted', models.BooleanField(default=False,
> verbose_name='produit effacee')),
>
> ],
>
> options={
>
> 'verbose_name': 'Type de service',
>
> },
>
> ),
>
> migrations.RemoveField(
>
> model_name='payementhotel',
>
> name='mode_payement_hotel',
>
> ),
>
> migrations.RemoveField(
>
> model_name='payementhotel',
>
> name='montant_paye',
>
> ),
>
> migrations.RemoveField(
>
> model_name='payementhotel',
>
> name='montant_restant',
>
> ),
>
> migrations.RemoveField(
>
> model_name='payementservice',
>
> name='mode_payement',
>
> ),
>
> migrations.RemoveField(
>
> model_name='payementservice',
>
> name='montant_paye',
>
> ),
>
> migrations.RemoveField(
>
> model_name='payementservice',
>
> name='montant_restant',
>
> ),
>
> migrations.RemoveField(
>
> model_name='taches',
>
> name='status',
>
> ),
>
> migrations.AddField(
>
> model_name='agent',
>
> name='deleted',
>
> field=models.BooleanField(default=False),
>
> ),
>
> migrations.AddField(
>
> model_name='agent',
>
> name='role',
>
> field=models.CharField(blank=True, max_length=100, null=True,
> verbose_name='Role'),
>
> ),
>
> migrations.AddField(
>
> model_name='etages',
>
> name='deleted',
>
> field=models.BooleanField(default=False, verbose_name='produit
> effacee'),
>
> ),
>
> migrations.AddField(
>
> model_name='factservice',
>
> name='montant_paye',
>
> field=models.IntegerField(default=0, verbose_name='Montant
> payé'),
>
> ),
>
> migrations.AddField(
>
> model_name='factservice',
>
> name='montant_restant',
>
> field=models.IntegerField(default=0, verbose_name='Montant
> restant'),
>
> ),
>
> migrations.AddField(
>
> model_name='facturationreservation',
>
> name='montant_paye',
>
> field=models.IntegerField(default=0, verbose_name='Montant
> payé'),
>
> ),
>
> migrations.AddField(
>
> model_name='facturationreservation',
>
> name='montant_restant',
>
> field=models.IntegerField(default=0, verbose_name='Montant
> restant'),
>
> ),
>
> migrations.AddField(
>
> model_name='reservation',
>
> name='arrival_hour',
>
> field=models.TimeField(blank=True, null=True, verbose_name='Heure
> arrivee'),
>
> ),
>
> migrations.AddField(
>
> model_name='reservation',
>
> 

Re: Can anyone sove my issue please!

2019-10-22 Thread Parvez Khan Pathan
okay!

But I'm new to django and learn frim udemy. That's why!.

I will remember your advise.

Thanks!

On Tue, 22 Oct 2019, 5:44 pm laya Mahmoudi  Ok good,
> But I say another time. You don't need to write model for user. Your code
> needs to be better.
>
> در تاریخ سه‌شنبه ۲۲ اکتبر ۲۰۱۹،‏ ۱۵:۴۱ Parvez Khan Pathan <
> iamparvezkha...@gmail.com> نوشت:
>
>> thanks for response sir...
>>
>> Problem solved... It was silly mistake...
>> I put extra space in '__all__'
>>
>> See which i post image its clearly seen extra space over there in meta
>> class...
>>
>> On Tue, 22 Oct 2019, 5:31 pm laya Mahmoudi > wrote:
>>
>>> At first, you don't need to write a model for user whith this fields.
>>> Because django user has all this fields. After that please write some
>>> fields for meta like first_name, email.password etc
>>>
>>> در تاریخ سه‌شنبه ۲۲ اکتبر ۲۰۱۹،‏ ۱۵:۲۱ Parvez Khan Pathan <
>>> iamparvezkha...@gmail.com> نوشت:
>>>
 pls open this link :
 https://stackoverflow.com/questions/58502732/exception-in-thred-django-main-thread

 On Tue, 22 Oct 2019, 5:09 pm laya Mahmoudi >>> wrote:

> Now what is the error??
>
> در تاریخ سه‌شنبه ۲۲ اکتبر ۲۰۱۹،‏ ۱۴:۴۵ Parvez Khan Pathan <
> iamparvezkha...@gmail.com> نوشت:
>
>> [image: pyissue1.png]
>> Sir Already Added! still got error!!!
>>
>> On Tuesday, 22 October 2019 16:38:34 UTC+5:30, laya Mahmoudi wrote:
>>>
>>> Hi,
>>> In your form.py , put fields:"__all__"
>>>
>>> در تاریخ سه‌شنبه ۲۲ اکتبر ۲۰۱۹،‏ ۱۴:۳۳ Parvez Khan Pathan <
>>> iamparv...@gmail.com> نوشت:
>>>

 https://stackoverflow.com/questions/58502732/exception-in-thred-django-main-thread

 --
 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...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/django-users/3152b194-5b13-4abb-a38a-1f1708f79bd3%40googlegroups.com
 
 .

>>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/979e453a-76a3-4ef0-a179-6131e7580611%40googlegroups.com
>> 
>> .
>>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CABL_bk3Nrj6qba-1iD5gwAtwE9ggA%3DNsdvSDWSHeBqhyk9LvZQ%40mail.gmail.com
> 
> .
>
 --
 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 view this discussion on the web visit
 https://groups.google.com/d/msgid/django-users/CADaFQ_JNRQzyLwiEsxGaxPK2%2B3%2BOMvzf9oSOBfSkG3Je7Eu_Mw%40mail.gmail.com
 
 .

>>> --
>>> 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 view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CABL_bk0J-%2B9ejfHPkwGDJ%2B_8QkKchWrX8-xQ_oOfN_KpRxsVhQ%40mail.gmail.com
>>> 
>>> .
>>>
>> --
>> 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 view this discussion on the web visit
>> 

Re: Can anyone sove my issue please!

2019-10-22 Thread laya Mahmoudi
Ok good,
But I say another time. You don't need to write model for user. Your code
needs to be better.

در تاریخ سه‌شنبه ۲۲ اکتبر ۲۰۱۹،‏ ۱۵:۴۱ Parvez Khan Pathan <
iamparvezkha...@gmail.com> نوشت:

> thanks for response sir...
>
> Problem solved... It was silly mistake...
> I put extra space in '__all__'
>
> See which i post image its clearly seen extra space over there in meta
> class...
>
> On Tue, 22 Oct 2019, 5:31 pm laya Mahmoudi  wrote:
>
>> At first, you don't need to write a model for user whith this fields.
>> Because django user has all this fields. After that please write some
>> fields for meta like first_name, email.password etc
>>
>> در تاریخ سه‌شنبه ۲۲ اکتبر ۲۰۱۹،‏ ۱۵:۲۱ Parvez Khan Pathan <
>> iamparvezkha...@gmail.com> نوشت:
>>
>>> pls open this link :
>>> https://stackoverflow.com/questions/58502732/exception-in-thred-django-main-thread
>>>
>>> On Tue, 22 Oct 2019, 5:09 pm laya Mahmoudi >> wrote:
>>>
 Now what is the error??

 در تاریخ سه‌شنبه ۲۲ اکتبر ۲۰۱۹،‏ ۱۴:۴۵ Parvez Khan Pathan <
 iamparvezkha...@gmail.com> نوشت:

> [image: pyissue1.png]
> Sir Already Added! still got error!!!
>
> On Tuesday, 22 October 2019 16:38:34 UTC+5:30, laya Mahmoudi wrote:
>>
>> Hi,
>> In your form.py , put fields:"__all__"
>>
>> در تاریخ سه‌شنبه ۲۲ اکتبر ۲۰۱۹،‏ ۱۴:۳۳ Parvez Khan Pathan <
>> iamparv...@gmail.com> نوشت:
>>
>>>
>>> https://stackoverflow.com/questions/58502732/exception-in-thred-django-main-thread
>>>
>>> --
>>> 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...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/3152b194-5b13-4abb-a38a-1f1708f79bd3%40googlegroups.com
>>> 
>>> .
>>>
>> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/979e453a-76a3-4ef0-a179-6131e7580611%40googlegroups.com
> 
> .
>
 --
 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 view this discussion on the web visit
 https://groups.google.com/d/msgid/django-users/CABL_bk3Nrj6qba-1iD5gwAtwE9ggA%3DNsdvSDWSHeBqhyk9LvZQ%40mail.gmail.com
 
 .

>>> --
>>> 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 view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CADaFQ_JNRQzyLwiEsxGaxPK2%2B3%2BOMvzf9oSOBfSkG3Je7Eu_Mw%40mail.gmail.com
>>> 
>>> .
>>>
>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CABL_bk0J-%2B9ejfHPkwGDJ%2B_8QkKchWrX8-xQ_oOfN_KpRxsVhQ%40mail.gmail.com
>> 
>> .
>>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CADaFQ_%2BF_G2TgU3owk0N1QQOB7AHV-Lx4gYz5nXM%2B%3DfA0jo3fw%40mail.gmail.com
> 
> .
>

-- 
You received this message because 

Re: Can anyone sove my issue please!

2019-10-22 Thread Parvez Khan Pathan
thanks for response sir...

Problem solved... It was silly mistake...
I put extra space in '__all__'

See which i post image its clearly seen extra space over there in meta
class...

On Tue, 22 Oct 2019, 5:31 pm laya Mahmoudi  At first, you don't need to write a model for user whith this fields.
> Because django user has all this fields. After that please write some
> fields for meta like first_name, email.password etc
>
> در تاریخ سه‌شنبه ۲۲ اکتبر ۲۰۱۹،‏ ۱۵:۲۱ Parvez Khan Pathan <
> iamparvezkha...@gmail.com> نوشت:
>
>> pls open this link :
>> https://stackoverflow.com/questions/58502732/exception-in-thred-django-main-thread
>>
>> On Tue, 22 Oct 2019, 5:09 pm laya Mahmoudi > wrote:
>>
>>> Now what is the error??
>>>
>>> در تاریخ سه‌شنبه ۲۲ اکتبر ۲۰۱۹،‏ ۱۴:۴۵ Parvez Khan Pathan <
>>> iamparvezkha...@gmail.com> نوشت:
>>>
 [image: pyissue1.png]
 Sir Already Added! still got error!!!

 On Tuesday, 22 October 2019 16:38:34 UTC+5:30, laya Mahmoudi wrote:
>
> Hi,
> In your form.py , put fields:"__all__"
>
> در تاریخ سه‌شنبه ۲۲ اکتبر ۲۰۱۹،‏ ۱۴:۳۳ Parvez Khan Pathan <
> iamparv...@gmail.com> نوشت:
>
>>
>> https://stackoverflow.com/questions/58502732/exception-in-thred-django-main-thread
>>
>> --
>> 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...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/3152b194-5b13-4abb-a38a-1f1708f79bd3%40googlegroups.com
>> 
>> .
>>
> --
 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 view this discussion on the web visit
 https://groups.google.com/d/msgid/django-users/979e453a-76a3-4ef0-a179-6131e7580611%40googlegroups.com
 
 .

>>> --
>>> 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 view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CABL_bk3Nrj6qba-1iD5gwAtwE9ggA%3DNsdvSDWSHeBqhyk9LvZQ%40mail.gmail.com
>>> 
>>> .
>>>
>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CADaFQ_JNRQzyLwiEsxGaxPK2%2B3%2BOMvzf9oSOBfSkG3Je7Eu_Mw%40mail.gmail.com
>> 
>> .
>>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CABL_bk0J-%2B9ejfHPkwGDJ%2B_8QkKchWrX8-xQ_oOfN_KpRxsVhQ%40mail.gmail.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CADaFQ_%2BF_G2TgU3owk0N1QQOB7AHV-Lx4gYz5nXM%2B%3DfA0jo3fw%40mail.gmail.com.


Re: Can anyone sove my issue please!

2019-10-22 Thread Parvez Khan Pathan
*Problem Solved : that was silly mistyake*

i just put extra space in '__all__'
its solved!!!

thanks to you alll for response and help
On Tuesday, 22 October 2019 16:44:37 UTC+5:30, Parvez Khan Pathan wrote:
>
> [image: pyissue1.png]
> Sir Already Added! still got error!!!
>
> On Tuesday, 22 October 2019 16:38:34 UTC+5:30, laya Mahmoudi wrote:
>>
>> Hi,
>> In your form.py , put fields:"__all__"
>>
>> در تاریخ سه‌شنبه ۲۲ اکتبر ۲۰۱۹،‏ ۱۴:۳۳ Parvez Khan Pathan <
>> iamparv...@gmail.com> نوشت:
>>
>>>
>>> https://stackoverflow.com/questions/58502732/exception-in-thred-django-main-thread
>>>
>>> -- 
>>> 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...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/django-users/3152b194-5b13-4abb-a38a-1f1708f79bd3%40googlegroups.com
>>>  
>>> 
>>> .
>>>
>>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/7b2dd9ec-1c91-4d99-bef8-34dc37e9ce6e%40googlegroups.com.


Re: Can anyone sove my issue please!

2019-10-22 Thread laya Mahmoudi
At first, you don't need to write a model for user whith this fields.
Because django user has all this fields. After that please write some
fields for meta like first_name, email.password etc

در تاریخ سه‌شنبه ۲۲ اکتبر ۲۰۱۹،‏ ۱۵:۲۱ Parvez Khan Pathan <
iamparvezkha...@gmail.com> نوشت:

> pls open this link :
> https://stackoverflow.com/questions/58502732/exception-in-thred-django-main-thread
>
> On Tue, 22 Oct 2019, 5:09 pm laya Mahmoudi  wrote:
>
>> Now what is the error??
>>
>> در تاریخ سه‌شنبه ۲۲ اکتبر ۲۰۱۹،‏ ۱۴:۴۵ Parvez Khan Pathan <
>> iamparvezkha...@gmail.com> نوشت:
>>
>>> [image: pyissue1.png]
>>> Sir Already Added! still got error!!!
>>>
>>> On Tuesday, 22 October 2019 16:38:34 UTC+5:30, laya Mahmoudi wrote:

 Hi,
 In your form.py , put fields:"__all__"

 در تاریخ سه‌شنبه ۲۲ اکتبر ۲۰۱۹،‏ ۱۴:۳۳ Parvez Khan Pathan <
 iamparv...@gmail.com> نوشت:

>
> https://stackoverflow.com/questions/58502732/exception-in-thred-django-main-thread
>
> --
> 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...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/3152b194-5b13-4abb-a38a-1f1708f79bd3%40googlegroups.com
> 
> .
>
 --
>>> 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 view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/979e453a-76a3-4ef0-a179-6131e7580611%40googlegroups.com
>>> 
>>> .
>>>
>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CABL_bk3Nrj6qba-1iD5gwAtwE9ggA%3DNsdvSDWSHeBqhyk9LvZQ%40mail.gmail.com
>> 
>> .
>>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CADaFQ_JNRQzyLwiEsxGaxPK2%2B3%2BOMvzf9oSOBfSkG3Je7Eu_Mw%40mail.gmail.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CABL_bk0J-%2B9ejfHPkwGDJ%2B_8QkKchWrX8-xQ_oOfN_KpRxsVhQ%40mail.gmail.com.


Re: Can anyone sove my issue please!

2019-10-22 Thread Parvez Khan Pathan
pls open this link :
https://stackoverflow.com/questions/58502732/exception-in-thred-django-main-thread

On Tue, 22 Oct 2019, 5:09 pm laya Mahmoudi  Now what is the error??
>
> در تاریخ سه‌شنبه ۲۲ اکتبر ۲۰۱۹،‏ ۱۴:۴۵ Parvez Khan Pathan <
> iamparvezkha...@gmail.com> نوشت:
>
>> [image: pyissue1.png]
>> Sir Already Added! still got error!!!
>>
>> On Tuesday, 22 October 2019 16:38:34 UTC+5:30, laya Mahmoudi wrote:
>>>
>>> Hi,
>>> In your form.py , put fields:"__all__"
>>>
>>> در تاریخ سه‌شنبه ۲۲ اکتبر ۲۰۱۹،‏ ۱۴:۳۳ Parvez Khan Pathan <
>>> iamparv...@gmail.com> نوشت:
>>>

 https://stackoverflow.com/questions/58502732/exception-in-thred-django-main-thread

 --
 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...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/django-users/3152b194-5b13-4abb-a38a-1f1708f79bd3%40googlegroups.com
 
 .

>>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/979e453a-76a3-4ef0-a179-6131e7580611%40googlegroups.com
>> 
>> .
>>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CABL_bk3Nrj6qba-1iD5gwAtwE9ggA%3DNsdvSDWSHeBqhyk9LvZQ%40mail.gmail.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CADaFQ_JNRQzyLwiEsxGaxPK2%2B3%2BOMvzf9oSOBfSkG3Je7Eu_Mw%40mail.gmail.com.


Re: Can anyone sove my issue please!

2019-10-22 Thread laya Mahmoudi
Now what is the error??

در تاریخ سه‌شنبه ۲۲ اکتبر ۲۰۱۹،‏ ۱۴:۴۵ Parvez Khan Pathan <
iamparvezkha...@gmail.com> نوشت:

> [image: pyissue1.png]
> Sir Already Added! still got error!!!
>
> On Tuesday, 22 October 2019 16:38:34 UTC+5:30, laya Mahmoudi wrote:
>>
>> Hi,
>> In your form.py , put fields:"__all__"
>>
>> در تاریخ سه‌شنبه ۲۲ اکتبر ۲۰۱۹،‏ ۱۴:۳۳ Parvez Khan Pathan <
>> iamparv...@gmail.com> نوشت:
>>
>>>
>>> https://stackoverflow.com/questions/58502732/exception-in-thred-django-main-thread
>>>
>>> --
>>> 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...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/3152b194-5b13-4abb-a38a-1f1708f79bd3%40googlegroups.com
>>> 
>>> .
>>>
>> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/979e453a-76a3-4ef0-a179-6131e7580611%40googlegroups.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CABL_bk3Nrj6qba-1iD5gwAtwE9ggA%3DNsdvSDWSHeBqhyk9LvZQ%40mail.gmail.com.


Re: Can anyone sove my issue please!

2019-10-22 Thread Sundararajan Seshadri
Have a look at the stackoverflow page. Does the problem still remain?


On Tuesday, October 22, 2019 at 4:32:29 PM UTC+5:30, Parvez Khan Pathan 
wrote:
>
>
> https://stackoverflow.com/questions/58502732/exception-in-thred-django-main-thread
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/ddc3d63e-deee-473c-bece-694ddd56322c%40googlegroups.com.


Re: Can anyone sove my issue please!

2019-10-22 Thread Anirudh Jain
What is the error?

On Tue, 22 Oct 2019, 16:49 Parvez Khan Pathan, 
wrote:

> [image: pyissue2.png]
> *Even check out my views.py file*
>
> On Tuesday, 22 October 2019 16:44:37 UTC+5:30, Parvez Khan Pathan wrote:
>>
>> [image: pyissue1.png]
>> Sir Already Added! still got error!!!
>>
>> On Tuesday, 22 October 2019 16:38:34 UTC+5:30, laya Mahmoudi wrote:
>>>
>>> Hi,
>>> In your form.py , put fields:"__all__"
>>>
>>> در تاریخ سه‌شنبه ۲۲ اکتبر ۲۰۱۹،‏ ۱۴:۳۳ Parvez Khan Pathan <
>>> iamparv...@gmail.com> نوشت:
>>>

 https://stackoverflow.com/questions/58502732/exception-in-thred-django-main-thread

 --
 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...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/django-users/3152b194-5b13-4abb-a38a-1f1708f79bd3%40googlegroups.com
 
 .

>>> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/4ad394df-27b8-4e68-9bc5-86a727945f37%40googlegroups.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAC3mK7dO_v3jQp8tbkzNc6D%2BoWdTPrsWjiDmFdRVoTi5d_AkZQ%40mail.gmail.com.


Re: Can anyone sove my issue please!

2019-10-22 Thread Parvez Khan Pathan


[image: pyissue2.png]
*Even check out my views.py file*

On Tuesday, 22 October 2019 16:44:37 UTC+5:30, Parvez Khan Pathan wrote:
>
> [image: pyissue1.png]
> Sir Already Added! still got error!!!
>
> On Tuesday, 22 October 2019 16:38:34 UTC+5:30, laya Mahmoudi wrote:
>>
>> Hi,
>> In your form.py , put fields:"__all__"
>>
>> در تاریخ سه‌شنبه ۲۲ اکتبر ۲۰۱۹،‏ ۱۴:۳۳ Parvez Khan Pathan <
>> iamparv...@gmail.com> نوشت:
>>
>>>
>>> https://stackoverflow.com/questions/58502732/exception-in-thred-django-main-thread
>>>
>>> -- 
>>> 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...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/django-users/3152b194-5b13-4abb-a38a-1f1708f79bd3%40googlegroups.com
>>>  
>>> 
>>> .
>>>
>>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/4ad394df-27b8-4e68-9bc5-86a727945f37%40googlegroups.com.


Re: Can anyone sove my issue please!

2019-10-22 Thread Parvez Khan Pathan


[image: pyissue1.png]
Sir Already Added! still got error!!!

On Tuesday, 22 October 2019 16:38:34 UTC+5:30, laya Mahmoudi wrote:
>
> Hi,
> In your form.py , put fields:"__all__"
>
> در تاریخ سه‌شنبه ۲۲ اکتبر ۲۰۱۹،‏ ۱۴:۳۳ Parvez Khan Pathan <
> iamparv...@gmail.com > نوشت:
>
>>
>> https://stackoverflow.com/questions/58502732/exception-in-thred-django-main-thread
>>
>> -- 
>> 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...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/3152b194-5b13-4abb-a38a-1f1708f79bd3%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/979e453a-76a3-4ef0-a179-6131e7580611%40googlegroups.com.


Re: Can anyone sove my issue please!

2019-10-22 Thread laya Mahmoudi
Hi,
In your form.py , put fields:"__all__"

در تاریخ سه‌شنبه ۲۲ اکتبر ۲۰۱۹،‏ ۱۴:۳۳ Parvez Khan Pathan <
iamparvezkha...@gmail.com> نوشت:

>
> https://stackoverflow.com/questions/58502732/exception-in-thred-django-main-thread
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/3152b194-5b13-4abb-a38a-1f1708f79bd3%40googlegroups.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CABL_bk1tBmy%3DH12tcD_h%3Dr_cT_mczpD%3DT5Gn5xBcpawtYoOU5w%40mail.gmail.com.


Re: Can anyone sove my issue please!

2019-10-22 Thread Parvez Khan Pathan
Creating forms from models issue!


On Tuesday, 22 October 2019 16:32:29 UTC+5:30, Parvez Khan Pathan wrote:
>
>
> https://stackoverflow.com/questions/58502732/exception-in-thred-django-main-thread
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f8c2411d-73e2-4660-b5ea-6bae87b5a9cb%40googlegroups.com.


Can anyone sove my issue please!

2019-10-22 Thread Parvez Khan Pathan
https://stackoverflow.com/questions/58502732/exception-in-thred-django-main-thread

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/3152b194-5b13-4abb-a38a-1f1708f79bd3%40googlegroups.com.


Re: unable to validate and save modelform data into mysql database...

2019-10-22 Thread Gourab Mahapatra
and now this error shows, something related to the job instance, i don't 
know but if you want then i can share with you my models.py file code and 
views.py file code
please help me in this regard,
I am stuck here since 2 weeks.
I have attached the screenshot of the error please find attached ..

Thanks & Regards,
Gourab Mahapatra

On Monday, 21 October 2019 20:38:13 UTC+5:30, lemme smash wrote:
>
> it's quite expected behavior. if you want to check if job exists, you 
> better use Job.objects.filter(name=job_name).exists()
>
> On Monday, October 21, 2019 at 3:49:01 PM UTC+3, Gourab Mahapatra wrote:
>>
>> Traceback:
>>
>> File 
>> "C:\Users\Admin\PycharmProjects\autotask\AutoTaskVenv\lib\site-packages\django\core\handlers\exception.py"
>>  
>> in inner
>>   34. response = get_response(request)
>>
>> File 
>> "C:\Users\Admin\PycharmProjects\autotask\AutoTaskVenv\lib\site-packages\django\core\handlers\base.py"
>>  
>> in _get_response
>>   115. response = self.process_exception_by_middleware(e, 
>> request)
>>
>> File 
>> "C:\Users\Admin\PycharmProjects\autotask\AutoTaskVenv\lib\site-packages\django\core\handlers\base.py"
>>  
>> in _get_response
>>   113. response = wrapped_callback(request, 
>> *callback_args, **callback_kwargs)
>>
>> File 
>> "C:\Users\Admin\PycharmProjects\autotask\AutoTaskVenv\lib\site-packages\django\contrib\auth\decorators.py"
>>  
>> in _wrapped_view
>>   21. return view_func(request, *args, **kwargs)
>>
>> File 
>> "C:\Users\Admin\PycharmProjects\autotask\autotask\dashboard\views.py" in 
>> add_job
>>   41. if form.is_valid():
>>
>> File 
>> "C:\Users\Admin\PycharmProjects\autotask\AutoTaskVenv\lib\site-packages\django\forms\forms.py"
>>  
>> in is_valid
>>   185. return self.is_bound and not self.errors
>>
>> File 
>> "C:\Users\Admin\PycharmProjects\autotask\AutoTaskVenv\lib\site-packages\django\forms\forms.py"
>>  
>> in errors
>>   180. self.full_clean()
>>
>> File 
>> "C:\Users\Admin\PycharmProjects\autotask\AutoTaskVenv\lib\site-packages\django\forms\forms.py"
>>  
>> in full_clean
>>   381. self._clean_fields()
>>
>> File 
>> "C:\Users\Admin\PycharmProjects\autotask\AutoTaskVenv\lib\site-packages\django\forms\forms.py"
>>  
>> in _clean_fields
>>   402. value = getattr(self, 'clean_%s' % name)()
>>
>> File 
>> "C:\Users\Admin\PycharmProjects\autotask\autotask\dashboard\forms.py" in 
>> clean_job
>>   46. job_db = Job.objects.get(job_name=job)
>>
>> File 
>> "C:\Users\Admin\PycharmProjects\autotask\AutoTaskVenv\lib\site-packages\django\db\models\manager.py"
>>  
>> in manager_method
>>   82. return getattr(self.get_queryset(), name)(*args, 
>> **kwargs)
>>
>> File 
>> "C:\Users\Admin\PycharmProjects\autotask\AutoTaskVenv\lib\site-packages\django\db\models\query.py"
>>  
>> in get
>>   408. self.model._meta.object_name
>>
>> Exception Type: DoesNotExist at /dashboard/add_job/
>> Exception Value: Job matching query does not exist.
>>
>> but when i use the query on cmd prompt then it works fine.
>> How to fix this? plz help
>>
>>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/2ac68142-870a-4c5a-8a26-0e20c30a2219%40googlegroups.com.


Re: unable to validate and save modelform data into mysql database...

2019-10-22 Thread Gourab Mahapatra


On Tuesday, 22 October 2019 11:33:23 UTC+5:30, Gourab Mahapatra wrote:
>
> and now this error shows, something related to the job instance, i don't 
> know but if you want then i can share with you my models.py file code and 
> views.py file code
> please help me in this regard,
> I am stuck here since 2 weeks.
> I have attached the screenshot of the error please find attached ..
>
> Thanks & Regards,
> Gourab Mahapatra
>
> On Monday, 21 October 2019 20:38:13 UTC+5:30, lemme smash wrote:
>>
>> it's quite expected behavior. if you want to check if job exists, you 
>> better use Job.objects.filter(name=job_name).exists()
>>
>> On Monday, October 21, 2019 at 3:49:01 PM UTC+3, Gourab Mahapatra wrote:
>>>
>>> Traceback:
>>>
>>> File 
>>> "C:\Users\Admin\PycharmProjects\autotask\AutoTaskVenv\lib\site-packages\django\core\handlers\exception.py"
>>>  
>>> in inner
>>>   34. response = get_response(request)
>>>
>>> File 
>>> "C:\Users\Admin\PycharmProjects\autotask\AutoTaskVenv\lib\site-packages\django\core\handlers\base.py"
>>>  
>>> in _get_response
>>>   115. response = 
>>> self.process_exception_by_middleware(e, request)
>>>
>>> File 
>>> "C:\Users\Admin\PycharmProjects\autotask\AutoTaskVenv\lib\site-packages\django\core\handlers\base.py"
>>>  
>>> in _get_response
>>>   113. response = wrapped_callback(request, 
>>> *callback_args, **callback_kwargs)
>>>
>>> File 
>>> "C:\Users\Admin\PycharmProjects\autotask\AutoTaskVenv\lib\site-packages\django\contrib\auth\decorators.py"
>>>  
>>> in _wrapped_view
>>>   21. return view_func(request, *args, **kwargs)
>>>
>>> File 
>>> "C:\Users\Admin\PycharmProjects\autotask\autotask\dashboard\views.py" in 
>>> add_job
>>>   41. if form.is_valid():
>>>
>>> File 
>>> "C:\Users\Admin\PycharmProjects\autotask\AutoTaskVenv\lib\site-packages\django\forms\forms.py"
>>>  
>>> in is_valid
>>>   185. return self.is_bound and not self.errors
>>>
>>> File 
>>> "C:\Users\Admin\PycharmProjects\autotask\AutoTaskVenv\lib\site-packages\django\forms\forms.py"
>>>  
>>> in errors
>>>   180. self.full_clean()
>>>
>>> File 
>>> "C:\Users\Admin\PycharmProjects\autotask\AutoTaskVenv\lib\site-packages\django\forms\forms.py"
>>>  
>>> in full_clean
>>>   381. self._clean_fields()
>>>
>>> File 
>>> "C:\Users\Admin\PycharmProjects\autotask\AutoTaskVenv\lib\site-packages\django\forms\forms.py"
>>>  
>>> in _clean_fields
>>>   402. value = getattr(self, 'clean_%s' % name)()
>>>
>>> File 
>>> "C:\Users\Admin\PycharmProjects\autotask\autotask\dashboard\forms.py" in 
>>> clean_job
>>>   46. job_db = Job.objects.get(job_name=job)
>>>
>>> File 
>>> "C:\Users\Admin\PycharmProjects\autotask\AutoTaskVenv\lib\site-packages\django\db\models\manager.py"
>>>  
>>> in manager_method
>>>   82. return getattr(self.get_queryset(), name)(*args, 
>>> **kwargs)
>>>
>>> File 
>>> "C:\Users\Admin\PycharmProjects\autotask\AutoTaskVenv\lib\site-packages\django\db\models\query.py"
>>>  
>>> in get
>>>   408. self.model._meta.object_name
>>>
>>> Exception Type: DoesNotExist at /dashboard/add_job/
>>> Exception Value: Job matching query does not exist.
>>>
>>> but when i use the query on cmd prompt then it works fine.
>>> How to fix this? plz help
>>>
>>>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/dba59405-a291-436e-a6fc-7234a5fb157a%40googlegroups.com.