Re: Polls app not showing?

2019-06-27 Thread vignesh karthik
Create virtual environment

On Fri, Jun 28, 2019, 6:14 AM ScottW  wrote:

> The server ran a few weeks ago before I ran into this issue. I used the
> run server command just now and now its not working. Interesting
>
> On Thursday, June 27, 2019 at 3:09:29 PM UTC-4, karthikvignesh28 wrote:
>>
>>
>>
>> On Thursday, June 27, 2019 at 8:04:39 AM UTC+5:30, ScottW wrote:
>>>
>>> Hi,
>>>
>>> I'm attempting to get started with Django and very first part of the
>>> polls app. When I type "python manage.py startapp polls"  into the Windows
>>> Powershell I don't see a folder for it in my file explorer under "mysite".
>>> Even stranger is that when I type 'tree' for this folder it shows that its
>>> on the computer, but there's nothing in it besides 'migrations' and
>>> '_pycache_ '. Please refer to the screenshot attached for a picture of the
>>> Powershell code. If someone could help steer me in the right direction that
>>> would be great!
>>>
>>
>>
>>
>> Can you run the server Without Creating a new app?
>>
> --
> 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/003f95c0-4e7d-4806-af90-6a4e9f6da018%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/CAEJDTZ-HRzhjC_0LytOzSQCg2QgQ8iKjaQt1NMcWPrxcfMVh2A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Error when displaying videos on iOS and Safari, but fine in Chrome

2019-06-27 Thread Walker Obrien
I have a social media application in the early stages of deployment, and 
when videos are uploaded they are getting displayed perfectly fine when 
visiting the site on chrome but they are not being displayed correctly when 
using iOS or Safari... Any suggestions?

-- 
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/f8ee38a1-0e56-4ced-83c5-7aebb953c4c4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: need help - following django tutorial to create polls database - missing "on delete cascade" - using django 2.2.1 with mysql 8.0

2019-06-27 Thread Rudy Quiroga Gamboa
Hi, I have the same problem, did you find the problem or the solution ?


