-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #65 from anurag6569201/main
- Loading branch information
Showing
59 changed files
with
532 additions
and
646 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
from django.contrib import admin | ||
from news.models import Headline | ||
from core.models import Headline,Bookmark | ||
|
||
admin.site.register(Headline) | ||
admin.site.register(Headline) | ||
admin.site.register(Bookmark) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Generated by Django 5.0.6 on 2024-05-21 11:05 | ||
|
||
import django.db.models.deletion | ||
from django.conf import settings | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Headline', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('title', models.CharField(max_length=200)), | ||
('image', models.URLField(blank=True, null=True)), | ||
('url', models.TextField()), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name='Bookmark', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), | ||
('headline', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.headline')), | ||
], | ||
), | ||
] |
Binary file added
BIN
+1.83 KB
newsaggregator/core/migrations/__pycache__/0001_initial.cpython-312.pyc
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
newsaggregator/core/migrations/__pycache__/__init__.cpython-312.pyc
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,16 @@ | ||
from django.db import models | ||
from django.conf import settings | ||
|
||
# Create your models here. | ||
class Headline(models.Model): | ||
title = models.CharField(max_length=200)#title char(200) | ||
image = models.URLField(null=True, blank=True)#image | ||
url = models.TextField() | ||
def __str__(self): | ||
return self.title | ||
|
||
class Bookmark(models.Model): | ||
user = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE) | ||
headline = models.ForeignKey(Headline, on_delete=models.CASCADE) | ||
|
||
def __str__(self): | ||
return f"{self.user} - {self.headline.title}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Empty file.
Binary file removed
BIN
-1.04 KB
newsaggregator/news/migrations/__pycache__/0001_initial.cpython-312.pyc
Binary file not shown.
Binary file removed
BIN
-184 Bytes
newsaggregator/news/migrations/__pycache__/__init__.cpython-311.pyc
Binary file not shown.
Binary file removed
BIN
-193 Bytes
newsaggregator/news/migrations/__pycache__/__init__.cpython-312.pyc
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file modified
BIN
+0 Bytes
(100%)
newsaggregator/newsaggregator/__pycache__/__init__.cpython-312.pyc
Binary file not shown.
Binary file modified
BIN
-6 Bytes
(100%)
newsaggregator/newsaggregator/__pycache__/settings.cpython-312.pyc
Binary file not shown.
Binary file modified
BIN
-43 Bytes
(93%)
newsaggregator/newsaggregator/__pycache__/urls.cpython-312.pyc
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
newsaggregator/newsaggregator/__pycache__/wsgi.cpython-312.pyc
Binary file not shown.
Oops, something went wrong.