HOW TO PAGINATE REST FRAMEWORK VIEWS

2020-05-15 Thread Sunday Iyanu Ajayi
Good day guys,

Please I am working on a project and I need help with applying pagination.

The pagination works with the global generics viewsets.

I am trying to paginate a custom view (API rest framework.views) but it
seems not to work. Please I need help to how to fix it.
[image: image.png]
*AJAYI Sunday *
(+234) 806 771 5394
*sunnexaj...@gmail.com *

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKYSAw3WoQmfbQ9Q7_K-qOx8JYmgkJcz2LNW203ohTwRcagNpw%40mail.gmail.com.


HOW TO PROTECT SOURCE CODE DEPLOYED TO A REMOTE SERVER

2020-05-15 Thread Sunday Iyanu Ajayi
I am working for a client that wants to deploy a project I am working on in
a remote server and I will like to project my source code when deployed so
that they will not be able to mess with it.

How can  I  go about it please?

*AJAYI Sunday *
(+234) 806 771 5394
*sunnexaj...@gmail.com *

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKYSAw2PjNzS0Kutg_-DMvwDqQoTrkWpvjwp7K-6JFR1XZ_%3DLQ%40mail.gmail.com.


Re: HOW TO PROTECT SOURCE CODE DEPLOYED TO A REMOTE SERVER

2020-05-15 Thread Kasper Laudrup

Hi Sunday,

No need to shout in the subject line.

On 15/05/2020 15.21, Sunday Iyanu Ajayi wrote:
I am working for a client that wants to deploy a project I am working on 
in a remote server and I will like to project my source code when 
deployed so that they will not be able to mess with it.


How can  I  go about it please?



Don't give them access to the production server(s)?

Kind regards,

Kasper Laudrup

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/775ceb24-2293-0bba-16dd-d437852e7da1%40stacktrace.dk.


Re: I'm new to this django help me out

2020-05-15 Thread sree lekha
how can i share the output of a django program to others

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAC0VY9zxM0SaSoQF5QpywiKbvy0g1LijoB5%2B%3D2y_Ak1gvwmnFQ%40mail.gmail.com.


Re: CSS with Django forms

2020-05-15 Thread Devansh Chaubey
Hey Anubhav
You can use django-widget-tweaks package
https://pypi.org/project/django-widget-tweaks/
See this.
You can make own css styling using class on forms.

On Fri, 15 May 2020 at 00:10, Anubhav Madhav 
wrote:

