Re: help me

2023-09-23 Thread Miracle
Kindly use this link

https://www.makeuseof.com/heroku-alternatives-free-full-stack-hosting/

On Sat, 23 Sept 2023, 7:44 pm Akoo Rahimi, 
wrote:

> Hello friends
>
> Can you introduce me some sites similar to Heroku?
>
> I just started Django and I want to test my projects on the global server.
>
> --
> 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/dccab8c0-8d51-4338-a085-300fdfc0eeadn%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/CADZv-jBhWPr%3DZaiQ9C2zpA6CVsXZ3jY8LWEactd8-mmihqXLBg%40mail.gmail.com.


Re: Error django.db.utils.OperationalError: no such column:

2022-04-26 Thread Miracle
Did you run migrations???

You should run `python manage.py makemigrations` and then `python manage.py
migrate`

On Tue, Apr 26, 2022 at 8:37 AM Israel Lewis  wrote:

> Hello guys,
>
> I'm having an error in my models when I add the FK to the faculty or the
> student.
> model.py
> from django.db import models
>
> # Create your models here.
>
>
> class Student(models.Model):
> first_name = models.CharField(max_length=100)
> last_name = models.CharField(max_length=100)
> reg_no = models.CharField(max_length=20, unique=True)
>
> def __str__(self):
> return self.first_name
>
>
> class Faculty(models.Model):
> faculty_name = models.CharField(max_length=100)
> student = models.ForeignKey(Student, on_delete=models.CASCADE)
>
> def __str__(self):
> return self.faculty_name
>
>
> class Course(models.Model):
> course_name = models.CharField(max_length=100, unique=True)
> faculty = models.ForeignKey(Faculty, on_delete=models.CASCADE)
>
> def __str__(self):
> return self.course_name
>
>
> class Dean(models.Model):
> dean_name = models.CharField(max_length=100)
> faculty = models.OneToOneField(Faculty, on_delete=models.CASCADE)
>
> def __str__(self):
> return self.dean_name
>
>
> class StudentRequest(models.Model):
> student_name = models.CharField(max_length=100)
> faculty = models.ForeignKey(Faculty, on_delete=models.CASCADE)
> course = models.ForeignKey(Course, on_delete=models.CASCADE)
> reg_no = models.CharField(max_length=20)
> reasons = models.CharField(max_length=300, null=False)
>
> def __str__(self):
> return f"{self.student_name}"
>
>
> class FinancialRecords(models.Model):
> ACADENIC_YEAR_CHOICES = [
> ('Year 3 Sem 2'),
> ('Year 4 Sem 2')
> ]
> PAYMENT_PLAN_CHOICES = [
> ('Full'),
> ('Follow'),
> ('Fail'),
> ]
>
> payment_plan_category = models.CharField(
> PAYMENT_PLAN_CHOICES, max_length=10)
>
> student_reg = models.ForeignKey(Student, models.CASCADE)
> academic_year = models.CharField(ACADENIC_YEAR_CHOICES, max_length=20)
> course = models.ForeignKey(Course, on_delete=models.CASCADE)
>
>
>
> Errors
> Traceback (most recent call last):
>   File
> "/home/israel/Desktop/exams-clearance/env/lib/python3.8/site-packages/django/db/backends/utils.py",
> line 89, in _execute
> return self.cursor.execute(sql, params)
>   File
> "/home/israel/Desktop/exams-clearance/env/lib/python3.8/site-packages/django/db/backends/sqlite3/base.py",
> line 477, in execute
> return Database.Cursor.execute(self, query, params)
> sqlite3.OperationalError: no such column: exams_app_faculty.student_id
>
> The above exception was the direct cause of the following exception:
>
> Traceback (most recent call last):
>   File
> "/home/israel/Desktop/exams-clearance/env/lib/python3.8/site-packages/django/core/handlers/exception.py",
> line 55, in inner
> response = get_response(request)
>   File
> "/home/israel/Desktop/exams-clearance/env/lib/python3.8/site-packages/django/core/handlers/base.py",
> line 197, in _get_response
> response = wrapped_callback(request, *callback_args, **callback_kwargs)
>   File
> "/home/israel/Desktop/exams-clearance/env/lib/python3.8/site-packages/django/contrib/admin/options.py",
> line 683, in wrapper
> return self.admin_site.admin_view(view)(*args, **kwargs)
>   File
> "/home/israel/Desktop/exams-clearance/env/lib/python3.8/site-packages/django/utils/decorators.py",
> line 133, in _wrapped_view
> response = view_func(request, *args, **kwargs)
>   File
> "/home/israel/Desktop/exams-clearance/env/lib/python3.8/site-packages/django/views/decorators/cache.py",
> line 62, in _wrapped_view_func
> response = view_func(request, *args, **kwargs)
>   File
> "/home/israel/Desktop/exams-clearance/env/lib/python3.8/site-packages/django/contrib/admin/sites.py",
> line 242, in inner
> return view(request, *args, **kwargs)
>   File
> "/home/israel/Desktop/exams-clearance/env/lib/python3.8/site-packages/django/utils/decorators.py",
> line 46, in _wrapper
> return bound_method(*args, **kwargs)
>   File
> "/home/israel/Desktop/exams-clearance/env/lib/python3.8/site-packages/django/utils/decorators.py",
> line 133, in _wrapped_view
> response = view_func(request, *args, **kwargs)
>   File
> "/home/israel/Desktop/exams-clearance/env/lib/python3.8/site-packages/django/contrib/admin/options.py",
> line 2063, in changelist_view
> "selection_note": _("0 of %(cnt)s selected") % {"cnt":
> len(cl.result_list)},
>   File
> "/home/israel/Desktop/exams-clearance/env/lib/python3.8/site-packages/django/db/models/query.py",
> line 302, in __len__
> self._fetch_all()
>   File
> "/home/israel/Desktop/exams-clearance/env/lib/python3.8/site-packages/django/db/models/query.py",
> line 1507, in _fetch_all
> self._result_cache = list(self._iterable_class(self))
>   File
> "/home/israel/Desktop/exams-clearance/env/lib/python3.8/site-packages/django/db/models/query.py",
> line 57, in __iter__
> results = compiler.execute_sql(
>   File
> "/home/israel/Desktop/exams-clearance/env/lib/python3.8/site-

Re: Celery tutorial

2021-10-26 Thread Miracle
Check this out:
https://realpython.com/asynchronous-tasks-with-django-and-celery/
https://www.youtube.com/watch?v=THxCy-6EnQM
https://www.section.io/engineering-education/django-celery-tasks/

On Tue, Oct 26, 2021 at 5:04 PM parag gupta  wrote:

> Is there any good celery tutorial that might 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/CA%2BepXomxE3Dd5_aX0esDnXMdwBOOfr7f1P9PTosQSC4xLidAEA%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/CADZv-jAe--M_qKo8qUWW6JHgSFygT6_AiaE0zv7Zni81k3cp-Q%40mail.gmail.com.


Challenges Building and Integrating Test and Live API keys

2021-06-15 Thread Miracle
I want to create a system that works similar to stripe. There'll be live
API keys, as well as test API keys. I have been thinking of how to
implement this architecture, and I am not sure the best way to go about it.
I found a similar question on this but it didn't help much.

Architecturing testmode/livemode using OAuth 2 token


My current progress is basically:

   - I have decided to use
https://github.com/James1345/django-rest-knox instead
   of DRF's default authtoken because knox supports multiple token creation
   and I thougt I needed that feature.
   - I intend to create tokens as pub_key_ and test_key_ and
   remove or strip the prefix before authentication
   - I intend to create a LiveAccount Model and a TestAcoount model.

However, after authenticating the request from a test api token, it's
unclear how to route or perform requests to TestAcoount instead of
LiveAccount.

Please any ideas or a better implementation strategy is highly welcomed

stackoverflow link:
https://stackoverflow.com/questions/67995479/create-accounts-and-api-tokens-for-live-mode-and-test-mode

-- 
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/CADZv-jCvu16tYsTQa6YbD_98fnbgN%3DRgY80gBH57BebxFCipfQ%40mail.gmail.com.


Re: Django 3.2 Released

2021-04-06 Thread Miracle
Awesome!!

On Tue, Apr 6, 2021 at 10:42 AM Carlton Gibson 
wrote:

> Details are available on the Django project weblog:
>
> https://www.djangoproject.com/weblog/2021/apr/06/django-32-released/
>
> --
> 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/09A64268-F770-49C5-ADC0-FE342D49F8BF%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/CADZv-jBXJEgaxCOs-JjcMBpVH8PQREhmKRg%2BEYo9E_5UigPm6A%40mail.gmail.com.


Re: Flask to django

2020-08-08 Thread Miracle
You'll have to build a brand new application using django.

Django and flask are quite similar, so porting to django won't be so much
issue.
Also, both work with python.

However, there's no automatic way to change from flask to django. You'll
have to write the codes. And it's not totally a big deal.

If you face any challenges when building a new django application, we'll be
here to help.

On Sat, 8 Aug 2020, 4:15 pm Mottaz Hegaze,  wrote:

> no
>
> On Sat, Aug 8, 2020 at 4:22 PM sakshi jain  wrote:
>
>> hello
>>
>> On Sat, Aug 8, 2020, 19:31 Amar prakash  wrote:
>>
>>> Anyway to transform my flask code to django
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to django-users+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/d7f28744-33bc-4c3b-9e93-4eb827b0554do%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/CAJhs3iO9-Fv_y8_77uxSnJgzmHOWJsrhuSMyNt25jChNUoCyFg%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/CAHV4E-c-%3DTWtEyaJ_sChyuRs8LP_eWcszLszZXzyTHpL7U8iSg%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/CADZv-jAfa_-7p7tq9idPhu%2BnisjPFjJRhFzk5-C7GzeUqwYuRw%40mail.gmail.com.


Re: how source code is deployed inproduction

2020-07-29 Thread Miracle
You can use

Heroku
Netlify
Google Cloud
Amazon Web Services
Digital Ocean
Azure
Python anywhere
Etc.


Just google how to deploy django on an of the above provider and you'll
see  lots of tutorials and videos to put you through.


An easy place to start would be Heroku.


Kind regards,
Miracle

On Wed, 29 Jul 2020, 9:54 pm Ogunsanya Opeyemi, 
wrote:

> Hi it depends on the hosting company for more details send a mail to me.
>
> On Wednesday, July 29, 2020, Ravi G  wrote:
>
>> anyone can explain me how to code is deployed in production and which
>> server they used
>>
>> --
>> 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/8edc8b9f-d0ed-4ed3-b23b-ff193d8a087bo%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/8edc8b9f-d0ed-4ed3-b23b-ff193d8a087bo%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>
>
> --
> OGUNSANYA OPEYEMI
>
> --
> 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/CABJxPrGtt2Lxa0AfQMUo9Dj%3D5UtZwfdRY-dAjsDxCRmYqBntig%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CABJxPrGtt2Lxa0AfQMUo9Dj%3D5UtZwfdRY-dAjsDxCRmYqBntig%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CADZv-jDa5SeTQVGwm%2B-Xt3sYtc8Q_KSn4hPq46RR1herXVcyWw%40mail.gmail.com.


Re: Django Survey

2020-07-29 Thread Miracle
You welcome Ryan.

Kind regards.

On Wed, 29 Jul 2020, 6:20 pm Dylan Reinhold,  wrote:

> I now see the django team used the ift link in their tweet... Thanks for
> forwarding this on Miracle.
>
> Regards,
> Dylan
>
> On Wed, Jul 29, 2020 at 10:13 AM Dylan Reinhold 
> wrote:
>
>> This really felt spammy. And I'm surprised it ended up on the
>> djangoproject page.
>> Why is the url shortened via the twitter link, then directes to a link
>> on  https://ift.tt then finally to the django project?
>>
>> What is that ifft.tt link some sort of tracking link to see who opens
>> this email?
>>
>> Why not just link to the django project link.
>> https://www.djangoproject.com/weblog/2020/jul/28/community-survey-2020/
>>
>> Dylan
>>
>> On Wed, Jul 29, 2020 at 10:04 AM Miracle  wrote:
>>
>>> Django Developers Community Survey 2020
>>>
>>> Your feedback is highly appreciated.
>>>
>>>  https://t.co/p7dKmaAaXh
>>>
>>> --
>>> 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/CADZv-jCtuTMjkurtwCb1TLqhn7MY%2BUppRM1DED9%3D8E1_tpFLzQ%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-users/CADZv-jCtuTMjkurtwCb1TLqhn7MY%2BUppRM1DED9%3D8E1_tpFLzQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
> 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/CAHtg44DVsGJv43Q8np%3D0_Ft3zEFdt%2BBQwDTwL-wt-R%2BBbpe47A%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAHtg44DVsGJv43Q8np%3D0_Ft3zEFdt%2BBQwDTwL-wt-R%2BBbpe47A%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CADZv-jDhrWLL%3D1%2Bt7AVDJrEb0q-zVKwYZ%2BZvVStTyjN%2B8mPzAQ%40mail.gmail.com.


Django Survey

2020-07-29 Thread Miracle
Django Developers Community Survey 2020

Your feedback is highly appreciated.

 https://t.co/p7dKmaAaXh

-- 
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/CADZv-jCtuTMjkurtwCb1TLqhn7MY%2BUppRM1DED9%3D8E1_tpFLzQ%40mail.gmail.com.


Django Community Survey

2020-07-29 Thread Miracle
https://twitter.com/djangoproject/status/1288488760741683201?s=09


Django 2020 Community survey

-- 
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/CADZv-jCyjMcNGm2b5Ye3uFcj-w0NumRzpx-JdqyTQCfpds06gw%40mail.gmail.com.


Re: Can't change my site name from example.com

2020-07-27 Thread Miracle
Change both "display name" and "domain name" in sites, in your Admin.

Make sure the site Id in settings.py corresponds to the id of the "domain
name"

Then restart the server.



On Mon, 27 Jul 2020, 9:27 pm sunday honesty, 
wrote:

> I am not using custom user model...
>
> I didn't clone anything from GitHub repo...
>
> I only installed the third party package - django-allauth and done all
> necessary configurations.
>
> I have changed the site name from example.com to my domainname.com
> through the sites area of admin panel but it kept showing as example.com
> when I send email
>
> On Mon, Jul 27, 2020, 9:07 PM Exactly musty 
> wrote:
>
>> If I should understand you very well,its because you are using Custom
>> user model,and you probably clone it from a github repo,it can't change
>> itself mate, go the admin panel, then click on site, you should change it
>> from example.com to your website name
>>
>> --
>> 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/cb039d11-e1c8-44fb-840f-68811f5420ddo%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/CALcuGNtBLZYr6tnQm6E_zREpJKCzkwVjU8WEfXHpa%3DDEAXP%3Drg%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/CADZv-jCT%2BDqx8wbDYSumykoV6C6s_Vhe%3DybCG7EQv0RoAMYbrg%40mail.gmail.com.


Re: How to track changes changes, deletions and creations of records on django site

2020-07-27 Thread Miracle
This should work


https://django-simple-history.readthedocs.io/en/latest/

On Mon, 27 Jul 2020, 4:30 pm Hector Berrones,  wrote:

> Hi, Thanks for reading me, does anyone can advice to me about how can have
> record of changes, deletions and creations on a django app,
> I was trying creating a field in the model to save the Current
> authenticated user but I have't been able to get the user ID and I
> would't like to make that field the ForeighKey because I am fraid that if
> that user is deleted i would lose all the child records.. hope somebody can
> give me  advice on this, Thanks in advance.
> --
> *Hector Berrones.*
> (956) 775 5951
> hec...@getin2web.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/CAFFaoUK7dxusz8DypSekM%3DdsvgSKR2oPcWkhuU5F%3DMHJr_WtxQ%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/CADZv-jBrA54soxfCrjBf9iprrGm7wKYk0Xj5XpKm%2ByqWqkiR_g%40mail.gmail.com.


Re: Two Django projects accessing same db

2020-06-16 Thread Miracle
You will have to connect one django project to the database as a legacy db.

You'll fake migrate, so django doesn't create it's default models twice.

On Wed, 17 Jun 2020, 12:24 am J.T.,  wrote:

> I have Django project A on one server & Django project B on a different
> server. I want project B to be able to load data into the db associated
> with project A.
>
> My question is: do I have to have the app and models on project B exactly
> match the app and models on project A?
>
> Also, other than pointing the settings.py of project B to project A's
> database, is there anything else I need to do?
>
> I do realize this is type of setup is frowned upon, but I need this setup
> for at least the time being.
>
> 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/6b565ce5-19f5-485b-9361-48a2f08a6a27o%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/CADZv-jAfEj-zJXE5K%2BfHLfvhC2dy8BcfFhHFnZExT9ASsBQ%2BDw%40mail.gmail.com.


Re: Collapsible list menu with Django

2020-06-11 Thread Miracle
You need to use html and css or maybe boostrap to achieve that.

On Thu, 11 Jun 2020, 11:34 am Yogendra Yadav, 
wrote:

> I want to have collapsible menu on my website of the style same as in the
> webpage
> https://www.investopedia.com/terms/t/technical-analysis-of-stocks-and-trends.asp
> .
>
> How can I do it in my Django webpage? Please help me in this
>
> Thanks in advance!
>
> --
> 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/96eca9c0-018e-4b86-b5f2-565732ee6a15o%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/CADZv-jCTaaX71h5OgbCu7Neh%3DY51ofjBWec97eoUG7VeXdkfOQ%40mail.gmail.com.


Re: How to display calendar in django webapplication?

2020-06-10 Thread Miracle
Check this project pinax calendars
https://github.com/pinax/pinax-calendars

On Wed, 10 Jun 2020, 10:43 pm learn code,  wrote:

> Hi everyone,
>
> I'm working on a website. In that, I need to display available dates and
> timings dynamically. Anyone knows please help 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/6ac935a7-5602-4539-84dd-d746b943823do%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/CADZv-jC3odzF2ip-mqr2_avz9nF00g-v%2BorVF3Owjbq14KE8Vw%40mail.gmail.com.


Re: autocomplete django in visual studio code

2020-06-10 Thread Miracle
I think using "Jedi" as IntelliSense engine would solve the problem.

You can also get more template and django specific snippets and auto
completion using the "django" extension from the marketplace.

On Wed, 10 Jun 2020, 3:23 am THAKUR SINGH, 
wrote:

> INSTALL WINDOWS 10 THEN  INSTALL YOUR SOFTWARES
>
> --
> 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/60cd712f-07ed-471c-887a-f5e77b4402dfo%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/CADZv-jA%2B%2BYROox3Qkp8V9Td18F0ZgT5ORyXoC%2B1gNide0_wyZw%40mail.gmail.com.


Re: Bootstrap drop down menu not clickable.

2020-05-17 Thread Miracle
Have you tried the same drop down menu code in a plain html file?

Without django involved.

Just create a html file, put the menu code and boostrap code and test if it
works in the first place.  This issue might be the dropdown configuration.

On Sun, 17 May 2020, 10:49 am Miracle,  wrote:

> Hey Sunday,
>
> Please check this...
>
> https://stackoverflow.com/a/61849839/11000813
>
> On Sun, 17 May 2020, 10:28 am sunday honesty, 
> wrote:
>
>> Thanks for replying...
>> I just downloaded it now following the guide on the doc you sent me.
>> I have added it to my installed app and requirements.txt.
>> I loaded it at the top of my template and it didn't work. I then included
>> it in the {% block content %} as suggested by a member here yesterday, yet
>> it didn't work.
>> I don't know what's just wrong.
>> You can take a look at my base.html file
>> https://pastebin.com/4gVcN2si
>>
>> On Sun, May 17, 2020, 9:50 AM Kasper Laudrup 
>> wrote:
>>
>>> Hi Sunday
>>>
>>> On 17/05/2020 08.33, sunday honesty wrote:
>>> > That's what I did... But the question is do I need to download
>>> > django-bootstrap with pip before I can use compiled bootstrap I have
>>> > downloaded?
>>> > Isn't django-bootstrap different from bootstrap?
>>> >
>>>
>>> The compiled bootstrap you have downloaded is just a bunch of CSS
>>> styles. You have to do some manual work to make that work with you
>>> Django project.
>>>
>>> The whole point of something like the django-bootstrap package is to
>>> avoid that manual work.
>>>
>>> Have you tried following the very simple installation instructions:
>>>
>>> https://django-bootstrap4.readthedocs.io/en/latest/installation.html
>>>
>>> Kind regards,
>>>
>>> Kasper Laudrup
>>>
>>> --
>>> 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/3b8a4124-4a8a-34f1-a4b4-3387aed6cc6e%40stacktrace.dk
>>> .
>>>
>> --
>> 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/CALcuGNs6VS_ix30Cxf-f-S64v5USTm4%2Bx6LEXKjEhYK1GrK7ww%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CALcuGNs6VS_ix30Cxf-f-S64v5USTm4%2Bx6LEXKjEhYK1GrK7ww%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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/CADZv-jC5LF7EMcJ63a-6AxKwQKJ8Q3aKqLCpnM6ZDZfLN1t%2BLw%40mail.gmail.com.


Re: Bootstrap drop down menu not clickable.

2020-05-17 Thread Miracle
Hey Sunday,

Please check this...

https://stackoverflow.com/a/61849839/11000813

On Sun, 17 May 2020, 10:28 am sunday honesty, 
wrote:

> Thanks for replying...
> I just downloaded it now following the guide on the doc you sent me.
> I have added it to my installed app and requirements.txt.
> I loaded it at the top of my template and it didn't work. I then included
> it in the {% block content %} as suggested by a member here yesterday, yet
> it didn't work.
> I don't know what's just wrong.
> You can take a look at my base.html file
> https://pastebin.com/4gVcN2si
>
> On Sun, May 17, 2020, 9:50 AM Kasper Laudrup 
> wrote:
>
>> Hi Sunday
>>
>> On 17/05/2020 08.33, sunday honesty wrote:
>> > That's what I did... But the question is do I need to download
>> > django-bootstrap with pip before I can use compiled bootstrap I have
>> > downloaded?
>> > Isn't django-bootstrap different from bootstrap?
>> >
>>
>> The compiled bootstrap you have downloaded is just a bunch of CSS
>> styles. You have to do some manual work to make that work with you
>> Django project.
>>
>> The whole point of something like the django-bootstrap package is to
>> avoid that manual work.
>>
>> Have you tried following the very simple installation instructions:
>>
>> https://django-bootstrap4.readthedocs.io/en/latest/installation.html
>>
>> Kind regards,
>>
>> Kasper Laudrup
>>
>> --
>> 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/3b8a4124-4a8a-34f1-a4b4-3387aed6cc6e%40stacktrace.dk
>> .
>>
> --
> 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/CALcuGNs6VS_ix30Cxf-f-S64v5USTm4%2Bx6LEXKjEhYK1GrK7ww%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/CADZv-jBb4PBcRw21o81j4ygv8B2WQsr80KoqYPHGnoxfYjcp0Q%40mail.gmail.com.


Re: Possible server attacks

2020-05-04 Thread Miracle
Okay,

I will do all those.

Thank you so much.

I appreciate.

On Mon, 4 May 2020, 1:26 am Motaz Hejaze,  wrote:

> check the log file , what are the acts that invokes the call to those
> links 
> example , logging in ? upload an image ? any act
>
> also try to check if there is a malicious script installed on your server
> ,
>
> take a peace from the text above and search for it ..
>
> Example:
>
> grep -lR "/sqlitemanager/main.php" /home
>
> replace /home with the location of your files ..and replace the string by
> anything from the error message above
>
> On Mon, May 4, 2020 at 1:24 AM Ahmed Ishtiaque 
> wrote:
>
>> Observe how your server responds to these requests. Sometimes these
>> requests are sent by attackers hoping that your server might respond with
>> sensitive data that it shouldn't be sending. Generally, ensuring that
>> invalid requests end up with your server sending error responses and not
>> actual sensitive data that your database has is all you need to do.
>>
>> Hope this helps.
>>
>> On Sun, May 3, 2020 at 6:51 PM Miracle  wrote:
>>
>>> I do not know of any script like that.
>>> Atleast, I didn't write any.
>>>
>>> A get these calls on the following paths:
>>>
>>> /sqlite/main.php,
>>> /robots.txt,
>>> /,
>>> /owa/auth/logon.aspx,
>>> /cgi-bin/config.exp,
>>> /HNAP1/,
>>> /hudson/script,
>>> /script,
>>> /sqlitemanager/main.php,
>>>  /SQLiteManager/main.php,
>>> /SQLite/main.php,
>>> /main.php,
>>> /test/sqlite/SQLiteManager-1.2.0/SQLiteManager-1.2.0/main.php,
>>> /favicon.co
>>>
>>>
>>> Please, what could be the problem?
>>>
>>>
>>>
>>>
>>>
>>> On Sun, 3 May 2020, 11:03 pm Motaz Hejaze,  wrote:
>>>
>>>> I think you have a script somewhere that calls this ip and main.php on
>>>> that server ..
>>>>
>>>> Do you add any third party addons both on frontend and backend ??
>>>>
>>>>
>>>> On Sun, 3 May 2020, 11:31 pm Miracle,  wrote:
>>>>
>>>>> I think the possible attacker thinks I am using PHP
>>>>>
>>>>> On Sun, 3 May 2020, 10:29 pm Miracle,  wrote:
>>>>>
>>>>>> I don't know honestly.
>>>>>>
>>>>>> I got those error messages because I included my email and username
>>>>>> in settings.py like this
>>>>>>
>>>>>> ADMINS = ['username', 'collinsale...@gmail.com']
>>>>>>
>>>>>> On Sun, 3 May 2020, 10:24 pm Motaz Hejaze, 
>>>>>> wrote:
>>>>>>
>>>>>>> What is the script main.php ???
>>>>>>>
>>>>>>> On Sun, 3 May 2020, 10:43 pm Miracle, 
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Hello django developers,
>>>>>>>>
>>>>>>>> I might be experiencing a possible attack on my web server,  but I
>>>>>>>> am not sure yet.
>>>>>>>> Below is the email I got from my django.
>>>>>>>> I've gotten over 50 similar emails over the past 3 days.
>>>>>>>>
>>>>>>>> Please, help me with this.
>>>>>>>>
>>>>>>>>
>>>>>>>> Invalid HTTP_HOST header: '35.192.28.182'. You may need to add
>>>>>>>> '35.192.28.182' to ALLOWED_HOSTS.
>>>>>>>>
>>>>>>>> Report at /SQlite/main.php
>>>>>>>>
>>>>>>>> Invalid HTTP_HOST header: '35.192.28.182'. You may need to add
>>>>>>>> '35.192.28.182' to ALLOWED_HOSTS.
>>>>>>>>
>>>>>>>> Request Method: GET
>>>>>>>> Request URL: https://35.192.28.182/SQlite/main.php
>>>>>>>>
>>>>>>>> Django Version: 2.2.8
>>>>>>>> Python Executable: /home/hello/wsp/env/bin/python3
>>>>>>>> Python Version: 3.6.9
>>>>>>>> Python Path: ['/home/hello/wsp', '/home/hello/wsp/env/bin',
>>>>>>>> '/usr/lib/python36.zip', '/usr/lib/python3.6',
>>>>>>>> '

Re: Possible server attacks

2020-05-03 Thread Miracle
I do not know of any script like that.
Atleast, I didn't write any.

A get these calls on the following paths:

/sqlite/main.php,
/robots.txt,
/,
/owa/auth/logon.aspx,
/cgi-bin/config.exp,
/HNAP1/,
/hudson/script,
/script,
/sqlitemanager/main.php,
 /SQLiteManager/main.php,
/SQLite/main.php,
/main.php,
/test/sqlite/SQLiteManager-1.2.0/SQLiteManager-1.2.0/main.php,
/favicon.co


Please, what could be the problem?





On Sun, 3 May 2020, 11:03 pm Motaz Hejaze,  wrote:

> I think you have a script somewhere that calls this ip and main.php on
> that server ..
>
> Do you add any third party addons both on frontend and backend ??
>
>
> On Sun, 3 May 2020, 11:31 pm Miracle,  wrote:
>
>> I think the possible attacker thinks I am using PHP
>>
>> On Sun, 3 May 2020, 10:29 pm Miracle,  wrote:
>>
>>> I don't know honestly.
>>>
>>> I got those error messages because I included my email and username in
>>> settings.py like this
>>>
>>> ADMINS = ['username', 'collinsale...@gmail.com']
>>>
>>> On Sun, 3 May 2020, 10:24 pm Motaz Hejaze,  wrote:
>>>
>>>> What is the script main.php ???
>>>>
>>>> On Sun, 3 May 2020, 10:43 pm Miracle,  wrote:
>>>>
>>>>> Hello django developers,
>>>>>
>>>>> I might be experiencing a possible attack on my web server,  but I am
>>>>> not sure yet.
>>>>> Below is the email I got from my django.
>>>>> I've gotten over 50 similar emails over the past 3 days.
>>>>>
>>>>> Please, help me with this.
>>>>>
>>>>>
>>>>> Invalid HTTP_HOST header: '35.192.28.182'. You may need to add
>>>>> '35.192.28.182' to ALLOWED_HOSTS.
>>>>>
>>>>> Report at /SQlite/main.php
>>>>>
>>>>> Invalid HTTP_HOST header: '35.192.28.182'. You may need to add
>>>>> '35.192.28.182' to ALLOWED_HOSTS.
>>>>>
>>>>> Request Method: GET
>>>>> Request URL: https://35.192.28.182/SQlite/main.php
>>>>>
>>>>> Django Version: 2.2.8
>>>>> Python Executable: /home/hello/wsp/env/bin/python3
>>>>> Python Version: 3.6.9
>>>>> Python Path: ['/home/hello/wsp', '/home/hello/wsp/env/bin',
>>>>> '/usr/lib/python36.zip', '/usr/lib/python3.6',
>>>>> '/usr/lib/python3.6/lib-dynload',
>>>>> '/home/hello/wsp/env/lib/python3.6/site-packages']
>>>>> Server time: Sun, 3 May 2020 19:22:55 +
>>>>> Show quoted text
>>>>> HTTP_ACCEPT =
>>>>> 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9'
>>>>> HTTP_ACCEPT_ENCODING = 'gzip, deflate, br'
>>>>> HTTP_ACCEPT_LANGUAGE = 'en-GB,en-US;q=0.9,en;q=0.8,ig;q=0.7'
>>>>> HTTP_CONNECTION = 'close'
>>>>> HTTP_COOKIE =
>>>>> 'csrftoken=mX6nNccvMIycyGeE4tF0hciqwfsccdaK8X8ZDt8YgimJeQYTjQFjxfB4YGNCZ9Ik;
>>>>> sessionid=mbmg0dvoz2tebman7ereia9eue59wto7'
>>>>> HTTP_HOST = '35.192.28.182'
>>>>> HTTP_SAVE_DATA = 'on'
>>>>>
>>>>> HTTP_SEC_FETCH_DEST = 'document'
>>>>> HTTP_SEC_FETCH_MODE = 'navigate'
>>>>> HTTP_SEC_FETCH_SITE = 'none'
>>>>> HTTP_UPGRADE_INSECURE_REQUESTS = '1'
>>>>> HTTP_USER_AGENT = 'Mozilla/5.0 (Linux; Android 9; SM-A307FN)
>>>>> AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.117 Mobile
>>>>> Safari/537.36'
>>>>> HTTP_X_FORWARDED_FOR = '197.211.61.210'
>>>>> HTTP_X_FORWARDED_PROTO = 'https'
>>>>> HTTP_X_REAL_IP = '197.211.61.210'
>>>>> PATH_INFO = '/SQlite/main.php'
>>>>> QUERY_STRING = ''
>>>>> RAW_URI = '/SQlite/main.php'
>>>>> REMOTE_ADDR = ''
>>>>> REQUEST_METHOD = 'GET'
>>>>> SCRIPT_NAME = ''
>>>>> SERVER_NAME = '35.192.28.182'
>>>>> SERVER_PORT = '443'
>>>>> SERVER_PROTOCOL = 'HTTP/1.0'
>>>>> SERVER_SOFTWARE = 'gunicorn/20.0.4'
>>>>> gunicorn.socket = >>

Re: Possible server attacks

2020-05-03 Thread Miracle
I think the possible attacker thinks I am using PHP

On Sun, 3 May 2020, 10:29 pm Miracle,  wrote:

> I don't know honestly.
>
> I got those error messages because I included my email and username in
> settings.py like this
>
> ADMINS = ['username', 'collinsale...@gmail.com']
>
> On Sun, 3 May 2020, 10:24 pm Motaz Hejaze,  wrote:
>
>> What is the script main.php ???
>>
>> On Sun, 3 May 2020, 10:43 pm Miracle,  wrote:
>>
>>> Hello django developers,
>>>
>>> I might be experiencing a possible attack on my web server,  but I am
>>> not sure yet.
>>> Below is the email I got from my django.
>>> I've gotten over 50 similar emails over the past 3 days.
>>>
>>> Please, help me with this.
>>>
>>>
>>> Invalid HTTP_HOST header: '35.192.28.182'. You may need to add
>>> '35.192.28.182' to ALLOWED_HOSTS.
>>>
>>> Report at /SQlite/main.php
>>>
>>> Invalid HTTP_HOST header: '35.192.28.182'. You may need to add
>>> '35.192.28.182' to ALLOWED_HOSTS.
>>>
>>> Request Method: GET
>>> Request URL: https://35.192.28.182/SQlite/main.php
>>>
>>> Django Version: 2.2.8
>>> Python Executable: /home/hello/wsp/env/bin/python3
>>> Python Version: 3.6.9
>>> Python Path: ['/home/hello/wsp', '/home/hello/wsp/env/bin',
>>> '/usr/lib/python36.zip', '/usr/lib/python3.6',
>>> '/usr/lib/python3.6/lib-dynload',
>>> '/home/hello/wsp/env/lib/python3.6/site-packages']
>>> Server time: Sun, 3 May 2020 19:22:55 +
>>> Show quoted text
>>> HTTP_ACCEPT =
>>> 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9'
>>> HTTP_ACCEPT_ENCODING = 'gzip, deflate, br'
>>> HTTP_ACCEPT_LANGUAGE = 'en-GB,en-US;q=0.9,en;q=0.8,ig;q=0.7'
>>> HTTP_CONNECTION = 'close'
>>> HTTP_COOKIE =
>>> 'csrftoken=mX6nNccvMIycyGeE4tF0hciqwfsccdaK8X8ZDt8YgimJeQYTjQFjxfB4YGNCZ9Ik;
>>> sessionid=mbmg0dvoz2tebman7ereia9eue59wto7'
>>> HTTP_HOST = '35.192.28.182'
>>> HTTP_SAVE_DATA = 'on'
>>>
>>> HTTP_SEC_FETCH_DEST = 'document'
>>> HTTP_SEC_FETCH_MODE = 'navigate'
>>> HTTP_SEC_FETCH_SITE = 'none'
>>> HTTP_UPGRADE_INSECURE_REQUESTS = '1'
>>> HTTP_USER_AGENT = 'Mozilla/5.0 (Linux; Android 9; SM-A307FN)
>>> AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.117 Mobile
>>> Safari/537.36'
>>> HTTP_X_FORWARDED_FOR = '197.211.61.210'
>>> HTTP_X_FORWARDED_PROTO = 'https'
>>> HTTP_X_REAL_IP = '197.211.61.210'
>>> PATH_INFO = '/SQlite/main.php'
>>> QUERY_STRING = ''
>>> RAW_URI = '/SQlite/main.php'
>>> REMOTE_ADDR = ''
>>> REQUEST_METHOD = 'GET'
>>> SCRIPT_NAME = ''
>>> SERVER_NAME = '35.192.28.182'
>>> SERVER_PORT = '443'
>>> SERVER_PROTOCOL = 'HTTP/1.0'
>>> SERVER_SOFTWARE = 'gunicorn/20.0.4'
>>> gunicorn.socket = >> type=SocketKind.SOCK_STREAM, proto=0, laddr=/home/hello/wsp/app.sock>
>>> wsgi.errors = >> 0x7f20fa4288d0>
>>> wsgi.file_wrapper = ''
>>> wsgi.input = 
>>>
>>>
>>>
>>>
>>> kind  regards*,*
>>>
>>> Miracle.
>>>
>>> --
>>> 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/CADZv-jBZojn_UhiYUgPZiP2tvcYnmggOVq24nUbCXCX_D0990A%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-users/CADZv-jBZojn_UhiYUgPZiP2tvcYnmggOVq24nUbCXCX_D0990A%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
>> 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/CAHV4E-d0iU5tYOPBeAVTuQLUgzVOM4v9Gu4s_rtxLqFFZr71dA%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAHV4E-d0iU5tYOPBeAVTuQLUgzVOM4v9Gu4s_rtxLqFFZr71dA%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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/CADZv-jDTCNZMFy_6gp4X_cx5Vy9vMCWEk_X-GKsYizeTpWEkow%40mail.gmail.com.


Re: Possible server attacks

2020-05-03 Thread Miracle
I don't know honestly.

I got those error messages because I included my email and username in
settings.py like this

ADMINS = ['username', 'collinsale...@gmail.com']

On Sun, 3 May 2020, 10:24 pm Motaz Hejaze,  wrote:

> What is the script main.php ???
>
> On Sun, 3 May 2020, 10:43 pm Miracle,  wrote:
>
>> Hello django developers,
>>
>> I might be experiencing a possible attack on my web server,  but I am not
>> sure yet.
>> Below is the email I got from my django.
>> I've gotten over 50 similar emails over the past 3 days.
>>
>> Please, help me with this.
>>
>>
>> Invalid HTTP_HOST header: '35.192.28.182'. You may need to add
>> '35.192.28.182' to ALLOWED_HOSTS.
>>
>> Report at /SQlite/main.php
>>
>> Invalid HTTP_HOST header: '35.192.28.182'. You may need to add
>> '35.192.28.182' to ALLOWED_HOSTS.
>>
>> Request Method: GET
>> Request URL: https://35.192.28.182/SQlite/main.php
>>
>> Django Version: 2.2.8
>> Python Executable: /home/hello/wsp/env/bin/python3
>> Python Version: 3.6.9
>> Python Path: ['/home/hello/wsp', '/home/hello/wsp/env/bin',
>> '/usr/lib/python36.zip', '/usr/lib/python3.6',
>> '/usr/lib/python3.6/lib-dynload',
>> '/home/hello/wsp/env/lib/python3.6/site-packages']
>> Server time: Sun, 3 May 2020 19:22:55 +
>> Show quoted text
>> HTTP_ACCEPT =
>> 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9'
>> HTTP_ACCEPT_ENCODING = 'gzip, deflate, br'
>> HTTP_ACCEPT_LANGUAGE = 'en-GB,en-US;q=0.9,en;q=0.8,ig;q=0.7'
>> HTTP_CONNECTION = 'close'
>> HTTP_COOKIE =
>> 'csrftoken=mX6nNccvMIycyGeE4tF0hciqwfsccdaK8X8ZDt8YgimJeQYTjQFjxfB4YGNCZ9Ik;
>> sessionid=mbmg0dvoz2tebman7ereia9eue59wto7'
>> HTTP_HOST = '35.192.28.182'
>> HTTP_SAVE_DATA = 'on'
>>
>> HTTP_SEC_FETCH_DEST = 'document'
>> HTTP_SEC_FETCH_MODE = 'navigate'
>> HTTP_SEC_FETCH_SITE = 'none'
>> HTTP_UPGRADE_INSECURE_REQUESTS = '1'
>> HTTP_USER_AGENT = 'Mozilla/5.0 (Linux; Android 9; SM-A307FN)
>> AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.117 Mobile
>> Safari/537.36'
>> HTTP_X_FORWARDED_FOR = '197.211.61.210'
>> HTTP_X_FORWARDED_PROTO = 'https'
>> HTTP_X_REAL_IP = '197.211.61.210'
>> PATH_INFO = '/SQlite/main.php'
>> QUERY_STRING = ''
>> RAW_URI = '/SQlite/main.php'
>> REMOTE_ADDR = ''
>> REQUEST_METHOD = 'GET'
>> SCRIPT_NAME = ''
>> SERVER_NAME = '35.192.28.182'
>> SERVER_PORT = '443'
>> SERVER_PROTOCOL = 'HTTP/1.0'
>> SERVER_SOFTWARE = 'gunicorn/20.0.4'
>> gunicorn.socket = > type=SocketKind.SOCK_STREAM, proto=0, laddr=/home/hello/wsp/app.sock>
>> wsgi.errors = > 0x7f20fa4288d0>
>> wsgi.file_wrapper = ''
>> wsgi.input = 
>>
>>
>>
>>
>> kind  regards*,*
>>
>> Miracle.
>>
>> --
>> 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/CADZv-jBZojn_UhiYUgPZiP2tvcYnmggOVq24nUbCXCX_D0990A%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CADZv-jBZojn_UhiYUgPZiP2tvcYnmggOVq24nUbCXCX_D0990A%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> 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/CAHV4E-d0iU5tYOPBeAVTuQLUgzVOM4v9Gu4s_rtxLqFFZr71dA%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAHV4E-d0iU5tYOPBeAVTuQLUgzVOM4v9Gu4s_rtxLqFFZr71dA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CADZv-jD%3DmcgZf7qgOwoWyrS67p-FMUrCfxY1q7T%3D3exPK0Wn8A%40mail.gmail.com.


Possible server attacks

2020-05-03 Thread Miracle
Hello django developers,

I might be experiencing a possible attack on my web server,  but I am not
sure yet.
Below is the email I got from my django.
I've gotten over 50 similar emails over the past 3 days.

Please, help me with this.


Invalid HTTP_HOST header: '35.192.28.182'. You may need to add
'35.192.28.182' to ALLOWED_HOSTS.

Report at /SQlite/main.php

Invalid HTTP_HOST header: '35.192.28.182'. You may need to add
'35.192.28.182' to ALLOWED_HOSTS.

Request Method: GET
Request URL: https://35.192.28.182/SQlite/main.php

Django Version: 2.2.8
Python Executable: /home/hello/wsp/env/bin/python3
Python Version: 3.6.9
Python Path: ['/home/hello/wsp', '/home/hello/wsp/env/bin',
'/usr/lib/python36.zip', '/usr/lib/python3.6',
'/usr/lib/python3.6/lib-dynload',
'/home/hello/wsp/env/lib/python3.6/site-packages']
Server time: Sun, 3 May 2020 19:22:55 +
Show quoted text
HTTP_ACCEPT =
'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9'
HTTP_ACCEPT_ENCODING = 'gzip, deflate, br'
HTTP_ACCEPT_LANGUAGE = 'en-GB,en-US;q=0.9,en;q=0.8,ig;q=0.7'
HTTP_CONNECTION = 'close'
HTTP_COOKIE =
'csrftoken=mX6nNccvMIycyGeE4tF0hciqwfsccdaK8X8ZDt8YgimJeQYTjQFjxfB4YGNCZ9Ik;
sessionid=mbmg0dvoz2tebman7ereia9eue59wto7'
HTTP_HOST = '35.192.28.182'
HTTP_SAVE_DATA = 'on'

HTTP_SEC_FETCH_DEST = 'document'
HTTP_SEC_FETCH_MODE = 'navigate'
HTTP_SEC_FETCH_SITE = 'none'
HTTP_UPGRADE_INSECURE_REQUESTS = '1'
HTTP_USER_AGENT = 'Mozilla/5.0 (Linux; Android 9; SM-A307FN)
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.117 Mobile
Safari/537.36'
HTTP_X_FORWARDED_FOR = '197.211.61.210'
HTTP_X_FORWARDED_PROTO = 'https'
HTTP_X_REAL_IP = '197.211.61.210'
PATH_INFO = '/SQlite/main.php'
QUERY_STRING = ''
RAW_URI = '/SQlite/main.php'
REMOTE_ADDR = ''
REQUEST_METHOD = 'GET'
SCRIPT_NAME = ''
SERVER_NAME = '35.192.28.182'
SERVER_PORT = '443'
SERVER_PROTOCOL = 'HTTP/1.0'
SERVER_SOFTWARE = 'gunicorn/20.0.4'
gunicorn.socket = 
wsgi.errors = 
wsgi.file_wrapper = ''
wsgi.input = 




kind  regards*,*

Miracle.

-- 
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/CADZv-jBZojn_UhiYUgPZiP2tvcYnmggOVq24nUbCXCX_D0990A%40mail.gmail.com.


Re: django.urls.exceptions.NoReverseMatch

2019-12-19 Thread Miracle
Check your codes very well ' editChange' might still be there.

On Thu, 19 Dec 2019, 5:55 pm Jorge Gimeno,  wrote:

>
>
> On Wed, Dec 18, 2019, 10:20 PM Chetan Rokade 
> wrote:
>
>> Hi Friends,
>> getting below error :
>> "django.urls.exceptions.NoReverseMatch: Reverse for 'EditChange' not
>> found. 'EditChange' is not a valid view function or pattern name."
>>
>> I have removed EditChange tag/string from all files in my project. 1) app
>> level urls.py ,  2) views.py   3) base.html  4) app level changes.html
>>
>> still getting the same error. please help 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/67cadc7f-e82e-4971-8719-124d01414803%40googlegroups.com
>> 
>> .
>>
>
>
> Would you please copy and paste the entire traceback here? It will help us
> see what's going on.
>
> -Jorge
>
>> --
> 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/CANfN%3DK8qXRcQwRAZBhTAi7ZydAQHeTUcGQ4XOeeY7A4Egbua7Q%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/CADZv-jB8OJ9PFoaTyWXH8qwUfbergdkwurqYvPxRAC8oWO8MTA%40mail.gmail.com.


