Re: cinema booking

2020-10-08 Thread Mohammad Ahshan Danish
you need to have available seat in database

On Thu, Oct 8, 2020 at 6:29 PM feysel abdu  wrote:

> I Was building a cinema  booking app and I am using Django , I want to
> know available seats and booked seats
>
> --
> 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/e21cefa9-8127-4ddd-ac74-3400b36eef17n%40googlegroups.com
> 
> .
>


-- 
Thanks & Regards

Regards,
Danish

-- 
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/CAPQdaF2zLvSy2_rOwz1NhMBGj9PCNEgxiqHEds%2B3_UkHSXykiA%40mail.gmail.com.


Re: Password see

2020-10-08 Thread Mohammad Ahshan Danish
you can create new superuser.

I think there is way to reset superuer password.

you can't retrieve old passwords. it gets stored in using Hash algo and not
possible to decode.


On Thu, Oct 8, 2020 at 5:11 PM kkwaq...@gmail.com 
wrote:

> *How to se password admin *,
> *Django in store password encrypted format* ,
> *How to retrieve password and decrypted password* .
>
> --
> 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/954b7aa9-ab05-48d1-8e79-e9f7ca35407an%40googlegroups.com
> 
> .
>


-- 
Thanks & Regards

Regards,
Danish

-- 
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/CAPQdaF1utMvtgD5w%2BMa1Ygt7hS92KdRjmj4dwseD6syctP95WA%40mail.gmail.com.


Re: JavaScript

2020-10-02 Thread Mohammad Ahshan Danish
Okay,
Use Text Change event and display error accordingly.
Text Change event.

On Fri, Oct 2, 2020 at 9:02 PM Eugene TUYIZERE 
wrote:

> Dear All,
>
> I did form validation where I can not save empty value. And When I try a
> message displays under the text field. What I want is, in case I type at
> least a single character, the error message to disappear and when I delete
> again, the error to be show, etc
>
> If someone can share with me the example codes, I can appreciate.
>
> Thank 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/aa2fc4e3-d8ca-474e-9fb6-616bc28e0608n%40googlegroups.com
> 
> .
>


-- 
Thanks & Regards

Regards,
Danish

-- 
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/CAPQdaF22PHpv_UawVRqLPRvGJ%3D3LLYutMhRaHQeRkfBZ6dZ9SA%40mail.gmail.com.


Re: Django Due control in Django

2020-10-01 Thread Mohammad Ahshan Danish
Easy,
while creating user make staff=false.

Second user will go using the admin panel and can update isStaff= True.

now the first user would be able to access the django app.

On Thu, Oct 1, 2020 at 8:46 PM Eugene TUYIZERE 
wrote:

> Dear all,
>
> I want to make an application that requires 2 person to complete the user
> creation. I mean when initiator creates  a user, for a user to login in
> application, it requires that an authorizer authorizes the user creation.
> This can also work in case a user is disable in the system. But I do not
> have an idea how to implement this in Django. If some can help I appreciate.
>
> Thank 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/0c965c18-a0b4-48b0-9518-fcf9da63af0en%40googlegroups.com
> 
> .
>


-- 
Thanks & Regards

Regards,
Danish

-- 
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/CAPQdaF2QJz6Hk0G%3DJk4RxByrOSWY4E7%3DYLv%3DjJQjocVg7zLdYA%40mail.gmail.com.


Re: I am stuck at "Installing Django on PythonAnywhere" can anyone help me ?

2020-09-21 Thread Mohammad Ahshan Danish


On Mon, Sep 21, 2020 at 7:04 PM Shahprogrammer  wrote:

> That's not the problem with installation of Django it's with your urls
>
> On Monday, 21 September, 2020 at 6:49:56 pm UTC+5:30 kashubh...@gmail.com
> wrote:
>
>> [image: Screenshot (418).png]
>>
> --
> 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/86902d30-1960-41de-b44e-61787325f2f9n%40googlegroups.com
> 
> .
>


-- 
Thanks & Regards

Regards,
Danish