> Thankyou Clive!! I know I can use CSS like that, but if I do that the
> problem I'll face is that the 'form' or the 'input' tags or 'submit'
> button, which are rendered using django forms, cannot be modified using CSS
> in this way. Is there any other way to fix it?
>
> On Wednesday, 13 May 2020 18:58:08 UTC+5:30, Clive Bruton wrote:
>>
>>
>> On 12 May 2020, at 22:41, Anubhav Madhav wrote:
>>
>> > Is there any way to display the forms with my HTML CSS files.
>>
>> Use {% include %} (https://docs.djangoproject.com/en/3.0/ref/
>> templates/builtins/#include) in your HTML template files for an
>> embedded style sheet, or just use a link in the head of your template
>> to serve the .css from the "static" folder (or other remote server
>> location).
>>
>>
>> -- Clive
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/d9650e11-31a1-44ff-a4c4-2a59e7ac27cf%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANqZwQkRLQ9vTELfFf%3DhZGg8Gu%2BO8v4bibaoyVMi0kinHDWxVQ%40mail.gmail.com.


How do I show dynamic and dependable list of values of model field on Front End using Django Forms?

2020-05-15 Thread Khubaib Khawar


have a Detail Model which has a ForeignKey() of User Model. I want to show 
the list of subject (which is a field of Detail Model) associated with a 
single user, at the Front End in Template. It should be a dropdown menu and 
user should be able to select the subject from the list and submit the form.

How should I accomplish it?


Below is my models.py:

class Detail(models.Model):
user = models.ForeignKey(User, on_delete=models.CASCADE)
subject = models.CharField(max_length=50)
skype_session_attendance = models.FloatField()
internal_course_marks = models.FloatField()
programming_lab_activity = models.FloatField()
mid_term_marks = models.FloatField()
final_term_marks = models.FloatField()

def __str__(self):
return f'{self.subject, (self.user.username)} Details'


Below is my views.py:

def performanceCalculator(request):
if request.method == 'POST':
performance_form = PerformanceCalculatorForm(request.POST)

if performance_form.is_valid():
sub = performance_form.cleaned_data['subject']

detail = Detail.objects.all().filter(user=request.user, 
subject=sub).first()

result = fuzz_algo(detail.skype_session_attendance,
detail.internal_course_marks, detail.programming_lab_activity,
detail.mid_term_marks, detail.final_term_marks)

messages.success(request, result)

return redirect('performance_calculator')
else:
performance_form = PerformanceCalculatorForm()

context = {
'performance_form': performance_form,
}

return render(request, 'users/performance_calculator.html', context)


and below is my forms.py:

class PerformanceCalculatorForm(forms.Form):
subject = # what should I put here in order to make a dropdown list?

class Meta:
fields = ['subject']



-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/80a6b211-3b38-456d-adb4-067c7dd39991%40googlegroups.com.


pip not working

2020-05-15 Thread Akorede Habeebullah
Hi guys, I need help with my pip. It was working fine until I upgraded it. 
now its not working fine anymore. I tried running all pip commands that I 
know its still not working.
I detected this while trying to install requirements.txt for a cloned 
project , I've tried using  python -m pip install and pip install --user 
but its not working too.

I need help pls.
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5c0ea322-4bbc-4ad8-a901-5d206fed198d%40googlegroups.com.


CouchDB as Django backend database

2020-05-15 Thread Gopesh Shriwas
Hi All,

Can anybody help me on using couchdb as a django backend database. I went 
though with multiple options available on the internet like 
django-couchbase , django-cbtools but didn't find suitable with python3.x 
and django3.x. python-cloudant looks fine to be used as standard client 
library to interact with couchdb but my requirement is to use couchdb as 
full fledged django ORM.

It will be very helpful if somebody can suggest me a better package which 
can be preferred or any other approach to fulfill these requirements.

Thanks,
Gopesh

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/85926b68-3d95-4d42-be47-dcedd8d3b8b9%40googlegroups.com.


Re: pip not working

2020-05-15 Thread Ahmed Khairy
Did you try pip install -r requirements.txt?

On Friday, May 15, 2020 at 10:16:52 AM UTC-4, Akorede Habeebullah wrote:
>
> Hi guys, I need help with my pip. It was working fine until I upgraded it. 
> now its not working fine anymore. I tried running all pip commands that I 
> know its still not working.
> I detected this while trying to install requirements.txt for a cloned 
> project , I've tried using  python -m pip install and pip install --user 
> but its not working too.
>
> I need help pls.
> 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/25e85052-4267-4372-ab08-d1adadbcdc1a%40googlegroups.com.


Re: pip not working

2020-05-15 Thread Kasper Laudrup

Hi Akorede,

On 15/05/2020 09.29, Akorede Habeebullah wrote:
Hi guys, I need help with my pip. It was working fine until I upgraded 
it. now its not working fine anymore. I tried running all pip commands 
that I know its still not working.
I detected this while trying to install requirements.txt for a cloned 
project , I've tried using  python -m pip install and pip install --user 
but its not working too.




It would be much easier for people to help you if you clarify what you 
mean by "not working".


Kind regards,

Kasper Laudrup

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b864da6b-46c8-5ebe-04b4-2a6f3aab1399%40stacktrace.dk.


Re: Issue with Heroku Getting Started

2020-05-15 Thread Jorge Gimeno
On Thu, May 14, 2020 at 5:02 AM J Maryott  wrote:

> Wondering if anyone may be able to shed some light on this...I've cloned
> the latest dev. version of Django from Git, and though I'm a bit of a
> newbie here, and this might sound totally dumb to the professionals (I'm
> unsure), I also tried pip install django.utilsas a last ditch
> effort. It seemed to download a package successfully, but still I'm
> receiving the same error.
>
> I've made it about halfway though the "Getting Started with Python"
> tutorial on the Heroku Dev Center (
> https://devcenter.heroku.com/articles/getting-started-with-python#run-the-app-locally),
> and I get the following error when attempting to run collectstatic:
>
>
> python manage.py collectstatic
>
> Traceback (most recent call last):
>   File "manage.py", line 8, in 
> from django.core.management import execute_from_command_line
>   File 
> "C:\Users\jakem\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\django\__init__.py",
>  line 1, in 
> from django.utils.version import get_version
> ModuleNotFoundError: No module named 'django.utils'
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/1be60359-eb10-4def-90dc-762d1315e66a%40googlegroups.com
> 
> .
>

Can you type pip freeze into your terminal and copy/paste the output here,
please?

-Jorge

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANfN%3DK8r_Eer9AAWqt5ZDivsDCvwco6MgpUKQMbWk9WgZ-e8QQ%40mail.gmail.com.


Re: HOW TO PROTECT SOURCE CODE DEPLOYED TO A REMOTE SERVER

2020-05-15 Thread Sunday Iyanu Ajayi
The solution will be hosted on my client's server therefore they have
access to it. That is why I need a way to protect my source code.
- Is there are way to deployed the compiled python file of my
django project or encrypt the project file?

*AJAYI Sunday *
(+234) 806 771 5394
*sunnexaj...@gmail.com *



On Fri, May 15, 2020 at 2:57 PM Kasper Laudrup 
wrote:

> Hi Sunday,
>
> No need to shout in the subject line.
>
> On 15/05/2020 15.21, Sunday Iyanu Ajayi wrote:
> > I am working for a client that wants to deploy a project I am working on
> > in a remote server and I will like to project my source code when
> > deployed so that they will not be able to mess with it.
> >
> > How can  I  go about it please?
> >
>
> Don't give them access to the production server(s)?
>
> Kind regards,
>
> Kasper Laudrup
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/775ceb24-2293-0bba-16dd-d437852e7da1%40stacktrace.dk
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKYSAw3Njg1a0LstB1DALtcd1L6n-M0ChK4pF3W2xZF%3D0m%2BDsw%40mail.gmail.com.


Re: I'm new to this django help me out

2020-05-15 Thread Sunday Iyanu Ajayi
 You can host the project on a server and share the url

Or can you enlighten me on what you mean by output?- The Web app ?
*AJAYI Sunday *
(+234) 806 771 5394
*sunnexaj...@gmail.com *



On Fri, May 15, 2020 at 3:15 PM sree lekha  wrote:

> how can i share the output of a django program to others
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAC0VY9zxM0SaSoQF5QpywiKbvy0g1LijoB5%2B%3D2y_Ak1gvwmnFQ%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKYSAw3WxqupqA0%3DesFXqNBa_sGs%2Bc3%3Dwih3HmgxyfwYvHL1vw%40mail.gmail.com.


Re: pip not working

2020-05-15 Thread Sunday Iyanu Ajayi
Can you share a screenshot of the error ?
*AJAYI Sunday *
(+234) 806 771 5394
*sunnexaj...@gmail.com *



On Fri, May 15, 2020 at 3:16 PM Akorede Habeebullah 
wrote:

> Hi guys, I need help with my pip. It was working fine until I upgraded it.
> now its not working fine anymore. I tried running all pip commands that I
> know its still not working.
> I detected this while trying to install requirements.txt for a cloned
> project , I've tried using  python -m pip install and pip install --user
> but its not working too.
>
> I need help pls.
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/5c0ea322-4bbc-4ad8-a901-5d206fed198d%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKYSAw2t5KZpJmEqxm4m15wMQvdQOx6iYX1PskYNtTVT8fvb1w%40mail.gmail.com.


Re: I'm new to this django help me out

2020-05-15 Thread Bighnesh Pradhan
use snipping tool

On Fri, May 15, 2020 at 9:47 PM Sunday Iyanu Ajayi 
wrote:

>  You can host the project on a server and share the url
>
> Or can you enlighten me on what you mean by output?- The Web app ?
> *AJAYI Sunday *
> (+234) 806 771 5394
> *sunnexaj...@gmail.com *
>
>
>
> On Fri, May 15, 2020 at 3:15 PM sree lekha 
> wrote:
>
>> how can i share the output of a django program to others
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAC0VY9zxM0SaSoQF5QpywiKbvy0g1LijoB5%2B%3D2y_Ak1gvwmnFQ%40mail.gmail.com
>> 
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAKYSAw3WxqupqA0%3DesFXqNBa_sGs%2Bc3%3Dwih3HmgxyfwYvHL1vw%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAGa5oYziChB%3DKMWASbQ1i6u_CN%3D6n67B4E3br1KUHQX%2B1oi7eA%40mail.gmail.com.


Re: pip not working

2020-05-15 Thread Diego Mota
Hi,
If you upgraded to pip or python 3 you must use "pip3" as command instead
of "pip"

Regards,
Diego

Ahmed Khairy  escreveu no dia sexta,
15/05/2020 à(s) 11:42:

> Did you try pip install -r requirements.txt?
>
> On Friday, May 15, 2020 at 10:16:52 AM UTC-4, Akorede Habeebullah wrote:
>>
>> Hi guys, I need help with my pip. It was working fine until I upgraded
>> it. now its not working fine anymore. I tried running all pip commands that
>> I know its still not working.
>> I detected this while trying to install requirements.txt for a cloned
>> project , I've tried using  python -m pip install and pip install --user
>> but its not working too.
>>
>> I need help pls.
>> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/25e85052-4267-4372-ab08-d1adadbcdc1a%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CALRoQ-sVPgTo2QZJiQX--FzY6687itdkAQcxLZD753STn-yaVw%40mail.gmail.com.


how to use youtube links in my website

2020-05-15 Thread Bunti


I want to make website to show the all the videos of my Youtube channel 
 PLAYLISTS. I mean to say that all of my Youtube videos should be linked to 
my website. 


Can I get any  video tutorial of such type of project with Django?

(I have learned Django upto some level. I can do CURD by function and 
Generic Views, user registration, password update by email etc.) 


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/96d8272e-7b5e-4e04-94ad-7b80f9a0ed87%40googlegroups.com.


Bootstrap drop down not dropping

2020-05-15 Thread sunday honesty
I have tried everything possible to make my bootstrap clik but no way. I 
included bootstrap js, css, jQuery and popper in locally in my static 
directory. I have been stocked for over two weeks. Someone help me out pls.
Here's the link to my code.

https://stackoverflow.com/questions/61709772/my-bootstrap-drop-down-items-are-not-clickable-showing

Pls help out and not too experienced.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/ed30d129-af14-4d2c-aec5-b57605779163%40googlegroups.com.


Bootstrap drop down menu not clickable.

2020-05-15 Thread sunday honesty
This is my first question here. I hope I find answer. Am happy to be with you 
guys.

I am beginner and have been stucked with this issue for about two weeks now.

Because I don't have good network access here, I decided to download and 
include Bootstrap source file in the static folder of my Django project.
I basically included four files to be able to use bootstrap. The files and 
their location are as follow.
my_project_directory
my_priject
static
css
bootstrap.min.css
js
bootstrap.min.js
jQuery.min.js
popper.min.js

I have done all the settings as suggested from one online resource. Settings 
like setting static_url, static_root and staticfile_dir.

I have included {% load static %} at the top of my base.html file and referred 
to the four files in included. I linked css at the head and the three Js at the 
body before closing body.

When I try adding nav bar and drop-down menu, every other things worked except 
for the dropdown. If I click on the item that should reveal the dropdown items, 
it's simply not showing anything but
append # to my home url at the tab.
That is, before, my home page is something like localhost but when I click on 
the dropdown, it changes to localhost/# with nothing dropping down.

I have posted this issue on Stackoverflow but no answer till now.

Here's a link to the codes, may be you can take a look at it.

https://stackoverflow.com/questions/61709772/my-bootstrap-drop-down-items-are-not-clickable-showing

Thanks in advance for helping me out.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d54eb474-8740-42a4-9d7a-2d99227f0160%40googlegroups.com.


Re: CSS with Django forms

2020-05-15 Thread Anubhav Madhav
Thankyou so much Devansh!! This is really very helpful.

On Friday, 15 May 2020 19:46:51 UTC+5:30, Devansh Chaubey wrote:
>
> Hey Anubhav 
> You can use django-widget-tweaks package 
> https://pypi.org/project/django-widget-tweaks/ 
> See this.
> You can make own css styling using class on forms.
>
> On Fri, 15 May 2020 at 00:10, Anubhav Madhav  > wrote:
>
>> Thankyou Clive!! I know I can use CSS like that, but if I do that the 
>> problem I'll face is that the 'form' or the 'input' tags or 'submit' 
>> button, which are rendered using django forms, cannot be modified using CSS 
>> in this way. Is there any other way to fix it?
>>
>> On Wednesday, 13 May 2020 18:58:08 UTC+5:30, Clive Bruton wrote:
>>>
>>>
>>> On 12 May 2020, at 22:41, Anubhav Madhav wrote: 
>>>
>>> > Is there any way to display the forms with my HTML CSS files. 
>>>
>>> Use {% include %} (https://docs.djangoproject.com/en/3.0/ref/ 
>>> templates/builtins/#include) in your HTML template files for an   
>>> embedded style sheet, or just use a link in the head of your template   
>>> to serve the .css from the "static" folder (or other remote server   
>>> location). 
>>>
>>>
>>> -- Clive 
>>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to django...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/d9650e11-31a1-44ff-a4c4-2a59e7ac27cf%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/af4359f1-f111-438a-b025-247bf36e123c%40googlegroups.com.


Re: Issue with Heroku Getting Started

2020-05-15 Thread J Maryott
C:\Users\jakem\python-getting-started>pip freeze
asgiref==3.2.7
dj-database-url==0.5.0
Django==3.0.6
django-heroku==0.3.1
django-utils==0.0.2
gunicorn==20.0.4
psycopg2==2.8.5
pytz==2020.1
sqlparse==0.3.1
whitenoise==5.0.1

On Friday, May 15, 2020 at 11:29:29 AM UTC-4, jlgimeno71 wrote:
>
>
>
> On Thu, May 14, 2020 at 5:02 AM J Maryott > 
> wrote:
>
>> Wondering if anyone may be able to shed some light on this...I've cloned 
>> the latest dev. version of Django from Git, and though I'm a bit of a 
>> newbie here, and this might sound totally dumb to the professionals (I'm 
>> unsure), I also tried pip install django.utilsas a last ditch 
>> effort. It seemed to download a package successfully, but still I'm 
>> receiving the same error.
>>
>> I've made it about halfway though the "Getting Started with Python" 
>> tutorial on the Heroku Dev Center (
>> https://devcenter.heroku.com/articles/getting-started-with-python#run-the-app-locally),
>>  
>> and I get the following error when attempting to run collectstatic:
>>
>>
>> python manage.py collectstatic
>>
>> Traceback (most recent call last):
>>   File "manage.py", line 8, in 
>> from django.core.management import execute_from_command_line
>>   File 
>> "C:\Users\jakem\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\django\__init__.py",
>>  line 1, in 
>> from django.utils.version import get_version
>> ModuleNotFoundError: No module named 'django.utils'
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to django...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/1be60359-eb10-4def-90dc-762d1315e66a%40googlegroups.com
>>  
>> 
>> .
>>
>
> Can you type pip freeze into your terminal and copy/paste the output here, 
> please?
>
> -Jorge
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/eda9f804-4949-4cdd-9b34-8bf7db3b049a%40googlegroups.com.


Re: how to use youtube links in my website

2020-05-15 Thread Kasper Laudrup

Hi Bunti,

On 15/05/2020 20.56, Bunti wrote:
I want to make website to show the all the videos of my Youtube channel 
  PLAYLISTS. I mean to say that all of my Youtube videos should be 
linked to my website.




I'm not sure if I understand you correctly, but do you simply mean to 
show your Youtube playlist on your Django website?


That should be simple enough:

https://support.google.com/youtube/answer/171780?hl=en

Just use the HTML code directly in your Django template.

Kind regards,

Kasper Laudrup

(I have learned Django upto some level. I can do CURD by function and 
Generic Views, user registration, password update by email etc.)



--
You received this message because you are subscribed to the Google 
Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to django-users+unsubscr...@googlegroups.com 
.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/96d8272e-7b5e-4e04-94ad-7b80f9a0ed87%40googlegroups.com 
.


--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/bc365952-6b09-4ba9-06b7-3ba24f3a6ff0%40stacktrace.dk.


How to load content dynamically from database into Bootstrap modal using Django

2020-05-15 Thread Benedict Uwazie
I am working on a testing app that lists out users from the database in a 
HTML table, what I want to achieve is this, when you click on any icon for 
a particular record or row the full detail of that record is displayed in a 
Bootstrap Modal. My problem is how do I implement my views, urls, and also 
my Templates? Do I need Javascript help here? Cause in PHP this is done 
easily without JavaScript. Plesae I will prefer code samples as a 
correction to my issue thanks.

def users(request): 
get_users = User.objects.all() return render(request, 
'classwork_app/users.html', {'users':get_users})

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d8b7dbdf-3b84-411b-b4bc-679b0a9bd5ef%40googlegroups.com.


Re: HOW TO PROTECT SOURCE CODE DEPLOYED TO A REMOTE SERVER

2020-05-15 Thread Motaz Hejaze
maybe there is an option in container technologies , docker maybe or other
containers types , but i didn't try anything like this

On Fri, May 15, 2020 at 6:14 PM Sunday Iyanu Ajayi 
wrote:

> The solution will be hosted on my client's server therefore they have
> access to it. That is why I need a way to protect my source code.
> - Is there are way to deployed the compiled python file of my
> django project or encrypt the project file?
>
> *AJAYI Sunday *
> (+234) 806 771 5394
> *sunnexaj...@gmail.com *
>
>
>
> On Fri, May 15, 2020 at 2:57 PM Kasper Laudrup 
> wrote:
>
>> Hi Sunday,
>>
>> No need to shout in the subject line.
>>
>> On 15/05/2020 15.21, Sunday Iyanu Ajayi wrote:
>> > I am working for a client that wants to deploy a project I am working
>> on
>> > in a remote server and I will like to project my source code when
>> > deployed so that they will not be able to mess with it.
>> >
>> > How can  I  go about it please?
>> >
>>
>> Don't give them access to the production server(s)?
>>
>> Kind regards,
>>
>> Kasper Laudrup
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/775ceb24-2293-0bba-16dd-d437852e7da1%40stacktrace.dk
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAKYSAw3Njg1a0LstB1DALtcd1L6n-M0ChK4pF3W2xZF%3D0m%2BDsw%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAHV4E-dB391LLL-Fud4eMb1VouEfY3p8%3DpUZaNx_fxeJxOX0Dw%40mail.gmail.com.


Re: Issue with Heroku Getting Started

2020-05-15 Thread Jorge Gimeno
Is this in a virtual environment? Are you using pipenv?

-Jorge

On Fri, May 15, 2020 at 1:24 PM J Maryott  wrote:

> C:\Users\jakem\python-getting-started>pip freeze
> asgiref==3.2.7
> dj-database-url==0.5.0
> Django==3.0.6
> django-heroku==0.3.1
> django-utils==0.0.2
> gunicorn==20.0.4
> psycopg2==2.8.5
> pytz==2020.1
> sqlparse==0.3.1
> whitenoise==5.0.1
>
> On Friday, May 15, 2020 at 11:29:29 AM UTC-4, jlgimeno71 wrote:
>>
>>
>>
>> On Thu, May 14, 2020 at 5:02 AM J Maryott  wrote:
>>
>>> Wondering if anyone may be able to shed some light on this...I've cloned
>>> the latest dev. version of Django from Git, and though I'm a bit of a
>>> newbie here, and this might sound totally dumb to the professionals (I'm
>>> unsure), I also tried pip install django.utilsas a last ditch
>>> effort. It seemed to download a package successfully, but still I'm
>>> receiving the same error.
>>>
>>> I've made it about halfway though the "Getting Started with Python"
>>> tutorial on the Heroku Dev Center (
>>> https://devcenter.heroku.com/articles/getting-started-with-python#run-the-app-locally),
>>> and I get the following error when attempting to run collectstatic:
>>>
>>>
>>> python manage.py collectstatic
>>>
>>> Traceback (most recent call last):
>>>   File "manage.py", line 8, in 
>>> from django.core.management import execute_from_command_line
>>>   File 
>>> "C:\Users\jakem\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\django\__init__.py",
>>>  line 1, in 
>>> from django.utils.version import get_version
>>> ModuleNotFoundError: No module named 'django.utils'
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to django...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/1be60359-eb10-4def-90dc-762d1315e66a%40googlegroups.com
>>> 
>>> .
>>>
>>
>> Can you type pip freeze into your terminal and copy/paste the output
>> here, please?
>>
>> -Jorge
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/eda9f804-4949-4cdd-9b34-8bf7db3b049a%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANfN%3DK8cwA3HzqRQ6pLAS0835oK3AZ%3DHgb%2BLZqDHv9GySDwxnQ%40mail.gmail.com.


Re: Issue with Heroku Getting Started

2020-05-15 Thread John McClain
try removing this

django-utils==0.0.2

from requirements then run again to see next error

On Fri, 15 May 2020 at 21:23, J Maryott  wrote:

> C:\Users\jakem\python-getting-started>pip freeze
> asgiref==3.2.7
> dj-database-url==0.5.0
> Django==3.0.6
> django-heroku==0.3.1
> django-utils==0.0.2
> gunicorn==20.0.4
> psycopg2==2.8.5
> pytz==2020.1
> sqlparse==0.3.1
> whitenoise==5.0.1
>
> On Friday, May 15, 2020 at 11:29:29 AM UTC-4, jlgimeno71 wrote:
>>
>>
>>
>> On Thu, May 14, 2020 at 5:02 AM J Maryott  wrote:
>>
>>> Wondering if anyone may be able to shed some light on this...I've cloned
>>> the latest dev. version of Django from Git, and though I'm a bit of a
>>> newbie here, and this might sound totally dumb to the professionals (I'm
>>> unsure), I also tried pip install django.utilsas a last ditch
>>> effort. It seemed to download a package successfully, but still I'm
>>> receiving the same error.
>>>
>>> I've made it about halfway though the "Getting Started with Python"
>>> tutorial on the Heroku Dev Center (
>>> https://devcenter.heroku.com/articles/getting-started-with-python#run-the-app-locally),
>>> and I get the following error when attempting to run collectstatic:
>>>
>>>
>>> python manage.py collectstatic
>>>
>>> Traceback (most recent call last):
>>>   File "manage.py", line 8, in 
>>> from django.core.management import execute_from_command_line
>>>   File 
>>> "C:\Users\jakem\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\django\__init__.py",
>>>  line 1, in 
>>> from django.utils.version import get_version
>>> ModuleNotFoundError: No module named 'django.utils'
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to django...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/1be60359-eb10-4def-90dc-762d1315e66a%40googlegroups.com
>>> 
>>> .
>>>
>>
>> Can you type pip freeze into your terminal and copy/paste the output
>> here, please?
>>
>> -Jorge
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/eda9f804-4949-4cdd-9b34-8bf7db3b049a%40googlegroups.com
> 
> .
>


-- 
John McClain

Cell: 085-1977-823
Skype: jmcclain0129
Email: jmcclain0...@gmail.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAN-hv_p3VGnGn60UeZCg4ktxc%2BQakt5xgd7kyMadF7t7b0VYng%40mail.gmail.com.


Re: HOW TO PROTECT SOURCE CODE DEPLOYED TO A REMOTE SERVER

2020-05-15 Thread John McClain
I'm not sure this is feasible. The issue is likely about getting paid for
you and for them about getting what they paid for. There is no work-a-round
for this dynamic in coding other than to use sandbox server you control for
version control. Once they approve the iterations and pay you can transfer
the code. Otherwise, you are going to have to transfer the code and hope
you get paid.

On Fri, 15 May 2020 at 14:21, Sunday Iyanu Ajayi 
wrote:

> I am working for a client that wants to deploy a project I am working on
> in a remote server and I will like to project my source code when deployed
> so that they will not be able to mess with it.
>
> How can  I  go about it please?
>
> *AJAYI Sunday *
> (+234) 806 771 5394
> *sunnexaj...@gmail.com *
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAKYSAw2PjNzS0Kutg_-DMvwDqQoTrkWpvjwp7K-6JFR1XZ_%3DLQ%40mail.gmail.com
> 
> .
>


-- 
John McClain

Cell: 085-1977-823
Skype: jmcclain0129
Email: jmcclain0...@gmail.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAN-hv_rMjbvxcRWLT03Z-_426Kv%3DfLtPCScBObFJQSisAnkpbw%40mail.gmail.com.


Re: pip not working

2020-05-15 Thread John McClain
you have somehow lost your path to the interpreter. Did you try pip3 by any
chance? What version of pip are you using

On Fri, 15 May 2020 at 15:15, Akorede Habeebullah  wrote:

> Hi guys, I need help with my pip. It was working fine until I upgraded it.
> now its not working fine anymore. I tried running all pip commands that I
> know its still not working.
> I detected this while trying to install requirements.txt for a cloned
> project , I've tried using  python -m pip install and pip install --user
> but its not working too.
>
> I need help pls.
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/5c0ea322-4bbc-4ad8-a901-5d206fed198d%40googlegroups.com
> 
> .
>


-- 
John McClain

Cell: 085-1977-823
Skype: jmcclain0129
Email: jmcclain0...@gmail.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAN-hv_pApVnsakH5aao5iiT8Lv1NJ0%2BKa8s1uG%3D-VAQj0RUs_A%40mail.gmail.com.


Re: how to use youtube links in my website

2020-05-15 Thread John McClain
Can't you just use the script in the body section for this on the html page
you want the video in view on.

On Fri, 15 May 2020 at 20:17, Bunti  wrote:

> I want to make website to show the all the videos of my Youtube channel
>  PLAYLISTS. I mean to say that all of my Youtube videos should be linked to
> my website.
>
>
> Can I get any  video tutorial of such type of project with Django?
>
> (I have learned Django upto some level. I can do CURD by function and
> Generic Views, user registration, password update by email etc.)
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/96d8272e-7b5e-4e04-94ad-7b80f9a0ed87%40googlegroups.com
> 
> .
>


-- 
John McClain

Cell: 085-1977-823
Skype: jmcclain0129
Email: jmcclain0...@gmail.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAN-hv_qsELgRoZDTwS0HU2i9AWFSgBQLE0XcVRuY7GAADHo25w%40mail.gmail.com.


Re: Issue with Heroku Getting Started

2020-05-15 Thread Jorge Gimeno
On Fri, May 15, 2020 at 5:27 PM John McClain  wrote:

> try removing this
>
> django-utils==0.0.2
>
> from requirements then run again to see next error
>

Good catch!  I'll bet there's a name collision here.

-Jorge

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANfN%3DK8DX2sFNm5s1oLoPdN6uCkKc42cL8TAbm%2BEirkFuZSu0Q%40mail.gmail.com.


Re: CSS with Django forms

2020-05-15 Thread Clive Bruton
You can use bootsrap4, or look at the output from the forms and set  
up your CSS around that.



-- Clive

On 14 May 2020, at 19:40, Anubhav Madhav wrote:

Thankyou Clive!! I know I can use CSS like that, but if I do that  
the problem I'll face is that the 'form' or the 'input' tags or  
'submit' button, which are rendered using django forms, cannot be  
modified using CSS in this way. Is there any other way to fix it?


On Wednesday, 13 May 2020 18:58:08 UTC+5:30, Clive Bruton wrote:
On 12 May 2020, at 22:41, Anubhav Madhav wrote:

> Is there any way to display the forms with my HTML CSS files.

Use {% include %} (https://docs.djangoproject.com/en/3.0/ref/
templates/builtins/#include) in your HTML template files for an
embedded style sheet, or just use a link in the head of your template
to serve the .css from the "static" folder (or other remote server
location).


-- Clive 


--
You received this message because you are subscribed to the Google  
Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it,  
send an email to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/ 
d/msgid/django-users/d9650e11-31a1-44ff-a4c4-2a59e7ac27cf% 
40googlegroups.com.


--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/60071141-DB7F-4D3B-8529-148FDE2A6C57%40indx.co.uk.