Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sql injection #2

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions .idea/Herbworld.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/prettier.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 14 additions & 3 deletions herb_world/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@
ALLOWED_HOSTS = []


PSQL_HOST = os.environ.get('PSQL_HOST')
PSQL_PORT = os.environ.get('PSQL_PORT')
PSQL_USER = os.environ.get('PSQL_USER')
PSQL_PASSWORD = os.environ.get('PSQL_PASSWORD')
PSQL_DB = os.environ.get('PSQL_DB')


# Application definition

INSTALLED_APPS = [
Expand Down Expand Up @@ -82,9 +89,13 @@
# https://docs.djangoproject.com/en/2.2/ref/settings/#databases

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
"default": {
"ENGINE": "django.db.backends.postgresql",
"NAME": PSQL_DB,
"USER": PSQL_USER,
"PASSWORD": PSQL_PASSWORD,
"HOST": PSQL_HOST,
"PORT": PSQL_PORT,
}
}

Expand Down
24 changes: 11 additions & 13 deletions herbworldapp/templates/herbworldapp/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@
{% block body %}

{% csrf_token %}
{% if messages %} <!-- you can put css for this message-->
{% for message in messages %}
{{ message }}
{% endfor %}
{% if messages %}
<!-- you can put css for this message-->
{% for message in messages %}
{{ message }}
{% endfor %}
{% endif %}

<div class="container">
Expand Down Expand Up @@ -64,7 +65,8 @@ <h1 data-aos="fade-right" class="homemodule__heading"> <span id="counter">10000<
<div class="row">
<div class="col">
<p data-aos="fade-right">
Plants bring natural beauty to our living spaces. By creating texture and balance, a room or patio can be transformed into an environment that comforts and welcomes.
Plants bring natural beauty to our living spaces. By creating texture and balance, a room or patio can be
transformed into an environment that comforts and welcomes.
But, just like Miss Universe, plants can do more than look pretty.
Come and explore the world of home-plants with Us!
</p>
Expand All @@ -91,8 +93,8 @@ <h1 data-aos="fade-right" class="homemodule__heading">500+ <span style="color: #
<div class="row">
<div class="col">
<p data-aos="fade-right">
Each of Nursery partners gaurantee quality plants and plant-related products.
Browse through more than 500 Nurseries and find the one nearest you to bring your green friends home!
Each of Nursery partners gaurantee quality plants and plant-related products.
Browse through more than 500 Nurseries and find the one nearest you to bring your green friends home!
</p>
</div>
</div>
Expand All @@ -105,12 +107,8 @@ <h1 data-aos="fade-right" class="homemodule__heading">500+ <span style="color: #


{% block js %}
var interval = setInterval(function() {
$('#counter').text(number);
if (number >= 5000) clearInterval(interval);
number++;
}, 30);



{% endblock %}

{% endblock %}
Loading