-- 
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/CAPQdaF1i%2B55MfV5W-ViPNTN2BpjSqPf-_dHUrA15aosjhsijfg%40mail.gmail.com.


Re: Calculated feild in models

2020-09-19 Thread Mohammad Ahshan Danish
Create a model and add functions  if you want to go more deep use
Model-manager.

On Sun, Sep 20, 2020 at 12:27 AM coolguy 
wrote:

> Create a function at class level like this..
>
> *class xxx(models.Model):*
> quantity = models.FloatField()
> unit_price = models.FloatField()
>
>* def get_total_price(self):*
>  return self.quantity * self.unit_price
>
>
> On Saturday, September 19, 2020 at 11:15:30 AM UTC-4 eankomah wrote:
>
>> I have two fields:
>> quantity = models.FloatField()
>> unit_price = models.FloatField()
>>
>> and i want ot do someting like this
>>
>>
>> total_price = models.FloatField('unit_price' * 'quantity')
>>
>> Thanks
>>
> --
> 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/daa1a5d0-1266-49fa-a453-ceaa5f7785fcn%40googlegroups.com
> 
> .
>


-- 
Thanks & Regards

Regards,
Danish

-- 
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/CAPQdaF31VwATcG%2BgNGz9zEK84ftsJ3BD9o2CnbJi7E9%2BEH22OA%40mail.gmail.com.


Re: Change Date Formate

2020-09-15 Thread Mohammad Ahshan Danish
{{you_date_field|date:'Y-m-d'}}


On Tue, Sep 15, 2020 at 3:52 PM kkwaq...@gmail.com 
wrote:

> How to change date format in django (mmdd to ddmm)
>
> [image: p.jpg]
> [image: p1.jpg]
> how to change like this dd/mm/
>
> --
> 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/fd9f1b17-cc30-43f9-9855-c7c5f68e7800n%40googlegroups.com
> 
> .
>


-- 
Thanks & Regards

Regards,
Danish

-- 
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/CAPQdaF0sjiB3Bbyc5TW32%2BSVUfAv%2Bt36XbGJcVcorDVmXmuoUg%40mail.gmail.com.


Re: Installation errors

2020-09-12 Thread Mohammad Ahshan Danish
*trying using virtual env*
*>pipenv install*
*>pipenv shell*
*>pipenv install django*

On Sat, Sep 12, 2020 at 8:07 PM Odeyale Kehinde  wrote:

