problems with url and views - new to django

2019-04-21 Thread Rob W
setting up a new project.
all good, loaded up the project on localhost.

however, when creating a view then setting the url, it doesn't work.


*urls.py*

from django.contrib import admin
from django.urls import path

urlpatterns = [
path('admin/', admin.site.urls),
path('hello/', lct_app.site.urls),
   

*views.py*

from django.shortcuts import render

def hello(request):
   return render(request, "lct_app/templates/hello.html", {})

i comment out the path in urls.py, django comes back. what am i missing?



-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/4872beca-597c-4689-a12e-9e888c5266ca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Unable to create the django_migrations table (ORA-00907: missing right parenthesis)

2019-04-27 Thread Rob W
Can you send a copy of your models.py or a copy/paste of the class that shows 
the error?



> On Apr 27, 2019, at 4:41 PM, tossouwisdom  wrote:
> 
> django.db.migrations.exceptions.MigrationSchemaMissing: Unable to create the 
> django_migrations table (ORA-00907: missing right parenthesis)
> 
> Le samedi 27 avril 2019 19:56:34 UTC, tossouwisdom a écrit :
> Django 2.2.2
> Cx_oracle 7.2
> base Oracle 11g
> 
> When I run the django migrate commande, i have error 
> django.db.migrations.exceptions.MigrationSchemaMissing: Unable to create the 
> django_migrations table (ORA-00907: missing right parenthesis)
>   Operations to perform:
>   Apply all migrations: admin, auth, contenttypes, sessions
> Running migrations:
> Traceback (most recent call last):
>   File "C:\Python37-32\lib\site-packages\django\db\backends\utils.py", line 
> 82, in _execute
> return self.cursor.execute(sql)
>   File "C:\Python37-32\lib\site-packages\django\db\backends\oracle\base.py", 
> line 510, in execute
> return self.cursor.execute(query, self._param_generator(params))
> cx_Oracle.DatabaseError: ORA-00907: missing right parenthesis
> 
> The above exception was the direct cause of the following exception:
> 
> Traceback (most recent call last):
>   File "C:\Python37-32\lib\site-packages\django\db\migrations\recorder.py", 
> line 67, in ensure_schema
> editor.create_model(self.Migration)
>   File "C:\Python37-32\lib\site-packages\django\db\backends\base\schema.py", 
> line 307, in create_model
> self.execute(sql, params or None)
>   File "C:\Python37-32\lib\site-packages\django\db\backends\base\schema.py", 
> line 137, in execute
> cursor.execute(sql, params)
>   File "C:\Python37-32\lib\site-packages\django\db\backends\utils.py", line 
> 99, in execute
> return super().execute(sql, params)
>   File "C:\Python37-32\lib\site-packages\django\db\backends\utils.py", line 
> 67, in execute
> return self._execute_with_wrappers(sql, params, many=False, 
> executor=self._execute)
>   File "C:\Python37-32\lib\site-packages\django\db\backends\utils.py", line 
> 76, in _execute_with_wrappers
> return executor(sql, params, many, context)
>   File "C:\Python37-32\lib\site-packages\django\db\backends\utils.py", line 
> 84, in _execute
> return self.cursor.execute(sql, params)
>   File "C:\Python37-32\lib\site-packages\django\db\utils.py", line 89, in 
> __exit__
> raise dj_exc_value.with_traceback(traceback) from exc_value
>   File "C:\Python37-32\lib\site-packages\django\db\backends\utils.py", line 
> 82, in _execute
> return self.cursor.execute(sql)
>   File "C:\Python37-32\lib\site-packages\django\db\backends\oracle\base.py", 
> line 510, in execute
> return self.cursor.execute(query, self._param_generator(params))
> django.db.utils.DatabaseError: ORA-00907: missing right parenthesis
> 
> During handling of the above exception, another exception occurred:
> 
> Traceback (most recent call last):
>   File "manage.py", line 21, in 
> main()
>   File "manage.py", line 17, in main
> execute_from_command_line(sys.argv)
>   File "C:\Python37-32\lib\site-packages\django\core\management\__init__.py", 
> line 381, in execute_from_command_line
> utility.execute()
>   File "C:\Python37-32\lib\site-packages\django\core\management\__init__.py", 
> line 375, in execute
> self.fetch_command(subcommand).run_from_argv(self.argv)
>   File "C:\Python37-32\lib\site-packages\django\core\management\base.py", 
> line 323, in run_from_argv
> self.execute(*args, **cmd_options)
>   File "C:\Python37-32\lib\site-packages\django\core\management\base.py", 
> line 364, in execute
> output = self.handle(*args, **options)
>   File "C:\Python37-32\lib\site-packages\django\core\management\base.py", 
> line 83, in wrapped
> res = handle_func(*args, **kwargs)
>   File 
> "C:\Python37-32\lib\site-packages\django\core\management\commands\migrate.py",
>  line 234, in handle
> fake_initial=fake_initial,
>   File "C:\Python37-32\lib\site-packages\django\db\migrations\executor.py", 
> line 91, in migrate
> self.recorder.ensure_schema()
>   File "C:\Python37-32\lib\site-packages\django\db\migrations\recorder.py", 
> line 69, in ensure_schema
> raise MigrationSchemaMissing("Unable to create the django_migrations 
> table (%s)" % exc)
> django.db.migrations.exceptions.MigrationSchemaMissing: Unable to create the 
> django_migrations table (ORA-00907: missing right parenthesis)
> 
> -- 
> 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 post to this group, send email to django-users@googlegroups.com 
> .
> Visit this group at https://groups.google.com/group/django-users 
> .
> To view 

Re: help with URLS.PY

2019-05-03 Thread Rob W
It does not, I changed the name, stil the same error



> On May 2, 2019, at 8:23 PM, Abishek Goda  wrote:
> 
> 
> Hi,
> 
>> 
>> As I said, the dashboard.html works, i just want another menu option to load 
>> the other html file. i have commented this out as it causes my app to break.
> So the issue is with the map url. Can you try to use a different name? 
>> 
>> #path('map/', Map.as_view(), name='map'),   
> path(‘map/‘, Map.as_view(), name=‘map-link’),
> 
> Or something like that?
> 
> Probably silly, but map is also a builtin. Maybe it conflicts?
> 
> Abishek
> 
> -- 
> 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 post to this group, send email to django-users@googlegroups.com 
> .
> Visit this group at https://groups.google.com/group/django-users 
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/06C0F9E2-7E76-4571-8338-4BEFFB816100%40gmail.com
>  
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/9161767E-FDA3-4329-87D3-B2D0C43F8222%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: help with URLS.PY

2019-05-03 Thread Rob W
Sure.

Here is my urls.py

from django.conf.urls import url
from django.contrib import admin
from django.urls import path

from vr_reporting_app.views import HomeView
from vr_reporting_app.views import Local
from vr_reporting_app.views import User
from vr_reporting_app.views import School


urlpatterns = [
path('', HomeView.as_view(), name='home'),
path('User/', User.as_view(), name='user'),
path('Local/', Local.as_view(), name='local'),
path('School/', School.as_view(), name='school'),   
   
path('admin/', admin.site.urls),
]

Here is my view.py

from django.shortcuts import render
from django.views.generic.base import TemplateView

class HomeView(TemplateView):
template_name = 'dashboard.html'

class Local(TemplateView):
template_name = 'local.html'

class User(TemplateView):
template_name = 'user.html'

class School(TemplateView):
template_name = ‘schoolreporting.html'

Also had to add {% load staticfiles %} to my html pages
And added a tag to each css reference.



> On May 3, 2019, at 2:23 PM, anchal agarwal  wrote:
> 
> I am also facing the same issue ,can you tell me how you resolved this issue?
> On 03-May-2019 9:57 pm,  > wrote:
> >
> > I resolved this.
> >
> >
> > On Thursday, May 2, 2019 at 5:21:59 PM UTC-4, randmw...@gmail.com 
> >  wrote:
> >>
> >> new to django. so i have an app that displays an html page. i also have a 
> >> menu on that page that will load up other html pages.
> >> however, when i add the path to urls.py and then the class def in views, 
> >> it fails. i know it's something simple, what am i missing. 
> >>
> >> As I said, the dashboard.html works, i just want another menu option to 
> >> load the other html file. i have commented this out as it causes my app to 
> >> break.
> >>
> >>
> >>
> >> urls.py
> >>
> >> from django.conf.urls import url
> >> from django.contrib import admin
> >> from django.urls import path
> >>
> >> from vr_reporting_app.views import HomeView
> >> from vr_reporting_app.views import Map
> >>
> >> urlpatterns = [
> >> path('', HomeView.as_view(), name='home'),#points to the view in 
> >> views.py 
> >> #path('map/', Map.as_view(), name='map'),  
> >> 
> >> path('admin/', admin.site.urls),
> >> ]
> >>
> >>
> >> views.py
> >>
> >> from django.shortcuts import render
> >> from django.views.generic.base import TemplateView
> >>
> >> class HomeView(TemplateView):
> >> template_name = 'dashboard.html'
> >>
> >> class Map(TemplateView):
> >> template_name = 'map.html'
> >
> > -- 
> > 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 post to this group, send email to django-users@googlegroups.com 
> > .
> > Visit this group at https://groups.google.com/group/django-users 
> > .
> > To view this discussion on the web visit 
> > https://groups.google.com/d/msgid/django-users/1e5029d2-a431-4c60-95ec-5ffedb11c124%40googlegroups.com
> >  
> > .
> >
> > For more options, visit https://groups.google.com/d/optout 
> > .
> 
> 
> -- 
> 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 post to this group, send email to django-users@googlegroups.com 
> .
> Visit this group at https://groups.google.com/group/django-users 
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/CAMT%3DisXmbb6S1S6jjkowmgPfKjCYtF%2BPyYca9kOA5ZAdyi23zg%40mail.gmail.com
>  
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
htt

Re: django project

2019-05-06 Thread Rob W
Yes, I’m a beginner too, but need to get it completed.  The first piece should 
not be too difficult.



> On May 6, 2019, at 10:32 AM, fazal rehman  wrote:
> 
> Is it for beginners ?
> 
> On Mon 6 May, 2019, 8:01 PM ,  > wrote:
> I am looking for 2 people to work with me on a django project.
> 
> if you are interested, email me.
> 
> randmwhee...@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 post to this group, send email to django-users@googlegroups.com 
> .
> Visit this group at https://groups.google.com/group/django-users 
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/a86f0b6a-069b-49ec-98d1-7a9e74efbb24%40googlegroups.com
>  
> .
> For more options, visit https://groups.google.com/d/optout 
> .
> 
> -- 
> 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 post to this group, send email to django-users@googlegroups.com 
> .
> Visit this group at https://groups.google.com/group/django-users 
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/CAG9Y3D8ekKsrZZ7x1gZ-zWCLJ56Uo1GHaPoiqRKsim-d5xhXcQ%40mail.gmail.com
>  
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/B908B907-A71A-4EC5-8910-39778B9118B9%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: django project

2019-05-06 Thread Rob W
https://drive.google.com/file/d/1rxXhfNVYq8mapSeaEapuLLsfPc4eaNDR/view?usp=sharing

> On May 6, 2019, at 10:41 AM, Pushkar Bhuse  wrote:
> 
> Please send me the details too.
> 
> On Mon, 6 May 2019 at 8:05 PM, fazal rehman  <mailto:fazalrehman...@gmail.com>> wrote:
> Send me the details..
> 
> On Mon 6 May, 2019, 8:04 PM Rob W,  <mailto:randmwhee...@gmail.com>> wrote:
> Yes, I’m a beginner too, but need to get it completed.  The first piece 
> should not be too difficult.
> 
> 
> 
>> On May 6, 2019, at 10:32 AM, fazal rehman > <mailto:fazalrehman...@gmail.com>> wrote:
>> 
>> Is it for beginners ?
>> 
>> On Mon 6 May, 2019, 8:01 PM , > <mailto:randmwhee...@gmail.com>> wrote:
>> I am looking for 2 people to work with me on a django project.
>> 
>> if you are interested, email me.
>> 
>> randmwhee...@gmail.com <mailto:randmwhee...@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 
>> <mailto:django-users+unsubscr...@googlegroups.com>.
>> To post to this group, send email to django-users@googlegroups.com 
>> <mailto:django-users@googlegroups.com>.
>> Visit this group at https://groups.google.com/group/django-users 
>> <https://groups.google.com/group/django-users>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/a86f0b6a-069b-49ec-98d1-7a9e74efbb24%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/django-users/a86f0b6a-069b-49ec-98d1-7a9e74efbb24%40googlegroups.com?utm_medium=email&utm_source=footer>.
>> For more options, visit https://groups.google.com/d/optout 
>> <https://groups.google.com/d/optout>.
>> 
>> -- 
>> 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 
>> <mailto:django-users+unsubscr...@googlegroups.com>.
>> To post to this group, send email to django-users@googlegroups.com 
>> <mailto:django-users@googlegroups.com>.
>> Visit this group at https://groups.google.com/group/django-users 
>> <https://groups.google.com/group/django-users>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/CAG9Y3D8ekKsrZZ7x1gZ-zWCLJ56Uo1GHaPoiqRKsim-d5xhXcQ%40mail.gmail.com
>>  
>> <https://groups.google.com/d/msgid/django-users/CAG9Y3D8ekKsrZZ7x1gZ-zWCLJ56Uo1GHaPoiqRKsim-d5xhXcQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.
>> For more options, visit https://groups.google.com/d/optout 
>> <https://groups.google.com/d/optout>.
> 
> 
> -- 
> 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 
> <mailto:django-users+unsubscr...@googlegroups.com>.
> To post to this group, send email to django-users@googlegroups.com 
> <mailto:django-users@googlegroups.com>.
> Visit this group at https://groups.google.com/group/django-users 
> <https://groups.google.com/group/django-users>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/B908B907-A71A-4EC5-8910-39778B9118B9%40gmail.com
>  
> <https://groups.google.com/d/msgid/django-users/B908B907-A71A-4EC5-8910-39778B9118B9%40gmail.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.
> 
> -- 
> 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 
> <mailto:django-users+unsubscr...@googlegroups.com>.
> To post to this group, send email to django-users@googlegroups.com 
> <mailto:django-users@googlegroups.com>.
> Visit this group at https://groups.google.com/group/django-users 
> <https://groups.google.com/group/django-users>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/CAG9Y3D8N%2BExowW%3D6U6Wur75rTx-vEbGpKLF9%2BqPvt%2BNNNehs1Q%40mail.gmail.com

Need help with project

2019-05-08 Thread Rob W
There are a few of us in a group slack who are trying to build a working 
production django ap for reporting. 
We are looking for someone who really knows Django to guide us through this 
project.

We are all really hoping that someone will be kind enough to guide us and 
help us build this app.

it's simple, we are connecting to a remote mysql db, which i also setup in 
Azure for sync purposes.

so we are creating a login capability, reset, forgot password, etc.

then on the dashboard we simply want to generate reporting from this remote 
db.

I am hopeful someone will help us.


-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/c33feee5-4001-4bf1-b8e8-0f0c9c9517c2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


reporting

2019-05-09 Thread Rob W
whats the best web reporting tool to use that easy and will easily 
integrate with 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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/3ed0186f-a05b-4bff-8fcd-349b7ba762e0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


problems with mysql client

2019-05-11 Thread Rob W
for my django project, we are using mysql.

no matter how i try to install it, python-mysqldb, or just pip install 
mysqlclient, it fails.

i've installed mysqlconnector, i've tried everything. 

any suggestions ?


Collecting mysqlclient

  Downloading 
https://files.pythonhosted.org/packages/f4/f1/3bb6f64ca7a429729413e6556b7ba5976df06019a5245a43d36032f1061e/mysqlclient-1.4.2.post1.tar.gz
 
(85kB)

 || 92kB 1.3MB/s 

ERROR: Complete output from command python setup.py egg_info:

ERROR: /bin/sh: mysql_config: command not found

Traceback (most recent call last):

  File "", line 1, in 

  File "/private/tmp/pip-install-suhqq3eh/mysqlclient/setup.py", line 
16, in 

metadata, options = get_config()

  File "/private/tmp/pip-install-suhqq3eh/mysqlclient/setup_posix.py", 
line 51, in get_config

libs = mysql_config("libs")

  File "/private/tmp/pip-install-suhqq3eh/mysqlclient/setup_posix.py", 
line 29, in mysql_config

raise EnvironmentError("%s not found" % (_mysql_config_path,))

OSError: mysql_config not found



ERROR: Command "python setup.py egg_info" failed with error code 1 in 
/private/tmp/pip-install-suhqq3eh/mysqlclient/

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/31f86e65-7e0a-49c7-b574-1670fba1ca18%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: problems with mysql client

2019-05-12 Thread Rob W
I did, but believe it or not, that install fails too.


> On May 11, 2019, at 12:12 PM, Jorge Gimeno  wrote:
> 
> Rob,
> 
> On the off chance you haven't seen it, I found a Stack Overflow question on 
> this:  
> https://stackoverflow.com/questions/25459386/mac-os-x-environmenterror-mysql-config-not-found
>  
> <https://stackoverflow.com/questions/25459386/mac-os-x-environmenterror-mysql-config-not-found>.
>  Unfortunately, I don't know Mac OS all that well to offer more help than 
> that.
> 
> -Jorge
> 
> On Sat, May 11, 2019 at 9:04 AM Rob Gmail  <mailto:randmwhee...@gmail.com>> wrote:
> Mac OS 
> 
> Rob 
> 203-671-6514
> Sent from my mobile device, please excuse the typos. 
> 
> On May 11, 2019, at 11:42 AM, Jorge Gimeno  <mailto:jlgimen...@gmail.com>> wrote:
> 
>> 
>> 
>> On Sat, May 11, 2019 at 8:16 AM Rob W > <mailto:randmwhee...@gmail.com>> wrote:
>> for my django project, we are using mysql.
>> 
>> no matter how i try to install it, python-mysqldb, or just pip install 
>> mysqlclient, it fails.
>> 
>> i've installed mysqlconnector, i've tried everything. 
>> 
>> any suggestions ?
>> 
>> 
>> Collecting mysqlclient
>> 
>>   Downloading 
>> https://files.pythonhosted.org/packages/f4/f1/3bb6f64ca7a429729413e6556b7ba5976df06019a5245a43d36032f1061e/mysqlclient-1.4.2.post1.tar.gz
>>  
>> <https://files.pythonhosted.org/packages/f4/f1/3bb6f64ca7a429729413e6556b7ba5976df06019a5245a43d36032f1061e/mysqlclient-1.4.2.post1.tar.gz>
>>  (85kB)
>> 
>>  || 92kB 1.3MB/s 
>> 
>> ERROR: Complete output from command python setup.py egg_info:
>> 
>> ERROR: /bin/sh: mysql_config: command not found
>> 
>> Traceback (most recent call last):
>> 
>>   File "", line 1, in 
>> 
>>   File "/private/tmp/pip-install-suhqq3eh/mysqlclient/setup.py", line 
>> 16, in 
>> 
>> metadata, options = get_config()
>> 
>>   File "/private/tmp/pip-install-suhqq3eh/mysqlclient/setup_posix.py", 
>> line 51, in get_config
>> 
>> libs = mysql_config("libs")
>> 
>>   File "/private/tmp/pip-install-suhqq3eh/mysqlclient/setup_posix.py", 
>> line 29, in mysql_config
>> 
>> raise EnvironmentError("%s not found" % (_mysql_config_path,))
>> 
>> OSError: mysql_config not found
>> 
>> 
>> 
>> ERROR: Command "python setup.py egg_info" failed with error code 1 in 
>> /private/tmp/pip-install-suhqq3eh/mysqlclient/
>> 
>> 
>> -- 
>> 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 
>> <mailto:django-users+unsubscr...@googlegroups.com>.
>> To post to this group, send email to django-users@googlegroups.com 
>> <mailto:django-users@googlegroups.com>.
>> Visit this group at https://groups.google.com/group/django-users 
>> <https://groups.google.com/group/django-users>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/31f86e65-7e0a-49c7-b574-1670fba1ca18%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/django-users/31f86e65-7e0a-49c7-b574-1670fba1ca18%40googlegroups.com?utm_medium=email&utm_source=footer>.
>> For more options, visit https://groups.google.com/d/optout 
>> <https://groups.google.com/d/optout>.
>> 
>> Rob,
>> 
>> What operating system are you using?
>> 
>> -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 
>> <mailto:django-users+unsubscr...@googlegroups.com>.
>> To post to this group, send email to django-users@googlegroups.com 
>> <mailto:django-users@googlegroups.com>.
>> Visit this group at https://groups.google.com/group/django-users 
>> <https://groups.google.com/group/django-users>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/CANfN%3DK-vw16fWxhZYa3f8VP6t6cCi5BA%2BoNtjmof99CQWNKb-Q%40mail.gmail.com
>>  
>> <https://g

Re: could not connect to server: Connection refused Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432?

2019-05-16 Thread Rob W
First, you should not share your password to your server to anyone….thats very 
dangerous.  Now anyone can log in to your server with nefarious intentions.  
Be more careful.

But it sounds like something on the server is blocking your connection.  

> On May 16, 2019, at 8:57 AM, omar ahmed  wrote:
> 
> hii ..
> i try to publish my first project on python anywhere but it still not working 
> and this is my error :
> could not connect to server: Connection refused Is the server running on host 
> "localhost" (::1) and accepting TCP/IP connections on port 5432? could not 
> connect to server: Connection refused Is the server running on host 
> "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432? could 
> not connect to server: Connection refused Is the server running on host 
> "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432?
> 
> and this is my db settings  :
> 
> DATABASES = {
> 'default': {
> 'ENGINE': 'django.db.backends.postgresql_psycopg2',
> 'NAME': 'arena',
> 'USER': 'arenadbuser',
> 'PASSWORD': 'mlo9**@la',
> 'HOST': 'localhost',
> 'PORT': '',
> }
> }
> 
> -- 
> 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 post to this group, send email to django-users@googlegroups.com 
> .
> Visit this group at https://groups.google.com/group/django-users 
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/93204eb8-f5e3-43bf-98ff-b79478bce544%40googlegroups.com
>  
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/04731D2F-C4EA-4716-969E-71994AF2EB11%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Djano rest api

2019-06-12 Thread Rob W
Hi all,

I need to see a django rest api, with proper endpoint design - REST-ish by 
using paths, HTTP methods, response codes, JSONs, errors returned in JSON,

Anyone have this already completed that I can take a look at?

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/DE361A10-F522-421D-94EC-56473F1D01FA%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Question about makemigrations

2019-06-21 Thread Rob W
"Migrate is basically the old syncdb but it takes into account all the 
migrations made by makemigrations. You should run the command -migrate- after 
adding a new app under the INSTALLED APPS section in the settings.py file in 
order to synchronize the database state with your current set of models.”



> On Jun 21, 2019, at 7:49 AM, Martin Kong  wrote:
> 
> Hello 
> 
> I make python manage.py migrate instead,but that should be the next step tho
> 
> Regards 
> Martin
> 
> On Fri, 21 Jun 2019 at 7:45 PM, Sebastian Jung  > wrote:
> Hello,
> 
> Do you make python3 manage.py migrate after makemigrations?
> 
> Regards
> 
> Martin Kong mailto:cok...@gmail.com>> schrieb am Fr., 21. 
> Juni 2019, 13:25:
> Hello 
> I am new to django, and i am following the tutorial provide in github, from 
> the tutorial.
> The tutorial I am following is 
> https://github.com/django/django/blob/master/docs/intro/tutorial02.txt 
> 
> 
> and  start from 227, it shows the following instructions:
> 
> 
> .. console::
> 
> $ python manage.py makemigrations polls
> 
> You should see something similar to the following:
> 
> .. code-block:: text
> 
> Migrations for 'polls':
>   polls/migrations/0001_initial.py:
> - Create model Choice
> - Create model Question
> - Add field question to choice
> 
> However, after following the steps 
> I'm missing the last sentence (Add field question to choice) .
> 
> The below is what i had written in model.py, did i make something wrong?
> 
> Thanks
> from django.db import models
> 
> class Question(models.Model):
> question_text = models.CharField(max_length=200)
> pub_date = models.DateTimeField('date published')
> 
> class Choice(models.Model):
> question = models.ForeignKey(Question, on_delete=models.CASCADE)
> choice_text =  models.CharField(max_length=200)
> votes = models.IntegerField(default=0)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 post to this group, send email to django-users@googlegroups.com 
> .
> Visit this group at https://groups.google.com/group/django-users 
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/CADEd1fars051JXymX0sbktNqKYak%2Bejv9uc2fGxxxbJe2Cnp1w%40mail.gmail.com
>  
> .
> For more options, visit https://groups.google.com/d/optout 
> .
> 
> -- 
> 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 post to this group, send email to django-users@googlegroups.com 
> .
> Visit this group at https://groups.google.com/group/django-users 
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/CAKGT9mw6VfP_Ftrsz8iAGtXQ3mDXfeOgOxz7MfuYvejTNko8Gw%40mail.gmail.com
>  
> .
> For more options, visit https://groups.google.com/d/optout 
> .
> 
> -- 
> 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 post to this group, send email to django-users@googlegroups.com 
> .
> Visit this group at https://groups.google.com/group/django-users 
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/CADEd1fZCnF4B%3DqNB14jqzW16pZ8BqFfMqr4PJBuy_BiwxTpxgA%40mail.gmail.com
>  
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and