whats the use of setting mysite.settings to DJANGO_SETTINGS_MODULE?

2018-05-16 Thread Utpal Brahma
under manage.py #!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mysite.settings") try: from django.core.management import execute_from_command_line except ImportError: # The above import may

Re: New to Python

2018-05-16 Thread Larry Medina
Beautiful Soup works really well to help render HTML. I suppose you could scrape the website and save it as HTML. The module can be found here: https://www.crummy.com/software/BeautifulSoup/ On Tue, May 15, 2018 at 3:13 PM, Mo El wrote: > Hi there, > > I`m new to python and i have been watchin

Re: Standard approach

2018-05-16 Thread Mike Dewhirst
On 16/05/2018 9:50 PM, Paolo Chilosi wrote: It will be helpful to have a group/blog for Django beginner so we could share problems and solution, maybe this group is geared for more advance users. I don't think so. All levels of user should come here. I wasn't trying to split the community. Ev

Re: Django login() function works in production but not in development

2018-05-16 Thread pieceofkayk2718
Hey, Tonghua. Could you elaborate more on the shared set of databases? So yes, the login session is stored in the database. But wouldn't my two applications have two distinct database files? My reasoning would be due to having two distinct locations for my in-development copy and in-produc

Re: Error at login page of Django Admin

2018-05-16 Thread Stephen Farry
Hi Julio, Thanks a lot for the response! Unfortunately no, the deployment is done with wsgi and apache using shared hosting :(. I actually also get the error if I don't use the prefix (the mysite part was just a test) so that possibly means that the prefix isn't causing the issue, but I could easi

Re: Error at login page of Django Admin

2018-05-16 Thread Julio Biason
Hi Stephen, How are you deploying? Are you using uwsgi and nginx? 'Cause there is an option on the nginx document configuration that you an point to drop a prefix -- in this case, the "mysite/" prefix. If you don't use it, Django will receive the whole path, "/mysite/admin/login" and won't find it

Re: Error at login page of Django Admin

2018-05-16 Thread Stephen Farry
Hi James, Thanks for the reply. Yes, I did both of these (a few times to be sure!), but unfortunately it still doesn't seem to work. Actually the database itself seems to be working fine, it's just the admin that's the problem. Cheers, Stephen On Wednesday, 16 May 2018 17:00:01 UTC+1, James Fa

Re: Error at login page of Django Admin

2018-05-16 Thread James Farris
Did you run python manage.py migrate on your dev server? And create a super user (python manage.py createsuperuser) On Wed, May 16, 2018 at 8:06 AM Stephen Farry wrote: > Hi All, > > I have a peculiar issue with the admin on Django. Using the Django > development server, I can use the admin with

Re: Message from a django beginner user

2018-05-16 Thread Alejandro Barrera Aponte
Hi Francis, The tutorials from Traversy Media and Pretty Printed on youtube make for a very good starting point. Check them out! I've been learning Django for a few weeks and those tutorials have helped me scaffold my first 2 Django Projects. Best. 2018-05-15 13:39 GMT-04:00 Francis F. Massaq

Error at login page of Django Admin

2018-05-16 Thread Stephen Farry
Hi All, I have a peculiar issue with the admin on Django. Using the Django development server, I can use the admin without any issues at all. However, when I deploy it on the server, I still get the admin page, but when I try to log in I get a 404 error. I reduced this back to the tutorial, but

Re: Managing multiple user types in Django

2018-05-16 Thread Bill Torcaso
I inherited a system which has one User model, and a Profile model that is 1-to-1 with User. The type-of-user information is carried in a required "role" property in the Profile. I think that is a well-established approach. I am curious to hear what people think of the tradeoffs between (Use

Re: Message from a django beginner user

2018-05-16 Thread Gerardo Palazuelos Guerrero
Hi Subhani There many online resources, and free. When I started, I did the djangogirls tutorial. It worked really well for me (I had experience with other frameworks). It was for Django 1.11, but it is still relevant if you want to understand the overall concepts. I invite you to take a look

Re: django 2.0 tutorial :: exception:: application labels are not unique.

2018-05-16 Thread subhani shaik
Hi.. How can i create grocery app.can you please share that data. On Tuesday, May 15, 2018 at 7:10:33 PM UTC+5:30, Paolo Chilosi wrote: > > As new to Django I am learning following the tutorial carefully. When I > reached the point of making the migration for the polls app I executed > (from the

Re: Message from a django beginner user

2018-05-16 Thread subhani shaik
Hi... How can create an app.can you please share me app data(code). On Wed, May 16, 2018 at 5:46 AM, Gerald Brown wrote: > The best way to learn it is o jump in and start using it. Django has a > good tutorial on-line @ https://docs.djangoproject. > com/en/2.0/intro/tutorial01/. When you have

Re: Message from a django beginner user

2018-05-16 Thread ansh srivastav
If you are interested in learn by streaming, then you can go through with learncodeonline website by Hitesh Choudhary. Although it is a paid course but it would be awesome to learn from there from scratch. The link is this: https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uac

Re: django 2.0 tutorial :: exception:: application labels are not unique.

2018-05-16 Thread Daniel Hepper
That's definitely PyCharm, Django does not modify your settings file. I'm a big fan of PyCharm myself, but when following the tutorial, I would suggest using its more advanced features and use like a plain text editor to avoid any confusion. On Wed, May 16, 2018 at 2:00 PM, Paolo Chilosi wrote

Re: How to operate with two models in one view?

2018-05-16 Thread Daniel Roseman
On Tuesday, 15 May 2018 12:21:26 UTC+1, Anton Smirnov wrote: > > I have two models: "Sensors" with information about its and "Measurments" . > > class Sensor(models.Model): > date_start = models.DateField() > Latitude = models.DecimalField(max_digits=18, decimal_places=15) > Longitude

Re: django 2.0 tutorial :: exception:: application labels are not unique.

2018-05-16 Thread Paolo Chilosi
just a note on your note: I created a few more new project/app using PyCharm create facility and I found the app registered in the INSTALLED_APPS settings. I do not know if it is Django or PyCharm that introduce this setting. In the first case the Django tutorial documentation should be amended

Re: Standard approach

2018-05-16 Thread Paolo Chilosi
It will be helpful to have a group/blog for Django beginner so we could share problems and solution, maybe this group is geared for more advance users. On Tuesday, May 15, 2018 at 7:53:58 PM UTC-4, Mike Dewhirst wrote: > > This list gets a lot of new people joining. They come from all cultures