> I want to install Django on my system but getting these errors.
>
> C:\Users\odeya>pip install Django==3.1.1
> Collecting Django==3.1.1
>   Downloading
> https://files.pythonhosted.org/packages/01/a5/fb3dad18422fcd4241d18460a1fe17542bfdeadcf74e3861d1a2dfc9e459/Django-3.1.1-py3-none-any.whl
> (7.8MB)
>  |██▌ | 1.6MB 37kB/s eta 0:02:49ERROR:
> Exception:
> Traceback (most recent call last):
>   File "c:\program
> files\python38\lib\site-packages\pip\_vendor\urllib3\response.py", line
> 397, in _error_catcher
> yield
>   File "c:\program
> files\python38\lib\site-packages\pip\_vendor\urllib3\response.py", line
> 479, in read
> data = self._fp.read(amt)
>   File "c:\program
> files\python38\lib\site-packages\pip\_vendor\cachecontrol\filewrapper.py",
> line 62, in read
> data = self.__fp.read(amt)
>   File "c:\program files\python38\lib\http\client.py", line 454, in read
> n = self.readinto(b)
>   File "c:\program files\python38\lib\http\client.py", line 498, in
> readinto
> n = self.fp.readinto(b)
>   File "c:\program files\python38\lib\socket.py", line 669, in readinto
> return self._sock.recv_into(b)
>   File "c:\program files\python38\lib\ssl.py", line 1241, in recv_into
> return self.read(nbytes, buffer)
>   File "c:\program files\python38\lib\ssl.py", line 1099, in read
> return self._sslobj.read(len, buffer)
> socket.timeout: The read operation timed out
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
>   File "c:\program
> files\python38\lib\site-packages\pip\_internal\cli\base_command.py", line
> 188, in main
> status = self.run(options, args)
>   File "c:\program
> files\python38\lib\site-packages\pip\_internal\commands\install.py", line
> 345, in run
> resolver.resolve(requirement_set)
>   File "c:\program
> files\python38\lib\site-packages\pip\_internal\legacy_resolve.py", line
> 196, in resolve
> self._resolve_one(requirement_set, req)
>   File "c:\program
> files\python38\lib\site-packages\pip\_internal\legacy_resolve.py", line
> 359, in _resolve_one
> abstract_dist = self._get_abstract_dist_for(req_to_install)
>   File "c:\program
> files\python38\lib\site-packages\pip\_internal\legacy_resolve.py", line
> 305, in _get_abstract_dist_for
> abstract_dist = self.preparer.prepare_linked_requirement(
>   File "c:\program
> files\python38\lib\site-packages\pip\_internal\operations\prepare.py", line
> 195, in prepare_linked_requirement
> unpack_url(
>   File "c:\program
> files\python38\lib\site-packages\pip\_internal\download.py", line 1058, in
> unpack_url
> unpack_http_url(
>   File "c:\program
> files\python38\lib\site-packages\pip\_internal\download.py", line 920, in
> unpack_http_url
> from_path, content_type = _download_http_url(link,
>   File "c:\program
> files\python38\lib\site-packages\pip\_internal\download.py", line 1152, in
> _download_http_url
> _download_url(resp, link, content_file, hashes, progress_bar)
>   File "c:\program
> files\python38\lib\site-packages\pip\_internal\download.py", line 861, in
> _download_url
> hashes.check_against_chunks(downloaded_chunks)
>   File "c:\program
> files\python38\lib\site-packages\pip\_internal\utils\hashes.py", line 75,
> in check_against_chunks
> for chunk in chunks:
>   File "c:\program
> files\python38\lib\site-packages\pip\_internal\download.py", line 829, in
> written_chunks
> for chunk in chunks:
>   File "c:\program
> files\python38\lib\site-packages\pip\_internal\utils\ui.py", line 156, in
> iter
> for x in it:
>   File "c:\program
> files\python38\lib\site-packages\pip\_internal\download.py", line 794, in
> resp_read
> for chunk in resp.raw.stream(
>   File "c:\program
> files\python38\lib\site-packages\pip\_vendor\urllib3\response.py", line
> 531, in stream
> data = self.read(amt=amt, decode_content=decode_content)
>   File "c:\program
> files\python38\lib\site-packages\pip\_vendor\urllib3\response.py", line
> 496, in read
> raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
>   File "c:\program files\python38\lib\contextlib.py", line 131, in __exit__
> self.gen.throw(type, value, traceback)
>   File "c:\program
> files\python38\lib\site-packages\pip\_vendor\urllib3\response.py", line
> 402, in _error_catcher
> raise ReadTimeoutError(self._pool, None, 'Read timed out.')
> pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='
> files.pythonhosted.org', port=443): Read timed out.
>
> C:\Users\odeya>
>
> --
> 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 

Re: I am getting an error message about a non-nullable field in existing rows, even though I dropped all rows via the admin interface

2020-09-12 Thread Mohammad Ahshan Danish
yes it works after deletion because old records get deleted.

but better approach is to do changes in migration.py files

On Sat, Sep 12, 2020 at 8:14 PM Mislav Jurić 
wrote:

> Hey Danish,
>
> I was able to resolve the error by deleting the *db.sqlite3* file from my
> project root directory and all of the *migration* folders from all of my
> apps.
>
> Thank you for responding.
>
> Best,
> Mislav
>
> Dana subota, 12. rujna 2020. u 14:56:13 UTC+2 korisnik mailto...@gmail.com
> napisao je:
>
>> you need to give default value in email. seems few records are already
>> exist.
>>
>> else delete sqllite file and try again.
>>
>> On Sat, Sep 12, 2020 at 6:22 PM Mislav Jurić 
>> wrote:
>>
>>> Hey guys,
>>>
>>> I added an EmailField
>>> 
>>> to some of my already existing models. When I tried to run:
>>>
>>> *python manage.py makemigrations*
>>>
>>> I got the following prompt:
>>>
>>>
>>>
>>>
>>>
>>> *You are trying to add a non-nullable field 'email' to employee without
>>> a default; we can't do that (the database needs something to populate
>>> existing rows).Please select a fix: 1) Provide a one-off default now (will
>>> be set on all existing rows with a null value for this column) 2) Quit, and
>>> let me add a default in models.pySelect an option: *
>>>
>>> I quit the prompt (option two). Then I went ahead and commented out the
>>> new EmailField in the models I added them and I dropped all of the database
>>> rows in my entire database (not just the rows related to the models where I
>>> added the new email field; I dropped every row from every table).
>>>
>>> Then I uncommented the new EmailField and tried to run:
>>>
>>> *python manage.py makemigrations*
>>>
>>> again, *but I still get the prompt above*! I selected option 1 a few
>>> times, but I'm not sure what I need to do. I tried to supply a value for
>>> that field, but the prompt is a Python shell, so I'm not sure what I need
>>> to do if I select option 1.
>>>
>>> *How do I fix this?*
>>>
>>> Best,
>>> Mislav
>>>
>>>
>>> --
>>> 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...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CABTqP_HKzXHOAKC-y0AedjsxtBcgKLEk9Cj9J7nhgoD1EpNf%2BA%40mail.gmail.com
>>> 
>>> .
>>>
>>
>>
>> --
>> Thanks & Regards
>>
>> Regards,
>> Danish
>>
> --
> 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/ac5c4f4d-8b2f-469d-9e7a-260a415d4644n%40googlegroups.com
> 
> .
>


-- 
Thanks & Regards

Regards,
Danish

-- 
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/CAPQdaF094eV_UnOOLg0N%3DktYb%3DpaBQa5nSRVbAyrxu4gNmMCAA%40mail.gmail.com.


Re: I am getting an error message about a non-nullable field in existing rows, even though I dropped all rows via the admin interface

2020-09-12 Thread Mohammad Ahshan Danish
you need to give default value in email. seems few records are already
exist.

else delete sqllite file and try again.

On Sat, Sep 12, 2020 at 6:22 PM Mislav Jurić 
wrote:

> Hey guys,
>
> I added an EmailField
>  to
> some of my already existing models. When I tried to run:
>
> *python manage.py makemigrations*
>
> I got the following prompt:
>
>
>
>
>
> *You are trying to add a non-nullable field 'email' to employee without a
> default; we can't do that (the database needs something to populate
> existing rows).Please select a fix: 1) Provide a one-off default now (will
> be set on all existing rows with a null value for this column) 2) Quit, and
> let me add a default in models.pySelect an option: *
>
> I quit the prompt (option two). Then I went ahead and commented out the
> new EmailField in the models I added them and I dropped all of the database
> rows in my entire database (not just the rows related to the models where I
> added the new email field; I dropped every row from every table).
>
> Then I uncommented the new EmailField and tried to run:
>
> *python manage.py makemigrations*
>
> again, *but I still get the prompt above*! I selected option 1 a few
> times, but I'm not sure what I need to do. I tried to supply a value for
> that field, but the prompt is a Python shell, so I'm not sure what I need
> to do if I select option 1.
>
> *How do I fix this?*
>
> Best,
> Mislav
>
>
> --
> 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/CABTqP_HKzXHOAKC-y0AedjsxtBcgKLEk9Cj9J7nhgoD1EpNf%2BA%40mail.gmail.com
> 
> .
>


-- 
Thanks & Regards

Regards,
Danish

-- 
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/CAPQdaF14z3tAGNDKsk5HYNDG4v%3DpZv6fHbSpC5AtyDdhwzR9zQ%40mail.gmail.com.