Unable to access mysql db and apply changes using "python manage.py migrate"

2019-02-02 Thread Emmanuel klutse
hello team, 
Can someone help me with the problem below please.
(py1) C:\djangoproject>python manage.py migrate
Traceback (most recent call last):
  File 
"C:\Users\Success\Envs\py1\lib\site-packages\django\db\backends\base\base.py", 
line 216, in ensure_connection
self.connect()
  File 
"C:\Users\Success\Envs\py1\lib\site-packages\django\db\backends\base\base.py", 
line 194, in connect
self.connection = self.get_new_connection(conn_params)
  File 
"C:\Users\Success\Envs\py1\lib\site-packages\django\db\backends\mysql\base.py", 
line 227, in get_new_connection
return Database.connect(**conn_params)
  File "C:\Users\Success\Envs\py1\lib\site-packages\MySQLdb\__init__.py", 
line 84, in Connect
return Connection(*args, **kwargs)
  File 
"C:\Users\Success\Envs\py1\lib\site-packages\MySQLdb\connections.py", line 
164, in __init__
super(Connection, self).__init__(*args, **kwargs2)
MySQLdb._exceptions.OperationalError: (1045, "Access denied for user 
'root'@'localhost' (using password: YES)")
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "manage.py", line 15, in 
execute_from_command_line(sys.argv)
  File 
"C:\Users\Success\Envs\py1\lib\site-packages\django\core\management\__init__.py",
 
line 381, in execute_from_command_line
utility.execute()
  File 
"C:\Users\Success\Envs\py1\lib\site-packages\django\core\management\__init__.py",
 
line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
  File 
"C:\Users\Success\Envs\py1\lib\site-packages\django\core\management\base.py", 
line 316, in run_from_argv
self.execute(*args, **cmd_options)
  File 
"C:\Users\Success\Envs\py1\lib\site-packages\django\core\management\base.py", 
line 350, in execute
self.check()
  File 
"C:\Users\Success\Envs\py1\lib\site-packages\django\core\management\base.py", 
line 379, in check
include_deployment_checks=include_deployment_checks,
  File 
"C:\Users\Success\Envs\py1\lib\site-packages\django\core\management\commands\migrate.py",
 
line 59, in _run_checks
issues = run_checks(tags=[Tags.database])
  File 
"C:\Users\Success\Envs\py1\lib\site-packages\django\core\checks\registry.py", 
line 71, in run_checks
new_errors = check(app_configs=app_configs)
  File 
"C:\Users\Success\Envs\py1\lib\site-packages\django\core\checks\database.py", 
line 10, in check_database_backends
issues.extend(conn.validation.check(**kwargs))
  File 
"C:\Users\Success\Envs\py1\lib\site-packages\django\db\backends\mysql\validation.py",
 
line 9, in check
issues.extend(self._check_sql_mode(**kwargs))
  File 
"C:\Users\Success\Envs\py1\lib\site-packages\django\db\backends\mysql\validation.py",
 
line 13, in _check_sql_mode
with self.connection.cursor() as cursor:
  File 
"C:\Users\Success\Envs\py1\lib\site-packages\django\db\backends\base\base.py", 
line 255, in cursor
return self._cursor()
  File 
"C:\Users\Success\Envs\py1\lib\site-packages\django\db\backends\base\base.py", 
line 232, in _cursor
self.ensure_connection()
  File 
"C:\Users\Success\Envs\py1\lib\site-packages\django\db\backends\base\base.py", 
line 216, in ensure_connection
self.connect()
  File "C:\Users\Success\Envs\py1\lib\site-packages\django\db\utils.py", 
line 89, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
  File 
"C:\Users\Success\Envs\py1\lib\site-packages\django\db\backends\base\base.py", 
line 216, in ensure_connection
self.connect()
  File 
"C:\Users\Success\Envs\py1\lib\site-packages\django\db\backends\base\base.py", 
line 194, in connect
self.connection = self.get_new_connection(conn_params)
  File 
"C:\Users\Success\Envs\py1\lib\site-packages\django\db\backends\mysql\base.py", 
line 227, in get_new_connection
return Database.connect(**conn_params)
  File "C:\Users\Success\Envs\py1\lib\site-packages\MySQLdb\__init__.py", 
line 84, in Connect
return Connection(*args, **kwargs)
  File 
"C:\Users\Success\Envs\py1\lib\site-packages\MySQLdb\connections.py", line 
164, in __init__
super(Connection, self).__init__(*args, **kwargs2)
django.db.utils.OperationalError: (1045, "Access denied for user 
'root'@'localhost' (using password: Y

-- 
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/86e71dbe-130c-44ac-8540-6670c7e6762f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Unable to access mysql db and apply changes using "python manage.py migrate"

2019-02-02 Thread Carsten Fuchs
Hi Emmanuel,

the error message is clear, isn't it?
(1045, "Access denied for user 'root'@'localhost' (using password: YES)")

Check your password. Use the mysql client to check.

Best regards,
Carsten


Am 02.02.19 um 10:07 schrieb Emmanuel klutse:
> hello team,
> Can someone help me with the problem below please.
> (py1) C:\djangoproject>python manage.py migrate
> Traceback (most recent call last):
>   File 
> "C:\Users\Success\Envs\py1\lib\site-packages\django\db\backends\base\base.py",
>  line 216, in ensure_connection
>     self.connect()
>   File 
> "C:\Users\Success\Envs\py1\lib\site-packages\django\db\backends\base\base.py",
>  line 194, in connect
>     self.connection = self.get_new_connection(conn_params)
>   File 
> "C:\Users\Success\Envs\py1\lib\site-packages\django\db\backends\mysql\base.py",
>  line 227, in get_new_connection
>     return Database.connect(**conn_params)
>   File "C:\Users\Success\Envs\py1\lib\site-packages\MySQLdb\__init__.py", 
> line 84, in Connect
>     return Connection(*args, **kwargs)
>   File "C:\Users\Success\Envs\py1\lib\site-packages\MySQLdb\connections.py", 
> line 164, in __init__
>     super(Connection, self).__init__(*args, **kwargs2)
> MySQLdb._exceptions.OperationalError: (1045, "Access denied for user 
> 'root'@'localhost' (using password: YES)")

-- 
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/e1ba1a10-e6d6-3d17-3531-34622305a595%40cafu.de.
For more options, visit https://groups.google.com/d/optout.


Re: Unable to access mysql db and apply changes using "python manage.py migrate"

2019-02-02 Thread Emmanuel klutse
hello Carsten Fuchs,
thanks for your feedback.
yes, i agree. but what i dont understand is that the command used "python 
manage.py migrate" is to creat a db for me in mysql instead of sqlite and 
the error is talking about authentication.
these are the changes made in my djangoproject/settings file:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'djangoproject',
'USER': 'root',
'PASSWORD': '123456',
'HOST': "localhost",
'PORT': ''
}
}
i'm confuse now.

On Saturday, February 2, 2019 at 1:11:38 AM UTC-8, Carsten Fuchs wrote:

> Hi Emmanuel, 
>
> the error message is clear, isn't it? 
> (1045, "Access denied for user 'root'@'localhost' (using password: YES)") 
>
> Check your password. Use the mysql client to check. 
>
> Best regards, 
> Carsten 
>
>
> Am 02.02.19 um 10:07 schrieb Emmanuel klutse: 
> > hello team, 
> > Can someone help me with the problem below please. 
> > (py1) C:\djangoproject>python manage.py migrate 
> > Traceback (most recent call last): 
> >   File 
> "C:\Users\Success\Envs\py1\lib\site-packages\django\db\backends\base\base.py",
>  
> line 216, in ensure_connection 
> > self.connect() 
> >   File 
> "C:\Users\Success\Envs\py1\lib\site-packages\django\db\backends\base\base.py",
>  
> line 194, in connect 
> > self.connection = self.get_new_connection(conn_params) 
> >   File 
> "C:\Users\Success\Envs\py1\lib\site-packages\django\db\backends\mysql\base.py",
>  
> line 227, in get_new_connection 
> > return Database.connect(**conn_params) 
> >   File 
> "C:\Users\Success\Envs\py1\lib\site-packages\MySQLdb\__init__.py", line 84, 
> in Connect 
> > return Connection(*args, **kwargs) 
> >   File 
> "C:\Users\Success\Envs\py1\lib\site-packages\MySQLdb\connections.py", line 
> 164, in __init__ 
> > super(Connection, self).__init__(*args, **kwargs2) 
> > MySQLdb._exceptions.OperationalError: (1045, "Access denied for user 
> 'root'@'localhost' (using password: YES)") 
>
>

-- 
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/8f32999b-3296-4043-a5c5-b4315eae9527%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Unable to access mysql db and apply changes using "python manage.py migrate"

2019-02-02 Thread Carsten Fuchs
Am 02.02.19 um 10:33 schrieb Emmanuel klutse:
> [...] creat a db for me in mysql instead of sqlite and the error is talking 
> about authentication.
> these are the changes made in my djangoproject/settings file:
> DATABASES = {
>     'default': {
>     'ENGINE': 'django.db.backends.mysql',

You are asking for mysql.

-- 
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/bb96f20e-ceb6-d26c-e30d-1f755b35c574%40cafu.de.
For more options, visit https://groups.google.com/d/optout.


Re: Unable to access mysql db and apply changes using "python manage.py migrate"

2019-02-02 Thread Emmanuel klutse


On Saturday, February 2, 2019 at 1:47:39 AM UTC-8, Carsten Fuchs wrote:
>
> Am 02.02.19 um 10:33 schrieb Emmanuel klutse: 
> > [...] creat a db for me in mysql instead of sqlite and the error is 
> talking about authentication. 
> > these are the changes made in my djangoproject/settings file: 
> > DATABASES = { 
> > 'default': { 
> > 'ENGINE': 'django.db.backends.mysql', 
>
> You are asking for mysql. 
>
>

-- 
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/bddd95c4-ab3f-4326-947f-0076fbe3c126%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Unable to access mysql db and apply changes using "python manage.py migrate"

2019-02-02 Thread Emmanuel klutse

yes im talking about using "python manage.py migrate" command to create 
tables in the db(djangoproject) i have already created in mysql server
On Saturday, February 2, 2019 at 2:09:53 AM UTC-8, Emmanuel klutse wrote:
>
>
>
> On Saturday, February 2, 2019 at 1:47:39 AM UTC-8, Carsten Fuchs wrote:
>>
>> Am 02.02.19 um 10:33 schrieb Emmanuel klutse: 
>> > [...] creat a db for me in mysql instead of sqlite and the error is 
>> talking about authentication. 
>> > these are the changes made in my djangoproject/settings file: 
>> > DATABASES = { 
>> > 'default': { 
>> yes im talking about using "python manage.py migrate" command to create 
>> tables in the db(djangoproject) i have already created in mysql server
>> > 'ENGINE': 'django.db.backends.mysql', 
>>
>> You are asking for mysql. 
>>
>>

-- 
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/4f5d7a7d-a15c-4e8a-baad-b14a090de3b7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Beginner

2019-02-02 Thread jake ksi
search github codingforentreponuers ecommerce

Sent from Mailspring 
(https://link.getmailspring.com/link/1549102582.local-9ef6665c-d01d-v1.5.5-b7939...@getmailspring.com/0?redirect=https%3A%2F%2Fgetmailspring.com%2F&recipient=ZGphbmdvLXVzZXJzQGdvb2dsZWdyb3Vwcy5jb20%3D),
 the best free email app for work
On Feb 1 2019, at 9:06 pm, Khushal Kumar  wrote:
> Hi everyone,
>
> Hope you are well. I am creating shopping cart app. But, I can't seem to 
> create the model for products since I need the product name to have different 
> sizes and each size to have different colors and in the end, the number of 
> products(in each of those sizes and colors). Also, how would I take to those 
> values from the user?
>
> Please let me know if you need any more information from me.
> 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 
> (https://link.getmailspring.com/link/1549102582.local-9ef6665c-d01d-v1.5.5-b7939...@getmailspring.com/1?redirect=mailto%3Adjango-users%2Bunsubscribe%40googlegroups.com&recipient=ZGphbmdvLXVzZXJzQGdvb2dsZWdyb3Vwcy5jb20%3D).
> To post to this group, send email to django-users@googlegroups.com 
> (https://link.getmailspring.com/link/1549102582.local-9ef6665c-d01d-v1.5.5-b7939...@getmailspring.com/2?redirect=mailto%3Adjango-users%40googlegroups.com&recipient=ZGphbmdvLXVzZXJzQGdvb2dsZWdyb3Vwcy5jb20%3D).
> Visit this group at https://groups.google.com/group/django-users 
> (https://link.getmailspring.com/link/1549102582.local-9ef6665c-d01d-v1.5.5-b7939...@getmailspring.com/3?redirect=https%3A%2F%2Fgroups.google.com%2Fgroup%2Fdjango-users&recipient=ZGphbmdvLXVzZXJzQGdvb2dsZWdyb3Vwcy5jb20%3D).
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/CAKOftJjROPOCfScJSEnCZ69TaPdTU7Ug%3DvWbAv%2BD9n%2Bfkyq%3DEQ%40mail.gmail.com
>  
> (https://link.getmailspring.com/link/1549102582.local-9ef6665c-d01d-v1.5.5-b7939...@getmailspring.com/4?redirect=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fdjango-users%2FCAKOftJjROPOCfScJSEnCZ69TaPdTU7Ug%253DvWbAv%252BD9n%252Bfkyq%253DEQ%2540mail.gmail.com%3Futm_medium%3Demail%26utm_source%3Dfooter&recipient=ZGphbmdvLXVzZXJzQGdvb2dsZWdyb3Vwcy5jb20%3D).
> For more options, visit https://groups.google.com/d/optout 
> (https://link.getmailspring.com/link/1549102582.local-9ef6665c-d01d-v1.5.5-b7939...@getmailspring.com/5?redirect=https%3A%2F%2Fgroups.google.com%2Fd%2Foptout&recipient=ZGphbmdvLXVzZXJzQGdvb2dsZWdyb3Vwcy5jb20%3D).
>

-- 
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/1549102582.local-9ef6665c-d01d-v1.5.5-b7939d38%40getmailspring.com.
For more options, visit https://groups.google.com/d/optout.


Re: Unable to access mysql db and apply changes using "python manage.py migrate"

2019-02-02 Thread Carsten Fuchs
Am 02.02.19 um 11:10 schrieb Emmanuel klutse:
> yes im talking about using "python manage.py migrate" command to create 
> tables in the db(djangoproject) i have already created in mysql server

`manage.py migrate` is trying to access your MySQL database, but the database 
denies the access to the user that is configured in your settings.
To fix this, you have to figure out why that is.

-- 
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/248b2ffc-85bf-fbd3-d0f8-f05e9bf34761%40cafu.de.
For more options, visit https://groups.google.com/d/optout.


Re: Unable to access mysql db and apply changes using "python manage.py migrate"

2019-02-02 Thread Emmanuel klutse
Thx a lot I will look into it n revert

On Sat, 2 Feb 2019 at 10:33 AM, Carsten Fuchs  wrote:

> Am 02.02.19 um 11:10 schrieb Emmanuel klutse:
> > yes im talking about using "python manage.py migrate" command to create
> tables in the db(djangoproject) i have already created in mysql server
>
> `manage.py migrate` is trying to access your MySQL database, but the
> database denies the access to the user that is configured in your settings.
> To fix this, you have to figure out why that is.
>
> --
> 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/248b2ffc-85bf-fbd3-d0f8-f05e9bf34761%40cafu.de
> .
> 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/CAAw18mDAwL%2BHugX%2BRVhvfauVBpb2jwKvyKSW36y-hoTytY9Y-A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Where is the data set of the Django documents demo models

2019-02-02 Thread Fogmoon
Hi,

I read Models and databases 
 section in 
the Django documents. I want to test the statement in the demos, but I can 
not find the data set of these demo models. 

Also other demos I meet the same issue, I can not test the statement which 
really affect I understand the demo and learn the topic.

So where I can find the demo data set which I can import my database and 
test the demos myself?

Please help me, Thanks very much.

Fogmoon.

-- 
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/3a410d2f-bebf-4190-a394-f1af2ec1e7c7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


I am newbie to Django REST,

2019-02-02 Thread shubham joshi
 How to use cookeicutter for setting up new project?

-- 
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/d8bacb8e-d73f-4264-8479-ace7243932ef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Looking for a Django Co-Founder.

2019-02-02 Thread Anh Nguyen
Hi, it there are still able to join ?

Sent from my iPhone

> On Jan 31, 2019, at 20:13, Alison  wrote:
> 
> Hi Zack,
> 
> Yes I am still interested.
> 
> Thanks
> Alison
> 
>> On Sunday, November 18, 2018 at 12:29:14 AM UTC+2, Zack Amaral wrote:
>> Hi,
>> 
>> I have an idea for a next generation PaaS. I was wondering if there are any 
>> Django developers that would be interested in being a co-founder with my 
>> company. I'm an AWS Architect but sadly a really bad developer. If there's 
>> anybody on this forum that would be interested please let me know and we can 
>> setup a time to talk about the details of the project.
>> 
>> Thanks,
>> 
>> Zack
> 
> -- 
> 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/fdad48fe-765d-4585-941a-67bb4f1a6f45%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/78931AD1-870C-490D-976D-728BFC9943C9%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: E-commerce with Django framework

2019-02-02 Thread kibirige Gerald Joseph
Hello
I have problem running PostgreSQL  pg admin on windows 10. whenever I start
the application it brings out this error:
"Fatal error: the application server could not be contacted."

What could be the problem? What should I do?

Thanks,
Gerald.




On Sun, Jan 20, 2019 at 10:40 AM kibirige Gerald Joseph <
geraldjose...@gmail.com> wrote:

> Hello!
>
> I started learning Django framework last month. Django is great!
> Well,  is  it plausible to build an e-commerce website with Django?
>
> If so, what resources and information do I need to make an e-commerce
> website in Django a reality?
>
> Thank you
>
> Gerald
>

-- 
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/CANNqTcM-58h8-0pEokw1SaPwAYj8mCLw-be8%2BYQnuKz9Rast2w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Where is the data set of the Django documents demo models

2019-02-02 Thread Jason
you would have to make your own data set for that, or try googling around.  
the demo is just to show how to make a django project, and doesn't contain 
any data.

one option for making your own is using factory boy or model mommy projects 
to generate realistic randomized data.

-- 
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/c00a2dd6-36d9-439f-9781-16a2aad889d1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Retrieve data from database by taking user input data.

2019-02-02 Thread Derek
Using the `render` method or, failing that `redirect`, after the data from 
the results of your query have been collated.

Without actual code , its hard to help you further.

On Friday, 1 February 2019 21:05:28 UTC+2, Surajeet Das wrote:
>
> I have been trying to write a query to retrieve data from database by 
> taking input from user . But the problem I am facing is after the input is 
> given , the page does not get refreshed to another page, rather it 
> refreshes to the same page again. Help me on this.
>

-- 
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/a6b07d1c-6d3c-4306-9d87-ec4098fef831%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: E-commerce with Django framework

2019-02-02 Thread Khushal Kumar
Right click on pgadmin and troubleshoot it.

On Sat, Feb 2, 2019 at 6:48 PM kibirige Gerald Joseph <
geraldjose...@gmail.com> wrote:

> Hello
> I have problem running PostgreSQL  pg admin on windows 10. whenever I
> start the application it brings out this error:
> "Fatal error: the application server could not be contacted."
>
> What could be the problem? What should I do?
>
> Thanks,
> Gerald.
>
>
>
>
> On Sun, Jan 20, 2019 at 10:40 AM kibirige Gerald Joseph <
> geraldjose...@gmail.com> wrote:
>
>> Hello!
>>
>> I started learning Django framework last month. Django is great!
>> Well,  is  it plausible to build an e-commerce website with Django?
>>
>> If so, what resources and information do I need to make an e-commerce
>> website in Django a reality?
>>
>> Thank you
>>
>> Gerald
>>
> --
> 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/CANNqTcM-58h8-0pEokw1SaPwAYj8mCLw-be8%2BYQnuKz9Rast2w%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/CAKOftJit%2B7RZqwOXdBGWnKHetFGU%2BYJDWDtjsWxWan2s6aY8qA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: E-commerce with Django framework

2019-02-02 Thread Khushal Kumar
you're welcome. Did it work?

On Sat, Feb 2, 2019 at 7:55 PM Khushal Kumar  wrote:

> Right click on pgadmin and troubleshoot it.
>
> On Sat, Feb 2, 2019 at 6:48 PM kibirige Gerald Joseph <
> geraldjose...@gmail.com> wrote:
>
>> Hello
>> I have problem running PostgreSQL  pg admin on windows 10. whenever I
>> start the application it brings out this error:
>> "Fatal error: the application server could not be contacted."
>>
>> What could be the problem? What should I do?
>>
>> Thanks,
>> Gerald.
>>
>>
>>
>>
>> On Sun, Jan 20, 2019 at 10:40 AM kibirige Gerald Joseph <
>> geraldjose...@gmail.com> wrote:
>>
>>> Hello!
>>>
>>> I started learning Django framework last month. Django is great!
>>> Well,  is  it plausible to build an e-commerce website with Django?
>>>
>>> If so, what resources and information do I need to make an e-commerce
>>> website in Django a reality?
>>>
>>> Thank you
>>>
>>> Gerald
>>>
>> --
>> 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/CANNqTcM-58h8-0pEokw1SaPwAYj8mCLw-be8%2BYQnuKz9Rast2w%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/CAKOftJiudo4AyUn6iNWfzHxd9PrWFjGEEVFC3tUpAkzyPpRdOQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: DJANGO

2019-02-02 Thread Khushal Kumar
https://docs.djangoproject.com/en/2.1/howto/legacy-databases/

This might help.

On Sat, Feb 2, 2019 at 3:18 AM Jihene  wrote:

> hiii , how to connect django to an existing database??
>
> --
> 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/4e15c4cc-092d-4e40-9805-bde99c9161ab%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/CAKOftJh4rw9GjkZ8FG1nV47kV4CLcTA7D7_CKi-WQrEtg1S%3DdQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


static css and default admin css not working in my pc

2019-02-02 Thread Vivek Modi
i had made a project in django with a app and if i am trying to open admin 
panel it's not showing me the default css of admin and even if i add static 
css to my app it's not working but if i send my code to someone else and 
they run my code then css is working in there pc

-- 
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/d5b3412f-8129-4aec-a043-3722d8aa6b2d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Passing pk arguments from a URL into another view

2019-02-02 Thread GavinB841
*Hi all,*

*I am having issues using arguments from a URL in another view, I have 
reached out on stackover flow with no success, i believe i am wording this 
question poorly.*

*To quickly explain *

   - *I have a main site which shows a list of sports clubs. When the user 
   selects on one it renders that specific club home page using the PK passed 
   in the template.*
   - *Once I get to this home page e.g. http://127.0.0.1:8000/club_home/2/  
   .  I have many sub-pages which a user can select but I have no idea how I 
   can use that same PK to filter data in the other pages to only show details 
   based on that club.*
   - *I would also like to include that PK in the rest of the URLs. 
   e.g. http://127.0.0.1:8000/club_home/2/teams/*


*Code:*

*index.html:*

Our Clubs
{% for club in all_clubs %}

{{ club.club_name }}

  {% endfor %}


*urls.py*

I understand I must include the / before teams in the URL but I 
am unsure how to pass in that argument

urlpatterns = [
path('', views.club_home, name='club_home'),
path('/', views.club_home, name='club_home_with_pk'),
path('teams/', views.TeamInfo.as_view(), name='teams'),
]





*views.py *



def club_home(request, pk=None):
if pk:
club = ClubInfo.objects.filter(pk=pk)
club_posts = ClubPosts.objects.filter(club_id=club[0])
elif request.user.is_authenticated:
club = ClubInfo.objects.filter(user=request.user)
club_posts = ClubPosts.objects.filter(club_id=club[0])
# photo = model.club_logo.ImageField(storage=profile_pics)
args = {'club': club,
'club_posts': club_posts
}
return render(request, 'club_home_page.html', args)



class TeamInfo(APIView):
renderer_classes = [TemplateHTMLRenderer]
template_name = 'teams.html'

def get(self, request):
serializer = TeamSerializer()
user = ClubInfo.objects.filter(user=request.user).first()
teams = Team.objects.filter(club_id=user.pk)
return Response({'serializer': serializer,
 'teams': teams,
 })



*club_main_page.html*


navbar on club home page to get to other pages, I know I need to include 
 into the **URL and** I need to pass this argument into the href of this 
URL but as need to figure out the view before adding this 



Team



*Any idea what I need to add into the view to allow for this. I would really 
appreciate any help as I've been stuck on this for weeks now. *


*Thanks *


*Gavin*



-- 
__

Séanadh Ríomhphoist/_

Email Disclaimer__
**

Tá an ríomhphost seo agus 
aon chomhad a sheoltar leis faoi rún agus is lena úsáid ag an seolaí agus 
sin amháin é. Is féidir tuilleadh a léamh anseo. 
  
*
_

This e-mail and any 
files transmitted with it are confidential and are intended solely for use 
by the addressee. Read more here. 
 _
*_

-- 
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/3465a2fc-347a-4096-b037-83be9b57d8a2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: static css and default admin css not working in my pc

2019-02-02 Thread ROCKING MANOJ
same problem here please help

On Sat, Feb 2, 2019 at 9:12 PM Vivek Modi  wrote:

> i had made a project in django with a app and if i am trying to open admin
> panel it's not showing me the default css of admin and even if i add static
> css to my app it's not working but if i send my code to someone else and
> they run my code then css is working in there pc
>
> --
> 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/d5b3412f-8129-4aec-a043-3722d8aa6b2d%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/CAP%3DS_g5BoSTEJ6-ha3MB0wp6c_-u2PzNNnF54Az9oa00v8vygA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


static css and default admin css not working in my pc

2019-02-02 Thread officialjoemayami
follow this tutorial https://youtu.be/YH-ipgxlJzs

-- 
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/2f80b81f-f852-4375-8c49-c8cd1cec7264%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Looking for a Django Co-Founder.

2019-02-02 Thread Mark Phillips
This thread appears to be a scam. It seems the OP is not contacting any of
the folks who say they are interested. Perhaps this thread should be
removed?

Mark

On Sat, Feb 2, 2019 at 6:15 AM Anh Nguyen  wrote:

> Hi, it there are still able to join ?
>
> Sent from my iPhone
>
> On Jan 31, 2019, at 20:13, Alison  wrote:
>
> Hi Zack,
>
> Yes I am still interested.
>
> Thanks
> Alison
>
> On Sunday, November 18, 2018 at 12:29:14 AM UTC+2, Zack Amaral wrote:
>>
>> Hi,
>>
>> I have an idea for a next generation PaaS. I was wondering if there are
>> any Django developers that would be interested in being a co-founder with
>> my company. I'm an AWS Architect but sadly a really bad developer. If
>> there's anybody on this forum that would be interested please let me know
>> and we can setup a time to talk about the details of the project.
>>
>> Thanks,
>>
>> Zack
>>
> --
> 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/fdad48fe-765d-4585-941a-67bb4f1a6f45%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/78931AD1-870C-490D-976D-728BFC9943C9%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/CAEqej2PQSqYbw-GhAd1_VEy5Kp7991AOJx4pO1pcvwSuwsWspw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Convert JSON data into structured data in an SQL database using Django ORM

2019-02-02 Thread Parth Sharma
I am building a chatbot using Django with a MySQL backend. 
I have a `ChatSession` model which represents all the useful information to 
be stored after the end of a chat session . 

Now, it has a JSON field called `cc_data`(Implemented using 
[`django-jsonfield`](https://github.com/dmkoch/django-jsonfield))

Here's an example of the content of that field:
```
{
  "slots":{
"chal_tech":"What is the Proof",
"nats":["I will fail the course","Nobody likes me"],
"distortion":"Jumping to Conclusions",
"user_name":"parth",
  }
}
```
I recently realized that I need to query for some fields in this `slots` 
dictionary. An example query would be to list out all the `nats` in the 
last 10 chat sessions. 

It seems that reading all the values of the JSONs into dicts and then 
searching/manipulating them would be inefficient.Therefore I sought to 
convert this JSON representation into Django ORM models(SQL). 

However, while trying to do this I ran into a problem. The "keys" of the 
`slots` dictionary are probably finite in number, but I don't know exactly 
how many of them will be required at this point. In any case, it would be a 
large number (around 50-100).

- Manually writing the model classes for so many attributes in `models.py` 
seems inefficient and also a bit repetitive (Most of them would simply have 
a single `JSONfield` or `TextField`). Even with abstract models I would 
still have to list out classes for all the "keys" in the `models.py` file.
- Ideally I'd like to generate model classes for any new "keys" 
automatically and on the fly. I did look at [dynamic models in 
Django](https://stackoverflow.com/questions/7933596/django-dynamic-model-fields/7934577#7934577)
 
but none of the solutions really seem efficient. The host I am using 
doesn't support NoSQL so I can't use that solution.


How do I convert this into valid a valid Django ORM/SQL design so that the 
queries are efficient and the code isn't repetitive ?

-- 
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/1bfeb786-9675-45e6-98df-9471ce5391dc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Convert JSON data into structured data in an SQL database using Django ORM

2019-02-02 Thread Mark Phillips
MySQL and Postgres both support JSON fields directly, and have some
searching capability built in for those fields. I don't think you have to
use the django-jsonfield anymore. Check the

MySQL and/or Postgres docs -
https://dev.mysql.com/doc/refman/8.0/en/json.html
https://www.postgresql.org/docs/9.3/functions-json.html

JSON, Django, and MySQL docs
https://django-mysql.readthedocs.io/en/latest/installation.html

Mark

Mark

On Sat, Feb 2, 2019 at 2:04 PM Parth Sharma 
wrote:

> I am building a chatbot using Django with a MySQL backend.
> I have a `ChatSession` model which represents all the useful information
> to be stored after the end of a chat session .
>
> Now, it has a JSON field called `cc_data`(Implemented using
> [`django-jsonfield`](https://github.com/dmkoch/django-jsonfield))
>
> Here's an example of the content of that field:
> ```
> {
>   "slots":{
> "chal_tech":"What is the Proof",
> "nats":["I will fail the course","Nobody likes me"],
> "distortion":"Jumping to Conclusions",
> "user_name":"parth",
>   }
> }
> ```
> I recently realized that I need to query for some fields in this `slots`
> dictionary. An example query would be to list out all the `nats` in the
> last 10 chat sessions.
>
> It seems that reading all the values of the JSONs into dicts and then
> searching/manipulating them would be inefficient.Therefore I sought to
> convert this JSON representation into Django ORM models(SQL).
>
> However, while trying to do this I ran into a problem. The "keys" of the
> `slots` dictionary are probably finite in number, but I don't know exactly
> how many of them will be required at this point. In any case, it would be a
> large number (around 50-100).
>
> - Manually writing the model classes for so many attributes in `models.py`
> seems inefficient and also a bit repetitive (Most of them would simply have
> a single `JSONfield` or `TextField`). Even with abstract models I would
> still have to list out classes for all the "keys" in the `models.py` file.
> - Ideally I'd like to generate model classes for any new "keys"
> automatically and on the fly. I did look at [dynamic models in Django](
> https://stackoverflow.com/questions/7933596/django-dynamic-model-fields/7934577#7934577)
> but none of the solutions really seem efficient. The host I am using
> doesn't support NoSQL so I can't use that solution.
>
>
> How do I convert this into valid a valid Django ORM/SQL design so that the
> queries are efficient and the code isn't repetitive ?
>
> --
> 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/1bfeb786-9675-45e6-98df-9471ce5391dc%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/CAEqej2OMHrzx%3DKxGG%3DwYQ50JZ6KfeLA%3DfhF9oZzi8BWPqnqoTQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Looking for a Django Co-Founder.

2019-02-02 Thread Zack Amaral
No, I’ve just been busy and haven’t had time to look at everybody’s
response. We are looking for one front end / Django developer. I’m still
trying to meet with people. I’ve been emailing them individually.

On Sat, Feb 2, 2019 at 2:11 PM Mark Phillips 
wrote:

> This thread appears to be a scam. It seems the OP is not contacting any of
> the folks who say they are interested. Perhaps this thread should be
> removed?
>
> Mark
>
> On Sat, Feb 2, 2019 at 6:15 AM Anh Nguyen  wrote:
>
>> Hi, it there are still able to join ?
>>
>> Sent from my iPhone
>>
>> On Jan 31, 2019, at 20:13, Alison  wrote:
>>
>> Hi Zack,
>>
>> Yes I am still interested.
>>
>> Thanks
>> Alison
>>
>> On Sunday, November 18, 2018 at 12:29:14 AM UTC+2, Zack Amaral wrote:
>>>
>>> Hi,
>>>
>>> I have an idea for a next generation PaaS. I was wondering if there are
>>> any Django developers that would be interested in being a co-founder with
>>> my company. I'm an AWS Architect but sadly a really bad developer. If
>>> there's anybody on this forum that would be interested please let me know
>>> and we can setup a time to talk about the details of the project.
>>>
>>> Thanks,
>>>
>>> Zack
>>>
>> --
>> 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/fdad48fe-765d-4585-941a-67bb4f1a6f45%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/78931AD1-870C-490D-976D-728BFC9943C9%40gmail.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/dhBAN-QTfSc/unsubscribe.
> To unsubscribe from this group and all its topics, 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/CAEqej2PQSqYbw-GhAd1_VEy5Kp7991AOJx4pO1pcvwSuwsWspw%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/CANG%3DrDkGdZFGzUxvwe5CxeFNtm14-4dvcBJ6PmRTP88EH3YXxQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Looking for a Django Co-Founder.

2019-02-02 Thread Zack Amaral
We need somebody that can help with the backend but also knows vue.js or
react. I’m sorry I haven’t been able to contact everybody. There’s been a
lot of requests.

On Sat, Feb 2, 2019 at 2:29 PM Zack Amaral  wrote:

> No, I’ve just been busy and haven’t had time to look at everybody’s
> response. We are looking for one front end / Django developer. I’m still
> trying to meet with people. I’ve been emailing them individually.
>
> On Sat, Feb 2, 2019 at 2:11 PM Mark Phillips 
> wrote:
>
>> This thread appears to be a scam. It seems the OP is not contacting any
>> of the folks who say they are interested. Perhaps this thread should be
>> removed?
>>
>> Mark
>>
>> On Sat, Feb 2, 2019 at 6:15 AM Anh Nguyen  wrote:
>>
>>> Hi, it there are still able to join ?
>>>
>>> Sent from my iPhone
>>>
>>> On Jan 31, 2019, at 20:13, Alison  wrote:
>>>
>>> Hi Zack,
>>>
>>> Yes I am still interested.
>>>
>>> Thanks
>>> Alison
>>>
>>> On Sunday, November 18, 2018 at 12:29:14 AM UTC+2, Zack Amaral wrote:

 Hi,

 I have an idea for a next generation PaaS. I was wondering if there are
 any Django developers that would be interested in being a co-founder with
 my company. I'm an AWS Architect but sadly a really bad developer. If
 there's anybody on this forum that would be interested please let me know
 and we can setup a time to talk about the details of the project.

 Thanks,

 Zack

>>> --
>>> 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/fdad48fe-765d-4585-941a-67bb4f1a6f45%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/78931AD1-870C-490D-976D-728BFC9943C9%40gmail.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Django users" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/django-users/dhBAN-QTfSc/unsubscribe.
>> To unsubscribe from this group and all its topics, 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/CAEqej2PQSqYbw-GhAd1_VEy5Kp7991AOJx4pO1pcvwSuwsWspw%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/CANG%3DrDmm09K6rX9nJ%2B_ywvT9kUxzcZefmJvW3yR9t94NtLxjNg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


PLEASE HELP! Django documentation, Writing Your First App, Part 4

2019-02-02 Thread Atsunori Kaneshige
Hi Django users,

I started using Django recently.
I am following the official Django tutorial.
I am just at Writing Your First Django App, Part4, and I have been just 
copying and pasting all codes.

But I have a problem in vote.
I inserted print(question) and this is printed in detail.html
also, question.id is also printed.

BUT, choice part doesn't seem working.

**
def vote(request, question_id):
question = get_object_or_404(Question, pk=question_id)
print(question)
try:
selected_choice = question.choice_set.get(pk=request.POST['choice'])
except (KeyError, Choice.DoesNotExist) as e:
# Redisplay the question voting form.
print(e)
return render(request, 'polls/detail.html', {
'question': question,
'error_message': "You didn't select a choice.",
})
else:
selected_choice.votes += 1
selected_choice.save()
# Always return an HttpResponseRedirect after successfully dealing
# with POST data. This prevents data from being posted twice if a
# user hits the Back button.
return HttpResponseRedirect(reverse('polls:results', 
args=(question.id,)))

**
{{ question.question_text }}

{% if error_message %}{{ error_message }}{% endif %}


{% csrf_token %}
{% for choice in question.choice_set.all %}

{{ choice.choice_text 
}}
{% endfor %}




{{ question }}
#printed 
 
{{ question.id }}
#printed

*{{ question.choice_set.all }}*
*# #what is this? empty? why?*

{{ question.question_text }}
#printed

{{ question.question_text }}
#printed

*{% for choice in question.choice_set.all %}*
*{{ choice.choice_text }}*
*{% endfor %}*
*#nothing printed!*


Also when I click button 'vote', I only get error.
*You didn't select a choice.*

I am just copying and pasting so that I can understand Django, but I am 
having hard time in this Part 4.

I really appreciate advice from anybody!

Nori

-- 
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/81acb823-ce5b-40c5-8060-573a61136697%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: PLEASE HELP! Django documentation, Writing Your First App, Part 4

2019-02-02 Thread Atsunori Kaneshige
Oh, one note is that I am using postgresql.
everything else except vote function in views.py seems working.

Sorry, any help would be really appreciated!

Nori

On Saturday, February 2, 2019 at 10:02:14 PM UTC-5, Atsunori Kaneshige 
wrote:
>
> Hi Django users,
>
> I started using Django recently.
> I am following the official Django tutorial.
> I am just at Writing Your First Django App, Part4, and I have been just 
> copying and pasting all codes.
>
> But I have a problem in vote.
> I inserted print(question) and this is printed in detail.html
> also, question.id is also printed.
>
> BUT, choice part doesn't seem working.
>
> **
> def vote(request, question_id):
> question = get_object_or_404(Question, pk=question_id)
> print(question)
> try:
> selected_choice = 
> question.choice_set.get(pk=request.POST['choice'])
> except (KeyError, Choice.DoesNotExist) as e:
> # Redisplay the question voting form.
> print(e)
> return render(request, 'polls/detail.html', {
> 'question': question,
> 'error_message': "You didn't select a choice.",
> })
> else:
> selected_choice.votes += 1
> selected_choice.save()
> # Always return an HttpResponseRedirect after successfully dealing
> # with POST data. This prevents data from being posted twice if a
> # user hits the Back button.
> return HttpResponseRedirect(reverse('polls:results', args=(
> question.id,)))
>
> **
> {{ question.question_text }}
>
> {% if error_message %}{{ error_message }}{% endif 
> %}
>
> 
> {% csrf_token %}
> {% for choice in question.choice_set.all %}
>  value="{{ choice.id }}">
> {{ choice.choice_text 
> }}
> {% endfor %}
> 
> 
>
> 
> {{ question }}
> #printed 
>  
> {{ question.id }}
> #printed
> 
> *{{ question.choice_set.all }}*
> *# #what is this? empty? why?*
> 
> {{ question.question_text }}
> #printed
> 
> {{ question.question_text }}
> #printed
> 
> *{% for choice in question.choice_set.all %}*
> *{{ choice.choice_text }}*
> *{% endfor %}*
> *#nothing printed!*
> 
>
> Also when I click button 'vote', I only get error.
> *You didn't select a choice.*
>
> I am just copying and pasting so that I can understand Django, but I am 
> having hard time in this Part 4.
>
> I really appreciate advice from anybody!
>
> Nori
>
>

-- 
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/a581da0f-abd9-435e-8693-db9126b9bac1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: static css and default admin css not working in my pc

2019-02-02 Thread abel otugeme
I have noticed that when you try to load static files for a separate
template from a base template it doesn't work. Is it a 32bit system?
On Feb 2, 2019 7:29 PM,  wrote:

> follow this tutorial https://youtu.be/YH-ipgxlJzs
>
> --
> 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/2f80b81f-f852-4375-8c49-c8cd1cec7264%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/CAMrS0S9tFYpJnBPyH2VqkOaMf-bYr%3DauCf5XVWjrtKoxecqXFA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: PLEASE HELP! Django documentation, Writing Your First App, Part 4

2019-02-02 Thread Nitin Kalmaste
Have you migrated database and added any question there?

On Sun, Feb 3, 2019, 8:39 AM Atsunori Kaneshige  Oh, one note is that I am using postgresql.
> everything else except vote function in views.py seems working.
>
> Sorry, any help would be really appreciated!
>
> Nori
>
> On Saturday, February 2, 2019 at 10:02:14 PM UTC-5, Atsunori Kaneshige
> wrote:
>>
>> Hi Django users,
>>
>> I started using Django recently.
>> I am following the official Django tutorial.
>> I am just at Writing Your First Django App, Part4, and I have been just
>> copying and pasting all codes.
>>
>> But I have a problem in vote.
>> I inserted print(question) and this is printed in detail.html
>> also, question.id is also printed.
>>
>> BUT, choice part doesn't seem working.
>>
>> **
>> def vote(request, question_id):
>> question = get_object_or_404(Question, pk=question_id)
>> print(question)
>> try:
>> selected_choice =
>> question.choice_set.get(pk=request.POST['choice'])
>> except (KeyError, Choice.DoesNotExist) as e:
>> # Redisplay the question voting form.
>> print(e)
>> return render(request, 'polls/detail.html', {
>> 'question': question,
>> 'error_message': "You didn't select a choice.",
>> })
>> else:
>> selected_choice.votes += 1
>> selected_choice.save()
>> # Always return an HttpResponseRedirect after successfully dealing
>> # with POST data. This prevents data from being posted twice if a
>> # user hits the Back button.
>> return HttpResponseRedirect(reverse('polls:results', args=(
>> question.id,)))
>>
>> **
>> {{ question.question_text }}
>>
>> {% if error_message %}{{ error_message }}{% endif
>> %}
>>
>> 
>> {% csrf_token %}
>> {% for choice in question.choice_set.all %}
>> > value="{{ choice.id }}">
>> {{ choice.choice_text
>> }}
>> {% endfor %}
>> 
>> 
>>
>> 
>> {{ question }}
>> #printed
>>  
>> {{ question.id }}
>> #printed
>> 
>> *{{ question.choice_set.all }}*
>> *# #what is this? empty? why?*
>> 
>> {{ question.question_text }}
>> #printed
>> 
>> {{ question.question_text }}
>> #printed
>> 
>> *{% for choice in question.choice_set.all %}*
>> *{{ choice.choice_text }}*
>> *{% endfor %}*
>> *#nothing printed!*
>> 
>>
>> Also when I click button 'vote', I only get error.
>> *You didn't select a choice.*
>>
>> I am just copying and pasting so that I can understand Django, but I am
>> having hard time in this Part 4.
>>
>> I really appreciate advice from anybody!
>>
>> Nori
>>
>> --
> 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/a581da0f-abd9-435e-8693-db9126b9bac1%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/CAKroR%2B2iPLXaocX7_yFxLY_A2vokpRAvNc9PVOuLNbVVu3UsqQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: PLEASE HELP! Django documentation, Writing Your First App, Part 4

2019-02-02 Thread Carsten Fuchs
Hi Nori,

does the choice actually exist?
Can you find it if you query the choices using the ORM in `./manage.py shell`?

Best regards,
Carsten


Am 03.02.19 um 03:59 schrieb Atsunori Kaneshige:
> Hi Django users,
> 
> I started using Django recently.
> I am following the official Django tutorial.
> I am just at Writing Your First Django App, Part4, and I have been just 
> copying and pasting all codes.
> 
> But I have a problem in vote.
> I inserted print(question) and this is printed in detail.html
> also, question.id is also printed.
> 
> BUT, choice part doesn't seem working.
> 
> **
> def vote(request, question_id):
>     question = get_object_or_404(Question, pk=question_id)
>     print(question)
>     try:
>         selected_choice = question.choice_set.get(pk=request.POST['choice'])
>     except (KeyError, Choice.DoesNotExist) as e:
>         # Redisplay the question voting form.
>         print(e)
>         return render(request, 'polls/detail.html', {
>             'question': question,
>             'error_message': "You didn't select a choice.",
>         })
>     else:
>         selected_choice.votes += 1
>         selected_choice.save()
>         # Always return an HttpResponseRedirect after successfully dealing
>         # with POST data. This prevents data from being posted twice if a
>         # user hits the Back button.
>         return HttpResponseRedirect(reverse('polls:results', 
> args=(question.id,)))
> 
> **
> {{ question.question_text }}
> 
> {% if error_message %}{{ error_message }}{% endif %}
> 
> 
> {% csrf_token %}
> {% for choice in question.choice_set.all %}
>      value="{{ choice.id }}">
>     {{ choice.choice_text 
> }}
> {% endfor %}
> 
> 
> 
> 
> {{ question }}
> #printed 
>  
> {{ question.id }}
> #printed
> 
> _{{ question.choice_set.all }}_
> _# #what is this? empty? why?_
> 
> {{ question.question_text }}
> #printed
> 
> {{ question.question_text }}
> #printed
> 
> _{% for choice in question.choice_set.all %}_
> _    {{ choice.choice_text }}_
> _{% endfor %}_
> _#nothing printed!_
> 
> 
> Also when I click button 'vote', I only get error.
> *You didn't select a choice.*
> *
> *
> I am just copying and pasting so that I can understand Django, but I am 
> having hard time in this Part 4.
> 
> I really appreciate advice from anybody!
> 
> Nori
> 

-- 
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/713d3030-a03a-453a-a169-28cf980acd2a%40cafu.de.
For more options, visit https://groups.google.com/d/optout.


Re: Admin form_url breakout problem

2019-02-02 Thread Mike Dewhirst

Matthew

I was wrong. I'm still in trouble. I thought it might be an incomplete 
transaction so I tried making the the subscription.save() atomic but to 
no avail.


Here is what happens ...

1.  Add an ingredient which is payable

2.  Save mixture

3.  SubstanceAdmin.change_view() establishes ...

    subscription = None
    if ingredient.is_payable():
    get or create a subscription record and populate it with fee, 
gst etc.

    if the subscription.token field is blank (ie not paid):
    call billing_payment_view() which interfaces with Stripe 
via a js popup and

    a) gets a token in a hidden field
    b) calls Stripe.charge(token) and gets a json charge 
record back

                c) populates the subscription.token field
    d) saves the subscription record
    e) creates a receipt record
    f) sends an email receipt
    g) puts thank you text and mixture url into context dict
    h) calls billing_success_view(request, context) to 
display success

   message including link back to mixture
    return super(SubstanceAdmin, self).change_view()

4.  On clicking the back-to-the-mixture link in success.html, the Admin 
brings

    up the Change Substance page without error but which is blank below the
    "Change Substance" heading. At that time the displayed URL in the 
address

    bar is exactly correct.

5.  If the dev server reloads the page will paint properly if refreshed.

Theory:

The subscription record has been saved but not in a way which is visible 
yet thereby confusing change_view() into thinking the token field is blank.


In other words the transaction needs to be committed 
pre-billing_success_view()


In testing this it sadly this makes no difference.

Mike


On 2/02/2019 6:06 pm, Mike Dewhirst wrote:

I think I know. Don't waste time on this. I'll report back later.

Mike

On 2/02/2019 3:27 pm, Mike Dewhirst wrote:
I thought it was fixed but not so. It works perfectly *only* if the 
dev server reloads after all the work and prior to clicking the link 
on the success.html template back to the mixture (the substance with 
ingredients).


I tried a workaround of making the link point to the substances list 
page first. No difference. All substance pages come up blank.


When I reported earlier that it was working I must have changed some 
text in a view to improve the screen wording and on saving the dev 
server would have reloaded itself and that hid the problem.


The admin url is correct  ...

http://localhost:8000/admin/substance/substance/1442/change/

... but that refuses to display. There is no delay, no spinner. The 
server console window shows nothing.


Not sure where to start looking.

Maybe something has corrupted Django's in-memory list of url patterns?

Is it caching?

Thanks for any non-javascript hints

Mike

On 30/01/2019 5:13 pm, Mike Dewhirst wrote:

Matthew

I looked for preventDefault and found it in lots of javascript 
scripts. So I decided instead to look at my python code which is 
slightly easier for me to understand. I sort of refactored it and 
cut large swags out to simplify and inserted lots of print 
statements. Then I thought I'd better read your advice again and try 
harder to understand it.


The bit which made sense to me was ...

'let the admin handle it from there'

... I noticed that I was returning the billing payment_view. As soon 
as I removed that 'return' and let the change_view return the super 
call it started working.


Thank you very much for persisting with me.

The Admin is fabulous! Nobel prize for something is warranted :)

Much appreciated

Mike

On 29/01/2019 2:31 am, Matthew Pava wrote:

Hi Mike,
When Stripe processes the payment, you need to preventDefault on 
the form submit, then add the token from Stripe to a hidden input 
in your form without affecting any other data in the form.  Then 
you can do form.submit() and let the admin handle it from there.  
Check out the Stripe documentation for some good examples.  I've 
used it myself.


-Original Message-
From: django-users@googlegroups.com 
[mailto:django-users@googlegroups.com] On Behalf Of Mike Dewhirst

Sent: Friday, January 25, 2019 10:26 PM
To: django-users@googlegroups.com
Subject: Re: Admin form_url breakout problem

Matthew

I think I'll back everything out and start again. There must be a 
basic

blunder somewhere.

Just talking it through, I can definitely launch payment_view from the
Admin when all the ducks are in a line. That view populates the hidden
..._id fields and Stripe API fields in the form then calls the Stripe
API which initiates the  Stripe javascript in the Payment template 
which

resubmits the request with POST direct to Stripe so it can gather the
card detail and send back the json containing the token which 
proves the
card worked. At that point payment is made and my payment_view has 
lost
all the context because Stripe made