Re: Multiple Apps in one project with one database

2019-12-11 Thread Miracle
Multiple Apps can point to one database.

What happens is that django creates different tables in the database.

It uses this format to create the tables

'appname_modelname'

e.g.  polls_question


Infact, if you  remember earlier on before runnung your first "python
manage.py migrate".  Django told you that you had "unapplied migrations"

When you applied the migrations you might have noticed some other tables
were created in the database. Tables like auth, session, admin, etc



On Wed, 11 Dec 2019, 10:52 am Bruckner de Villiers, <
bruckner.devilli...@gmail.com> wrote:

> I got to generic views (CBV’s) in part 4 of the Django tutorials and
> decided instead of overwriting  the function views that I would get some
> practice by creating a new app (polls2).  The file structure is identical
> to the polls app, but obviously the code is different for the generic views
> and urls now pointing to polls2.  I ran migrate and makemigrations.  The
> makemigrations surprised me as it created Question & Choice tables again:
>
> (pyfun) Bruckners-MacBook-Pro:mysite brucknerdevilliers$ python manage.py
> makemigrations
>
> Migrations for 'polls2':
>
>   polls2/migrations/0001_initial.py
>
> - Create model Question
>
> - Create model Choice
>
> (pyfun) Bruckners-MacBook-Pro:mysite brucknerdevilliers$ python manage.py
> migrate
>
> Operations to perform:
>
>   Apply all migrations: admin, auth, contenttypes, polls, polls2, sessions
>
> Running migrations:
>
>   Applying polls2.0001_initial... OK
>
> So, I looked at the folders and there is only one sqlite3 file.  The
> Database Structure is unchanged and the original data is still intact.  The
> admin page now displays 2 Question tables – the 2nd one contains no
> data.  Also, http://127.0.0.1:8000/polls2/ shows No Questions available.
>
>
>
>
>
>
>
> I have probably messed up with models.py.  Any pointers please as how
> multiple apps can point to the same database?
>
> Regards,
>
> Bruckner de Villiers
>
> +27(0)83 625 1086
>
> --
> 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/63C629FA-DB68-4CC0-989D-1D346632CD94%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/CADZv-jDYH3c%2Brx-d%2BE9C50cCkFnsb80YztQ8V1RXQ_rLEfqojg%40mail.gmail.com.


