Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yeboahd24/disneyhostar
https://github.com/yeboahd24/disneyhostar
Last synced: 7 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/yeboahd24/disneyhostar
- Owner: yeboahd24
- Created: 2022-03-22T19:33:30.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-11-09T02:57:10.000Z (about 2 years ago)
- Last Synced: 2024-11-17T11:20:32.011Z (2 months ago)
- Language: HTML
- Size: 1.37 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# DisneyPlus Clone Project
This is a simple project that allow users to upload their favorite moviesFrom the backend (django admin) to the frontend it also have google authentication
That allows users to login with thier google account.
This project [DisneyPlusCone](https://disneyplus.onrender.com/) is hosted on render server## Models
```python
class BannerCards(models.Model):
title = models.CharField(max_length=200)
category = models.CharField(max_length=100)
content = models.TextField()
imageurl = models.CharField(max_length=1000)
targetUrl = models.CharField(max_length=1000)def __str__(self):
return self.titleclass Cards(models.Model):
title = models.CharField(max_length=200)
category = models.CharField(max_length=100)
imageurl = models.CharField(max_length=1000)
targetUrl = models.CharField(max_length=1000)def __str__(self):
return self.title
``````python
def home(request):
bannerCards = BannerCards.objects.all()
cards = Cards.objects.all()
context = {
'bannerCards': bannerCards,
'cards': cards,
}
return render(request, "Home/home.html", context)def search(request):
query = request.GET['query']
title = Cards.objects.filter(title__icontains=query)
category = Cards.objects.filter(category__icontains=query)
allCards = title.union(category)
context = {
'allCards': allCards,
"query": query,
}
return render(request, "Home/search.html", context)def logout(request):
auth.logout(request)
return redirect("/")```
### Project Setup
```
1. python3 -m venv project
2. source project/bin/activate
3. pip install -r requirements.txt
4. python3 manage.py test
5. python3 manage.py runserver
```