El martes, 28 de mayo de 2019, 20:44:44 (UTC-4), K Tan escribió:
>
> Hi, everyone,
>
> This is my first time using Django and I think I'm missing something or 
> there is a bug. I am following the instructions on (
> https://docs.djangoproject.com/en/2.2/intro/tutorial02/) and I've just 
> added the following chunk of code to "polls/models.py". (I copied/pasted so 
> I know it's correct.)
>
> 
> 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)
> 
>
>
> Then I ran the following command:
>
> 
> LITTLEBLACK:www samktan$ python3 manage.py makemigrations polls
> Migrations for 'polls':
>   polls/migrations/0001_initial.py
> - Create model Question
> - Create model Choice
> 
>
> Which is missing one line compared to the tutorial:
>
> - Add field question to choice
>
>
>
> Now when I run this command:
>
> 
> LITTLEBLACK:www samktan$ python3 manage.py sqlmigrate polls 0001
> BEGIN;
> --
> -- Create model Question
> --
> CREATE TABLE `polls_question` (`id` integer AUTO_INCREMENT NOT NULL 
> PRIMARY KEY, `question_text` varchar(200) NOT NULL, `pub_date` datetime(6) 
> NOT NULL);
> --
> -- Create model Choice
> --
> CREATE TABLE `polls_choice` (`id` integer AUTO_INCREMENT NOT NULL PRIMARY 
> KEY, `choice_text` varchar(200) NOT NULL, `votes` integer NOT NULL, 
> `question_id` integer NOT NULL);
> ALTER TABLE `polls_choice` ADD CONSTRAINT 
> `polls_choice_question_id_c5b4b260_fk_polls_question_id` FOREIGN KEY 
> (`question_id`) REFERENCES `polls_question` (`id`);
> COMMIT;
> 
>
> It is missing the "on delete cascade" clause, which I suspect it caused by 
> the missing line above.
>
> I have confirmed in MySQL that the "on delete cascade" clause is 
> definitely missing.
>
> 
> mysql> show create table `polls_choice`;
>
> +--+-+
> | Table| Create Table 
> 
> 
> 
> 
> 
>|
>
> +--+-+
> | polls_choice | CREATE TABLE `polls_choice` (
>   `id` int(11) NOT NULL AUTO_INCREMENT,
>   `choice_text` varchar(200) COLLATE utf8mb4_general_ci NOT NULL,
>   `votes` int(11) NOT NULL,
>   `question_id` int(11) NOT NULL,
>   PRIMARY KEY (`id`),
>   KEY `polls_choice_question_id_c5b4b260_fk_polls_question_id` 
> (`question_id`),
>   CONSTRAINT `polls_choice_question_id_c5b4b260_fk_polls_question_id` 
> FOREIGN KEY (`question_id`) REFERENCES `polls_question` (`id`)
> ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci |
>
> +--+-+
> 1 row in set (0.00 sec)
> 
>
> Can someone tell me what I'm doing wrong?
>
>
> -- 
>
> / per ardua ad astra /
>
>

-- 
You received this message because you are subscribed to the Google Groups 

Re: Polls app not showing?

2019-06-27 Thread ScottW
The server ran a few weeks ago before I ran into this issue. I used the run 
server command just now and now its not working. Interesting

On Thursday, June 27, 2019 at 3:09:29 PM UTC-4, karthikvignesh28 wrote:
>
>
>
> On Thursday, June 27, 2019 at 8:04:39 AM UTC+5:30, ScottW wrote:
>>
>> Hi, 
>>
>> I'm attempting to get started with Django and very first part of the 
>> polls app. When I type "python manage.py startapp polls"  into the Windows 
>> Powershell I don't see a folder for it in my file explorer under "mysite". 
>> Even stranger is that when I type 'tree' for this folder it shows that its 
>> on the computer, but there's nothing in it besides 'migrations' and 
>> '_pycache_ '. Please refer to the screenshot attached for a picture of the 
>> Powershell code. If someone could help steer me in the right direction that 
>> would be great! 
>>
>
>
>
> Can you run the server Without Creating a new app? 
>

-- 
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/003f95c0-4e7d-4806-af90-6a4e9f6da018%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Polls app not showing?

2019-06-27 Thread ScottW
Yep, followed the instructions to a tee on the Django site

On Thursday, June 27, 2019 at 9:28:53 AM UTC-4, Joe Reitman wrote:
>
> Did you create a project first with the 'startproject' command?
>
> On Wednesday, June 26, 2019 at 9:34:39 PM UTC-5, ScottW wrote:
>>
>> Hi, 
>>
>> I'm attempting to get started with Django and very first part of the 
>> polls app. When I type "python manage.py startapp polls"  into the Windows 
>> Powershell I don't see a folder for it in my file explorer under "mysite". 
>> Even stranger is that when I type 'tree' for this folder it shows that its 
>> on the computer, but there's nothing in it besides 'migrations' and 
>> '_pycache_ '. Please refer to the screenshot attached for a picture of the 
>> Powershell code. If someone could help steer me in the right direction that 
>> would be great! 
>>
>

-- 
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/93366fe6-ab9c-4568-a493-83c97f31bdb2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Polls app not showing?

2019-06-27 Thread ScottW
Where exactly do I find installed apps? The settings python file doesn't 
open.

On Thursday, June 27, 2019 at 2:32:51 AM UTC-4, ojakol emma wrote:
>
> first go to installed apps in settings  then you install that app "POLLS"
>
> On Thu, Jun 27, 2019 at 5:33 AM ScottW > 
> wrote:
>
>> Hi, 
>>
>> I'm attempting to get started with Django and very first part of the 
>> polls app. When I type "python manage.py startapp polls"  into the Windows 
>> Powershell I don't see a folder for it in my file explorer under "mysite". 
>> Even stranger is that when I type 'tree' for this folder it shows that its 
>> on the computer, but there's nothing in it besides 'migrations' and 
>> '_pycache_ '. Please refer to the screenshot attached for a picture of the 
>> Powershell code. If someone could help steer me in the right direction that 
>> would be great! 
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to django...@googlegroups.com .
>> To post to this group, send email to django...@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/8b63e259-40fa-4f96-b641-821218626be8%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/817df6e5-4bfc-4aca-bbe3-9982690fb2c6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Join on Subquery with multiple columns

2019-06-27 Thread Richard
I have the following model (not actual, but enough for sample purposes):

class TransactionLine(models.Model):
   txn_id = models.IntegerField()
   entity = models.CharField(max_length=10, null=True, default=None)
   order = models.PositiveIntegerField()


what I'm trying to do is "find the first line in a transaction, that has a 
non-null entity when ordered by 'order'". In SQL (and django), I can use a 
group by to get which line order has the first non-null entity:

select 
txn_id, 
min(`order`) 
from transactionline 
where 
entity is not null 
group by txn_id
order by txn_id, `order`

However, that query alone doesn't give me the entity for that line. This is 
where I get stuck in django, because in SQL I can do:

select 
   t.txn_id, t.entity, t.order
from transactionline t
inner join (
select 
txn_id, 
min(`order`) as ordering
from transactionline 
where 
entity is not null 
group by txn_id
order by txn_id, `order`
) t1 on t.txn_id=t1.txn_id AND t.order = t1.ordering

But I haven't found how I can join on a subquery in django that has 
multiple conditions in the ON clause.

Is there anyway to achieve this without dropping to raw sql?

aside: Using Django 2.1 (can't upgrade to 2.2 because we have a hard 
dependency on pymysql)


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/e5f09520-36aa-4168-966d-14f895259094%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Beginner's question regarding prefetch_related

2019-06-27 Thread Charlotte Wood
What are you trying to do?

On Thu, Jun 27, 2019, 2:09 PM swimmer  wrote:

> Dear Django community,
>
> I have a data model that looks like the following:
>
> class Submission(models.Model):
>...
>
> class Assessment(models.Model):
>submission = models.ForeignKey(
>Submission, on_delete=models.CASCADE, related_name='assessments')
>time_stamp = models.DateTimeField()
>
> And I would like to do something simple such as computing a list of pairs
> of submissions and their most recent assessments:
>
> qs = Submission.objects.prefetch_related('assessments')
> xs = [(s, s.assessments.latest('time_stamp')) for s in qs.all()]
>
> This seems to be inefficient because the assessments table seems to be
> queried for each submission.
> I've read about prefetch_related and tried to use it as above but it
> doesn't seem to have any effect.
> I suppose this is because I try to use 'latest'?
> Is prefetch_related applicable in this case at all or do I need to resort
> to a different technique like a raw SQL query?
>
> Thanks in advance!
>
> Simon
>
> --
> 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/e38b499f-d54b-4f6a-874b-a95af0b778b0%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/CAPZR0N6RMdV_jGd3XPP%2BrqDdiT_j2QAe%3DnoUhBeg9MdnYSp_dg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Migraciones con dos aplicaciones en un proyecto de Django

2019-06-27 Thread Miguel Ángel Cumpa Ascuña
hola, el procedimiento debería ser el mismo,
python manage.py makemigrations
python manage.py migrate
éxitos!

El jue., 27 jun. 2019 a las 13:56, Tatiana Mesa ()
escribió:

> Hola a todos,
>
> Me gustaría saber si al momento de hacer una migración (migrate), con dos
> aplicaciones en un proyecto cambia el comando, o cual debo ejecutar primero.
>
> O si el procedimiento es igual que con una sola aplicaciones
>
> Gracias
>
>
>
> --
> 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/CAHAr%3D_0xMnydjDsqijODWxL%3DHsXhqnEehFxnaFRgBu7cbW%2BcQQ%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/CAOZHYKPc2Qzb2Z3S-6_YJE%2BRynzO%2BWKM%2BZn0-cJ3PtJk%2BN1Yyw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


How to download campaign performance report with filter by list of id in campaign_name

2019-06-27 Thread dark knight645
Hi,

I have for example a bunch of campaigns with name's pattern like this : 
'this is a gdn campaign - 233432'  , 
Now I am using Python SDK to download report for each gdn campaign name, 
but filter by this number 233432 as an id.
so my report query looks like this:
I can request each report by contains('id_1') but it's not efficient and 
that's why I want to request each time 20 ids into the ContainsAny 
operation. Does current adwords API support this?
Thanks

report_query = (adwords.ReportQueryBuilder()
.Select('CampaignId', 'Date',
'Impressions', 'Clicks', 
'Cost', 'CampaignName')
.From('CAMPAIGN_PERFORMANCE_REPORT')
#.Where('CampaignStatus').In('ENABLED', 'PAUSED')
.Where('CampaignName').ContainsAny(['id_1', 'id_2'])
.During(date_range=date_preset, start_date=start_date, end_date=end_date)
.Build())

-- 
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/bb28f73c-a337-4f58-9e9f-2d23c9cf49ca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django create username and password, please help!

2019-06-27 Thread vignesh karthik
Hi there!

Can You please Tell me the exact Error Details, So i can Trouble shoot your
problem

On Thu, Jun 27, 2019 at 3:11 PM ojakol emma  wrote:

> YOU NEED TO CREATE A SUPERUSER FIRST TRY TYPING:
>
> "python manage.py createsuperuser"
> then you fill in the information they need
> NOTE when you are typing your password it is not seen so you have to be
> careful
> thanks for more inquiries please contact +256 780738146 even me i deal
> django projects
>
>
> On Tue, Jun 25, 2019 at 6:04 PM Jackeline Peña Alejandro <
> jacky.mela...@gmail.com> wrote:
>
>> Hello everyone,
>>
>> I have a query, well is the first time I'm using django to create
>> websites, I would like help in that sense, I have to create a username and
>> password, I would like guidance on it, I know there are tutorials on
>> youtube, but do not help me, because the course of following the steps,
>> there is always an error, and I get confused. I'm using pycharm which
>> allowed me to create a virtual environment, to install django
>>
>> I hope you will answer me as soon as possible,
>>
>> --
>> 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/c067a69b-5dd3-41f7-9cc2-8841e4d47c83%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/CAKVKrTyPvD%3DwKb0w955Rt7Ss0R08n-Ym-xOQN01wintx5nCYrg%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
vignesh

-- 
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/CAEJDTZ8qkwqGuBZ8%2BxmnqJSTkHzrerkQ-Wk5jHj3uC%2BFDZLOUQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Beginner's question regarding prefetch_related

2019-06-27 Thread swimmer
Dear Django community,

I have a data model that looks like the following:

class Submission(models.Model):
   ...

class Assessment(models.Model):
   submission = models.ForeignKey(
   Submission, on_delete=models.CASCADE, related_name='assessments')
   time_stamp = models.DateTimeField() 

And I would like to do something simple such as computing a list of pairs 
of submissions and their most recent assessments:

qs = Submission.objects.prefetch_related('assessments')
xs = [(s, s.assessments.latest('time_stamp')) for s in qs.all()]

This seems to be inefficient because the assessments table seems to be 
queried for each submission.
I've read about prefetch_related and tried to use it as above but it 
doesn't seem to have any effect.
I suppose this is because I try to use 'latest'?
Is prefetch_related applicable in this case at all or do I need to resort 
to a different technique like a raw SQL query?

Thanks in advance!

Simon

-- 
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/e38b499f-d54b-4f6a-874b-a95af0b778b0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Polls app not showing?

2019-06-27 Thread karthikvignesh28


On Thursday, June 27, 2019 at 8:04:39 AM UTC+5:30, ScottW wrote:
>
> Hi, 
>
> I'm attempting to get started with Django and very first part of the polls 
> app. When I type "python manage.py startapp polls"  into the Windows 
> Powershell I don't see a folder for it in my file explorer under "mysite". 
> Even stranger is that when I type 'tree' for this folder it shows that its 
> on the computer, but there's nothing in it besides 'migrations' and 
> '_pycache_ '. Please refer to the screenshot attached for a picture of the 
> Powershell code. If someone could help steer me in the right direction that 
> would be great! 
>



Can you run the server Without Creating a new app? 

-- 
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/29677695-a6b1-4482-a258-bbfadfad562f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Migraciones con dos aplicaciones en un proyecto de Django

2019-06-27 Thread Tatiana Mesa
Hola a todos,

Me gustaría saber si al momento de hacer una migración (migrate), con dos
aplicaciones en un proyecto cambia el comando, o cual debo ejecutar primero.

O si el procedimiento es igual que con una sola aplicaciones

Gracias

-- 
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/CAHAr%3D_0xMnydjDsqijODWxL%3DHsXhqnEehFxnaFRgBu7cbW%2BcQQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: invalid literal for int() with base 10: 'admin'

2019-06-27 Thread Harshit
It worked!. Thanks Piotr Duda

On Wednesday, June 26, 2019 at 6:11:24 PM UTC+5:30, Piotr Duda wrote:
>
> Try move first path to end in your main urls.py.
>
> W dniu wtorek, 25 czerwca 2019 17:17:04 UTC+2 użytkownik Harshit napisał:
>>
>> Here is urls.py of my app
>>
>> from django.urls import path
>> from . import views
>> from django.conf import settings
>> from django.conf.urls.static import static
>>
>> app_name="music"
>>
>> urlpatterns=[
>> #/music/
>> path('',views.IndexView.as_view(),name='index'),
>>
>> path('register/',views.UserFormView.as_view(),name='register'),
>>
>> path('/',views.DetailView.as_view(),name='detail'),
>>
>> path('album/add/',views.AlbumCreate.as_view(),name='album-add'),
>> ]
>> urlpatterns += static(settings.MEDIA_URL, document_root
>> =settings.MEDIA_ROOT)
>>
>> Here is my main urls.py
>> from django.contrib import admin
>> from django.urls import path,include
>> from . import settings
>> from django.contrib.staticfiles.urls import static
>> from django.contrib.staticfiles.urls import staticfiles_urlpatterns
>>
>> urlpatterns = [
>> path('',include('music.urls')),
>> path('music/',include('music.urls')),
>> path('admin/', admin.site.urls),
>> ]
>> urlpatterns += staticfiles_urlpatterns()
>> urlpatterns += static(settings.MEDIA_URL, document_root
>> =settings.MEDIA_ROOT)
>>
>> On Tuesday, June 25, 2019 at 4:14:05 PM UTC+5:30, Sipum wrote:
>>>
>>> Can u plz attach your urls.py as functions associated in views.py
>>>
>>> Thanks. 
>>>
>>> On Mon, 24 Jun, 2019, 8:08 PM Harshit Agarwal,  
>>> wrote:
>>>
  Hi guys,
 I am currently working on a working on a project. Everything is working 
 fine but i am not able to access my admin. How can i solve this? 
 Here is my Stack Trace 
 Traceback:

 File 
 "C:\ProgramData\Anaconda3\lib\site-packages\django\core\handlers\exception.py"
  
 in inner
   34. response = get_response(request)

 File 
 "C:\ProgramData\Anaconda3\lib\site-packages\django\core\handlers\base.py" 
 in _get_response
   126. response = 
 self.process_exception_by_middleware(e, request)

 File 
 "C:\ProgramData\Anaconda3\lib\site-packages\django\core\handlers\base.py" 
 in _get_response
   124. response = wrapped_callback(request, 
 *callback_args, **callback_kwargs)

 File 
 "C:\ProgramData\Anaconda3\lib\site-packages\django\views\generic\base.py" 
 in view
   68. return self.dispatch(request, *args, **kwargs)

 File 
 "C:\ProgramData\Anaconda3\lib\site-packages\django\views\generic\base.py" 
 in dispatch
   88. return handler(request, *args, **kwargs)

 File 
 "C:\ProgramData\Anaconda3\lib\site-packages\django\views\generic\detail.py"
  
 in get
   106. self.object = self.get_object()

 File 
 "C:\ProgramData\Anaconda3\lib\site-packages\django\views\generic\detail.py"
  
 in get_object
   36. queryset = queryset.filter(pk=pk)

 File 
 "C:\ProgramData\Anaconda3\lib\site-packages\django\db\models\query.py" in 
 filter
   844. return self._filter_or_exclude(False, *args, **kwargs)

 File 
 "C:\ProgramData\Anaconda3\lib\site-packages\django\db\models\query.py" in 
 _filter_or_exclude
   862. clone.query.add_q(Q(*args, **kwargs))

 File 
 "C:\ProgramData\Anaconda3\lib\site-packages\django\db\models\sql\query.py" 
 in add_q
   1263. clause, _ = self._add_q(q_object, self.used_aliases)

 File 
 "C:\ProgramData\Anaconda3\lib\site-packages\django\db\models\sql\query.py" 
 in _add_q
   1287. split_subq=split_subq,

 File 
 "C:\ProgramData\Anaconda3\lib\site-packages\django\db\models\sql\query.py" 
 in build_filter
   1225. condition = self.build_lookup(lookups, col, value)

 File 
 "C:\ProgramData\Anaconda3\lib\site-packages\django\db\models\sql\query.py" 
 in build_lookup
   1096. lookup = lookup_class(lhs, rhs)

 File 
 "C:\ProgramData\Anaconda3\lib\site-packages\django\db\models\lookups.py" 
 in 
 __init__
   20. self.rhs = self.get_prep_lookup()

 File 
 "C:\ProgramData\Anaconda3\lib\site-packages\django\db\models\lookups.py" 
 in 
 get_prep_lookup
   70. return self.lhs.output_field.get_prep_value(self.rhs)

 File 
 "C:\ProgramData\Anaconda3\lib\site-packages\django\db\models\fields\__init__.py"
  
 in get_prep_value
   965. return int(value)

 Exception Type: ValueError at /admin/
 Exception Value: invalid literal for int() with base 10: 'admin' 

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

Re: Creating pdf in python

2019-06-27 Thread Peter van der Does
wkhtmltopdf is pretty good.

If you are designing for PDF I recommend using mm instead of px, 0
margins, and disable smart shrinking. It will make the design process
smoother.

On 6/27/19 10:45 AM, Django Dojo wrote:
> Hello everyone,
>
> I have a pdf template and I need different Individuals(s) to fill out 
> different sections of the document on the web using online form(s). Is there 
> an Django package that will allow me to do this?
>
> Ex: end user will go to a web form and fill out information which will be 
> imported into the pdf document.
>
> Thank you
>
-- 
*Peter van der Does
o: ***410-584-2500
m: 732-425-3102
*ONeil Interactive, Inc *
oneilinteractive.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/daf5e934-0a45-b2dc-7f33-554332124171%40oneilinteractive.com.
For more options, visit https://groups.google.com/d/optout.


Re: Creating pdf in python

2019-06-27 Thread Jani Tiainen
I've been also very succesful with wkhtmltopdf.

to 27. kesäk. 2019 klo 18.44 Larry Martell 
kirjoitti:

> On Thu, Jun 27, 2019 at 10:45 AM Django Dojo 
> wrote:
> >
> > Hello everyone,
> >
> > I have a pdf template and I need different Individuals(s) to fill out
> different sections of the document on the web using online form(s). Is
> there an Django package that will allow me to do this?
> >
> > Ex: end user will go to a web form and fill out information which will
> be imported into the pdf document.
>
> I have used this: https://wkhtmltopdf.org/
>
> --
> 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/CACwCsY5%3DXjs5xQoXz1K4uUcz1jy_obD%3DswpXuD98nxYaMNF4VQ%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/CAHn91ocaMkzS9aP_cj268FeAdzwENwkHjt0bh0vZacK440iihA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Creating pdf in python

2019-06-27 Thread Larry Martell
On Thu, Jun 27, 2019 at 10:45 AM Django Dojo  wrote:
>
> Hello everyone,
>
> I have a pdf template and I need different Individuals(s) to fill out 
> different sections of the document on the web using online form(s). Is there 
> an Django package that will allow me to do this?
>
> Ex: end user will go to a web form and fill out information which will be 
> imported into the pdf document.

I have used this: https://wkhtmltopdf.org/

-- 
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/CACwCsY5%3DXjs5xQoXz1K4uUcz1jy_obD%3DswpXuD98nxYaMNF4VQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Creating pdf in python

2019-06-27 Thread Irfan Khan
I have used *xhtml2pdf* library.
Here  https://djangopackages.org/grids/g/pdf/
This one can help you which is suitable for Requiremnt

On Thu, 27 Jun 2019 at 8:16 PM, Django Dojo  wrote:

> Hello everyone,
>
> I have a pdf template and I need different Individuals(s) to fill out
> different sections of the document on the web using online form(s). Is
> there an Django package that will allow me to do this?
>
> Ex: end user will go to a web form and fill out information which will be
> imported into the pdf document.
>
> Thank you
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To 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/8ba9b35f-4d64-40e3-a30c-19cb473656f6%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/CALKGViq18CDy1vMG7fLiscti3NMMaFxXQVPoqEauM9dUEOUbcA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Creating pdf in python

2019-06-27 Thread Django Dojo
Hello everyone,

I have a pdf template and I need different Individuals(s) to fill out different 
sections of the document on the web using online form(s). Is there an Django 
package that will allow me to do this?

Ex: end user will go to a web form and fill out information which will be 
imported into the pdf document.

Thank you

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To 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/8ba9b35f-4d64-40e3-a30c-19cb473656f6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Polls app not showing?

2019-06-27 Thread Joe Reitman
Did you create a project first with the 'startproject' command?

On Wednesday, June 26, 2019 at 9:34:39 PM UTC-5, ScottW wrote:
>
> Hi, 
>
> I'm attempting to get started with Django and very first part of the polls 
> app. When I type "python manage.py startapp polls"  into the Windows 
> Powershell I don't see a folder for it in my file explorer under "mysite". 
> Even stranger is that when I type 'tree' for this folder it shows that its 
> on the computer, but there's nothing in it besides 'migrations' and 
> '_pycache_ '. Please refer to the screenshot attached for a picture of the 
> Powershell code. If someone could help steer me in the right direction that 
> would be great! 
>

-- 
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/48f2366e-1823-422c-99c0-2ee9a557a9e3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Website advice/ Django packages

2019-06-27 Thread Joe Reitman
probably not. I would assume the store price info, etc in a database

On Thursday, June 27, 2019 at 7:10:07 AM UTC-5, Django Dojo wrote:
>
> I’m looking to develop  similar to: 
> https://www.northwestregisteredagent.com but I’m confused on how the 
> prices change for each state. Is there a Django package for 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/76166c51-b36b-4be9-8abb-f3dccd271a50%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


anonymous user in django app

2019-06-27 Thread Gaurav Sahu
Hy, I have a Django blog app. I want to add a feature in which a registered 
user can add a post anonymously. But I couldn't figure out how to do it. 
Anybody help me how can I implement this feature? It will be a great help.
Thanks in advance.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To 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/b83843ec-c628-4bda-982b-bf85df7c7bcf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to connect Django with Hbase

2019-06-27 Thread Joe Reitman
Django only supports a few relational databases out of the box. Oracle, 
mysql, postgres and sqlite.

There may be some 3rd party packages out there via google search. The other 
option is to write your own db backend.  

On Wednesday, June 26, 2019 at 9:59:46 AM UTC-5, Varun Kumar wrote:
>
> Hello folks , 
>
>Does anyone know how to connect django with hbase as db ?
> *Regards,*
>
> *Varun Kumar *
> *Mob: +91-8884601515*
> *email: varuns...@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/e81009a9-1133-49a0-9cef-c289b95067ba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Website advice/ Django packages

2019-06-27 Thread Django Dojo
I’m looking to develop  similar to:
https://www.northwestregisteredagent.com but I’m confused on how the prices 
change for each state. Is there a Django package for 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/e9f8a744-d02a-4898-aaec-6aa6e54c170a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django create username and password, please help!

2019-06-27 Thread ojakol emma
YOU NEED TO CREATE A SUPERUSER FIRST TRY TYPING:

"python manage.py createsuperuser"
then you fill in the information they need
NOTE when you are typing your password it is not seen so you have to be
careful
thanks for more inquiries please contact +256 780738146 even me i deal
django projects


On Tue, Jun 25, 2019 at 6:04 PM Jackeline Peña Alejandro <
jacky.mela...@gmail.com> wrote:

> Hello everyone,
>
> I have a query, well is the first time I'm using django to create
> websites, I would like help in that sense, I have to create a username and
> password, I would like guidance on it, I know there are tutorials on
> youtube, but do not help me, because the course of following the steps,
> there is always an error, and I get confused. I'm using pycharm which
> allowed me to create a virtual environment, to install django
>
> I hope you will answer me as soon as possible,
>
> --
> 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/c067a69b-5dd3-41f7-9cc2-8841e4d47c83%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/CAKVKrTyPvD%3DwKb0w955Rt7Ss0R08n-Ym-xOQN01wintx5nCYrg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Heroku and DJango_Filters

2019-06-27 Thread Sithembewena L. Dube
It would be helpful to do a clean setup and then view the log files.


Kind regards,
Lloyd

On Thu, Jun 27, 2019, 01:58 Charlotte Wood <
charlotte.w...@epiccharterschools.org> wrote:

> yes, but look at the error...now it isn't recognize the django-heroku app
> all of a sudden.  it's not yielding any error on django_filters.  you
> think my python is corrupt?
>
>
> Charlotte Wood, MEd
>
> Educator
>
> (405) 578-5701
>
> Zoom Meeting ID#: 4055785701
>
> *Zoom URL:* https://epiccharterschools.zoom.us/j/2970513912
>
> Classroom Google Site:
> https://sites.google.com/epiccharterschools.org/charlottewoodclassroom/home
>
> Epic Technical Support: (405) 652-0935
>
>
>
> Jordan McKesson Principal
>
> 405-749-4550 ext. 309
>
> jordan.mckes...@epiccharterschools.org
>
>  
> 
> 
>
>
>
>
> On Wed, Jun 26, 2019 at 6:09 PM Sithembewena L. Dube 
> wrote:
>
>> Hi Charlotte,
>>
>> I spotted the problem.
>>
>> You need to add 'django-filters' to your settings.py file.
>>
>> Like so:
>>
>>
>> INSTALLED_APPS = [
>> 'django.contrib.admin',
>> 'django.contrib.auth',
>> 'django.contrib.contenttypes',
>> 'django.contrib.sessions',
>> 'django.contrib.messages',
>> 'django.contrib.staticfiles',
>> 'maintenance',
>>   'django-filters',
>> ]
>>
>> Then run python manage.py migrate (if the app needs a database schema,
>> the command will generate it.
>>
>>
>> Try this?
>>
>>
>> Kind regards,
>> Lloyd
>>
>> On Thu, Jun 27, 2019, 00:58 Charlotte Wood <
>> charlotte.w...@epiccharterschools.org> wrote:
>>
>>> Thanks everyoneso I've unistalled and reinstalled everything and
>>> same errors.  I so much appreciate ANY help:
>>>
>>> settings.py file reads like this:
>>>
>>>
>>> import os
>>> import django_heroku
>>> from decouple import config
>>> import dj_database_url
>>>
>>> BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
>>>
>>> SECRET_KEY = config('SECRET_KEY')
>>>
>>> DEBUG = True
>>>
>>> ALLOWED_HOSTS = []
>>>
>>> INSTALLED_APPS = [
>>> 'django.contrib.admin',
>>> 'django.contrib.auth',
>>> 'django.contrib.contenttypes',
>>> 'django.contrib.sessions',
>>> 'django.contrib.messages',
>>> 'django.contrib.staticfiles',
>>> 'maintenance',
>>> ]
>>>
>>> MIDDLEWARE = [
>>> 'django.middleware.security.SecurityMiddleware',
>>> 'django.contrib.sessions.middleware.SessionMiddleware',
>>> 'whitenoise.middleware.WhiteNoiseMiddleware',
>>> 'django.contrib.sessions.middleware.SessionMiddleware',
>>> 'django.middleware.common.CommonMiddleware',
>>> 'django.middleware.csrf.CsrfViewMiddleware',
>>> 'django.contrib.auth.middleware.AuthenticationMiddleware',
>>> 'django.contrib.messages.middleware.MessageMiddleware',
>>> 'django.middleware.clickjacking.XFrameOptionsMiddleware',
>>> ]
>>>
>>> ROOT_URLCONF = 'freshstart.urls'
>>>
>>> TEMPLATES = [
>>> {
>>> 'BACKEND': 'django.template.backends.django.DjangoTemplates',
>>> 'DIRS': [],
>>> 'APP_DIRS': True,
>>> 'OPTIONS': {
>>> 'context_processors': [
>>> 'django.template.context_processors.debug',
>>> 'django.template.context_processors.request',
>>> 'django.contrib.auth.context_processors.auth',
>>> 'django.contrib.messages.context_processors.messages',
>>> ],
>>> },
>>> },
>>> ]
>>>
>>> WSGI_APPLICATION = 'freshstart.wsgi.application'
>>>
>>> DATABASES = {
>>> 'default': {
>>> 'ENGINE': 'django.db.backends.postgresql_psycopg2',
>>> }
>>> }
>>>
>>> AUTH_PASSWORD_VALIDATORS = [
>>> {
>>> 'NAME':
>>> 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
>>> },
>>> {
>>> 'NAME':
>>> 'django.contrib.auth.password_validation.MinimumLengthValidator',
>>> },
>>> {
>>> 'NAME':
>>> 'django.contrib.auth.password_validation.CommonPasswordValidator',
>>> },
>>> {
>>> 'NAME':
>>> 'django.contrib.auth.password_validation.NumericPasswordValidator',
>>> },
>>> ]
>>>
>>>
>>> LANGUAGE_CODE = 'en-us'
>>>
>>> TIME_ZONE = 'UTC'
>>>
>>> USE_I18N = True
>>>
>>> USE_L10N = True
>>>
>>> USE_TZ = True
>>>
>>>
>>> PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
>>>
>>> STATIC_URL = '/static/'
>>>
>>> STATICFILES_DIRS = [
>>> os.path.join(BASE_DIR, 'static')
>>> ]
>>>
>>> STATICFILES_STORAGE =
>>> 'whitenoise.storage.CompressedManifestStaticFilesStorage'
>>>
>>> django_heroku.settings(locals())
>>>
>>>
>>>
>>>
>>> REQUIREMENTS.TXT FILE:
>>>
>>> j-database-url==0.5.0
>>> Django==2.2
>>> django-filter==2.1.0
>>> django-heroku==0.3.1
>>> gunicorn==19.9.0
>>> psycopg2==2.8.3
>>> python-decouple==3.1
>>> pytz==2019.1
>>> sqlparse==0.3.0
>>> whitenoise==4.1.2
>>>
>>> I have a Procfile and a Pipfile.  The 

Re: Using OAuth2 with Django

2019-06-27 Thread Aldian Fazrihady
Hi Derek,

If you are using Django OAuth Toolkit there is authorization URL in this
path: /o/authorize Regards,

Aldian Fazrihady

On Thu, Jun 27, 2019 at 10:15 AM Derek Dong 
wrote:

> So I've been trying to learn how to authenticate users in my Django
> application with OAuth.
> The token provider has already been established, and the provided
> documentation is here:
> https://ion.readthedocs.io/en/latest/developing/oauth.html
> However, once I've followed the instructions in the "Python" part I got
> confused. I successfully logged in using my Ion account, but when I went to
> the admin page (localhost:8000/admin)
> I got __init__() missing 1 required positional argument: 'strategy'
>
> views.py:
>
> def login(request):
> oauth = OAuth2Session("SsRYDH1iY6jqLO6rSVnF3A1NtYz4Y3fiO9qUMNAX", 
> redirect_uri="http://127.0.0.1:8000/callback",scope=["read;, "write"])
> authorization_url, state = 
> oauth.authorization_url("https://ion.tjhsst.edu/oauth/authorize/;)
> return redirect(authorization_url)
>
> def callback(request):
> oauth = OAuth2Session("SsRYDH1iY6jqLO6rSVnF3A1NtYz4Y3fiO9qUMNAX", 
> redirect_uri="http://127.0.0.1:8000/callback;, scope=["read", "write"])
> code = request.GET.get('code', None)
> token = oauth.fetch_token("https://ion.tjhsst.edu/oauth/token/;, 
> code=code, 
> client_secret="H78F4vUYd1uTtRSQcCWm0IrSesEhRAXNNh2JRe8KG0LyaJAPY2cPFhIQtKfzqKtMNk6vQxbuOAW2WfedjyNdJ4TLobwKh3NLfe2Am9NNL95T28XTPZWItLqRLKnJOdDu")
> return render(request, 'index.html')
>
>
> urls.py:
>
> path(r'oauth/', views.login, name='login'),
> path(r'callback/', views.callback, name='callback'),
>
>
> settings.py:
>
> INSTALLED_APPS = (
>
> ...
> 'users.apps.UsersConfig',
> 'ion_oauth',
> )
>
>
> How am I supposed to do this? I had already implemented an internal 
> login/logout system through Django's forms, but I want to authenticate it 
> through the provided servers. 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/7022da04-ff84-400b-8e24-78327417d4f3%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/CAN7EoAbmiePG6R3JV96z_HkZm1kFi_6eCyeEH6%2Bd0J9JLEMNxA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Polls app not showing?

2019-06-27 Thread ojakol emma
hv you got it

On Thu, Jun 27, 2019 at 9:31 AM ojakol emma  wrote:

> first go to installed apps in settings  then you install that app "POLLS"
>
> On Thu, Jun 27, 2019 at 5:33 AM ScottW  wrote:
>
>> Hi,
>>
>> I'm attempting to get started with Django and very first part of the
>> polls app. When I type "python manage.py startapp polls"  into the Windows
>> Powershell I don't see a folder for it in my file explorer under "mysite".
>> Even stranger is that when I type 'tree' for this folder it shows that its
>> on the computer, but there's nothing in it besides 'migrations' and
>> '_pycache_ '. Please refer to the screenshot attached for a picture of the
>> Powershell code. If someone could help steer me in the right direction that
>> would be great!
>>
>> --
>> 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/8b63e259-40fa-4f96-b641-821218626be8%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/CAKVKrTyvV2k6G8V0Q5yp%3DP6mkk4K%3D82Xn2thVWg_dmLhFe%3DKZQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Polls app not showing?

2019-06-27 Thread ojakol emma
first go to installed apps in settings  then you install that app "POLLS"

On Thu, Jun 27, 2019 at 5:33 AM ScottW  wrote:

> Hi,
>
> I'm attempting to get started with Django and very first part of the polls
> app. When I type "python manage.py startapp polls"  into the Windows
> Powershell I don't see a folder for it in my file explorer under "mysite".
> Even stranger is that when I type 'tree' for this folder it shows that its
> on the computer, but there's nothing in it besides 'migrations' and
> '_pycache_ '. Please refer to the screenshot attached for a picture of the
> Powershell code. If someone could help steer me in the right direction that
> would be great!
>
> --
> 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/8b63e259-40fa-4f96-b641-821218626be8%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/CAKVKrTyxyyvgY9033YE0JZX4RyEtBbF_T3iR1QVKLBhFmRQUTQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.