Re: SuperUser not logging out after reboot

2019-12-11 Thread Miracle
Hello,

If you don't want to be logged in, you can simply log out before closing
the local server.
Another way is to tell your browser not to save the password whenever you
are logging in.


I suppose you have atleast one email account or social media account. And I
believe it logs you in automatically even after reboot.

In a nutshell, this is an expected behaviour.

 You can also clear the clear your browser cache for the page with "shift +
F5"

Regards


On Wed, 11 Dec 2019, 10:20 am Bruckner de Villiers, <
bruckner.devilli...@gmail.com> wrote:

> Running Django 3, Python 3.7.3, Chrome Browser on MacOS Catalina.
>
>
>
> All the code and db are on an external Volume.
>
>
>
> After a reboot (Restart on Mac), http://127.0.0.1:8000/admin/ displayed
> the admin page without requesting a login.  Not good for serious apps.
> Probably something in my Chrome setup.  Is there a way to log out a user
> automatically after a set period of time?
>
>
>
> Much obliged,
>
>
>
> Bruckner de Villiers
>
> 083 625 1086
>
> --
> 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/B80B7331-65D7-41DE-A22E-601A764E6A07%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/CADZv-jACi8PXe5Q%2BtXWZ9YvD2UkfdGcbwc686qY03Bv-1FB9sA%40mail.gmail.com.


Re: Why is the Django server running even when pytlinter shows that there's some bug in the code?

2019-12-05 Thread Miracle
Just like Daniel Hepper said,

pylint-django solves most of the linting problems you will encounter with
django.

Install it and you're good to go.

On Wed, 4 Dec 2019, 9:23 am Bruckner de Villiers, <
bruckner.devilli...@gmail.com> wrote:

> Which tutorial are you following?  Is it any good?
>
>
>
> Bruckner de Villiers
>
> 083 625 1086
>
>
>
> *From: * on behalf of Aaryan Dewan <
> dewanaar...@gmail.com>
> *Reply to: *
> *Date: *Tuesday, 03 December 2019 at 16:52
> *To: *Django users 
> *Subject: *Re: Why is the Django server running even when pytlinter shows
> that there's some bug in the code?
>
>
>
> Thanks! :)
>
> On Tuesday, December 3, 2019 at 7:00:18 PM UTC+5:30, Bruckner de Villiers
> wrote:
>
> I had the same issue and after trying various weird solutions on
> Stackoverflow, none of which worked, I found this simple solution – add
> this comment code to each line giving the error and it magically disappears:
>
>
>
> *# pylint: disable=no-member*
>
>
>
>
>
> Bruckner de Villiers
>
> 083 625 1086
>
>
>
> *From: * on behalf of Aaryan Dewan <
> dewan...@gmail.com>
> *Reply to: *
> *Date: *Tuesday, 03 December 2019 at 14:34
> *To: *Django users 
> *Subject: *Why is the Django server running even when pytlinter shows
> that there's some bug in the code?
>
>
>
> I was just following this tutorial, on how to make Django apps and how to
> display a database to the user. I created a simple database in models.py
> and then, I defined a function in views.py, which used Item.objects.all().
> Now Pylinter says that* 'Item' has no 'objects' member*!
>
> So this should prevent the server from running ( as its a bug after all!),
> but if I type in *python manage.py runserver,* the terminal shows no
> error and the server starts functioning.
>
>
>
> Please see the photo attachment to get a clearer view of the problem!
>
> --
> 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/6428642e-3d7d-4d95-b387-0894c8410897%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/29ca61e2-640f-4e9e-8264-0bb691d0729c%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/02691AA0-A6E1-4A40-8EEF-8BC16196C72A%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/CADZv-jA_u7kX2iUwwy%2B1cNuBhf_t6posU2%3D_qGHYx7ryj4H06Q%40mail.gmail.com.