diff --git a/myproject/myapp/__pycache__/__init__.cpython-310.pyc b/myproject/myapp/__pycache__/__init__.cpython-310.pyc index a599ed25ee03d644228f85ccee265270f04c19bb..90e1f184c1d2610e7cb73615936201cc4d1003a7 100644 Binary files a/myproject/myapp/__pycache__/__init__.cpython-310.pyc and b/myproject/myapp/__pycache__/__init__.cpython-310.pyc differ diff --git a/myproject/myapp/__pycache__/apps.cpython-310.pyc b/myproject/myapp/__pycache__/apps.cpython-310.pyc index 1e73d400192b6ce43f63230e39c8d3eaedcbfa38..78e9148825a43e1980af163b97f9be57b98d0b2e 100644 Binary files a/myproject/myapp/__pycache__/apps.cpython-310.pyc and b/myproject/myapp/__pycache__/apps.cpython-310.pyc differ diff --git a/myproject/myapp/migrations/0001_initial.py b/myproject/myapp/migrations/0001_initial.py new file mode 100644 index 0000000000000000000000000000000000000000..8bf97a1828c19c6390cd48e0d5fe71fede0807d9 --- /dev/null +++ b/myproject/myapp/migrations/0001_initial.py @@ -0,0 +1,21 @@ +# Generated by Django 5.0.1 on 2024-03-04 13:30 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='Audio', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('file', models.FileField(upload_to='audio', verbose_name='audio')), + ], + ), + ] diff --git a/myproject/myapp/models.py b/myproject/myapp/models.py index b8208e7a9976a067aa04bcd3a464dd3f9218e6c9..4e65c8beebbdefeeb38ef52cbcd56dd4fff5561a 100644 --- a/myproject/myapp/models.py +++ b/myproject/myapp/models.py @@ -1,4 +1,4 @@ -# from django.db import models +from django.db import models # # Usertypes # # --------- @@ -57,4 +57,5 @@ # data = models.CharField(max_length=2000) # uploader = models.ForeignKey("User", on_delete=models.CASCADE) - +class Audio(models.Model): + file = models.FileField('audio', upload_to='audio') \ No newline at end of file diff --git a/myproject/myapp/static/src/media/G53-44104-1111-00083.wav b/myproject/myapp/static/src/media/G53-44104-1111-00083.wav new file mode 100644 index 0000000000000000000000000000000000000000..16db7104451f5e6bf8f9129cca860dc084db1789 Binary files /dev/null and b/myproject/myapp/static/src/media/G53-44104-1111-00083.wav differ diff --git a/myproject/myapp/templates/_base.html b/myproject/myapp/templates/_base.html index fef30c68f104fdc72b9b292d99865562e0f1a494..2f934a25e7a9f2df2e633520b35590c7e0a22142 100644 --- a/myproject/myapp/templates/_base.html +++ b/myproject/myapp/templates/_base.html @@ -98,8 +98,8 @@ <footer class="bg-white dark:bg-gray-900 fixed bottom-0 w-full"> <div class="mx-auto w-full max-w-screen-xl py-6 lg:py-8"> <div class="md:flex md:justify-between"> - <div class="mb-2 md:mb-0"> - <img src="https://upload.wikimedia.org/wikipedia/commons/1/11/UWE_Bristol_logo.svg" class="h-10 me-4" alt="UWE Logo" /> + <div class="mb-6 md:mb-0"> + <img src="https://upload.wikimedia.org/wikipedia/commons/1/11/UWE_Bristol_logo.svg" class="me-4" alt="UWE Logo" /> </a> </div> <div class="grid grid-cols-2 gap-5 sm:gap-6 sm:grid-cols-3"> @@ -129,46 +129,22 @@ <h2 class="mb-6 text-sm font-semibold text-gray-900 uppercase dark:text-white">Legal</h2> <ul class="text-gray-500 dark:text-gray-400 font-medium"> <li class="mb-4"> - <a href="#" class="hover:underline">Privacy Policy</a> + <a href="{% url 'privacy_policy' %}" class="hover:underline">Privacy Policy</a> </li> <li> - <a href="#" class="hover:underline">Terms & Conditions</a> + <a href="{% url 'terms_conditions' %}" class="hover:underline">Terms & Conditions</a> </li> </ul> </div> </div> </div> + <hr class="my-6 border-gray-200 sm:mx-auto dark:border-gray-700 lg:my-8" /> <div class="sm:flex sm:items-center sm:justify-between"> <span class="text-sm text-gray-500 sm:text-center dark:text-gray-400">© 2024 <a href="https://flowbite.com/" class="hover:underline">DESD Group 25</a>. All Rights Reserved. </span> - <div class="flex mt-4 sm:justify-center sm:mt-0"> - {% comment %} <a href="#" class="text-gray-500 hover:text-gray-900 dark:hover:text-white"> - <svg class="w-4 h-4" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 8 19"> - <path fill-rule="evenodd" d="M6.135 3H8V0H6.135a4.147 4.147 0 0 0-4.142 4.142V6H0v3h2v9.938h3V9h2.021l.592-3H5V3.591A.6.6 0 0 1 5.592 3h.543Z" clip-rule="evenodd"/> - </svg> {% endcomment %} - <span class="sr-only">Facebook page</span> - </a> - {% comment %} <a href="#" class="text-gray-500 hover:text-gray-900 dark:hover:text-white ms-5"> - <svg class="w-4 h-4" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 21 16"> - <path d="M16.942 1.556a16.3 16.3 0 0 0-4.126-1.3 12.04 12.04 0 0 0-.529 1.1 15.175 15.175 0 0 0-4.573 0 11.585 11.585 0 0 0-.535-1.1 16.274 16.274 0 0 0-4.129 1.3A17.392 17.392 0 0 0 .182 13.218a15.785 15.785 0 0 0 4.963 2.521c.41-.564.773-1.16 1.084-1.785a10.63 10.63 0 0 1-1.706-.83c.143-.106.283-.217.418-.33a11.664 11.664 0 0 0 10.118 0c.137.113.277.224.418.33-.544.328-1.116.606-1.71.832a12.52 12.52 0 0 0 1.084 1.785 16.46 16.46 0 0 0 5.064-2.595 17.286 17.286 0 0 0-2.973-11.59ZM6.678 10.813a1.941 1.941 0 0 1-1.8-2.045 1.93 1.93 0 0 1 1.8-2.047 1.919 1.919 0 0 1 1.8 2.047 1.93 1.93 0 0 1-1.8 2.045Zm6.644 0a1.94 1.94 0 0 1-1.8-2.045 1.93 1.93 0 0 1 1.8-2.047 1.918 1.918 0 0 1 1.8 2.047 1.93 1.93 0 0 1-1.8 2.045Z"/> - </svg> {% endcomment %} - <span class="sr-only">Discord</span> - </a> - {% comment %} <a href="#" class="text-gray-500 hover:text-gray-900 dark:hover:text-white ms-5"> - <svg class="w-4 h-4" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 17"> - <path fill-rule="evenodd" d="M20 1.892a8.178 8.178 0 0 1-2.355.635 4.074 4.074 0 0 0 1.8-2.235 8.344 8.344 0 0 1-2.605.98A4.13 4.13 0 0 0 13.85 0a4.068 4.068 0 0 0-4.1 4.038 4 4 0 0 0 .105.919A11.705 11.705 0 0 1 1.4.734a4.006 4.006 0 0 0 1.268 5.392 4.165 4.165 0 0 1-1.859-.5v.05A4.057 4.057 0 0 0 4.1 9.635a4.19 4.19 0 0 1-1.856.07 4.108 4.108 0 0 0 3.831 2.807A8.36 8.36 0 0 1 0 14.184 11.732 11.732 0 0 0 6.291 16 11.502 11.502 0 0 0 17.964 4.5c0-.177 0-.35-.012-.523A8.143 8.143 0 0 0 20 1.892Z" clip-rule="evenodd"/> - </svg> {% endcomment %} - <span class="sr-only">Twitter page</span> - </a> - <a href="#" class="text-gray-500 hover:text-gray-900 dark:hover:text-white ms-5"> - {% comment %} <svg class="w-4 h-4" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20"> - <path fill-rule="evenodd" d="M10 .333A9.911 9.911 0 0 0 6.866 19.65c.5.092.678-.215.678-.477 0-.237-.01-1.017-.014-1.845-2.757.6-3.338-1.169-3.338-1.169a2.627 2.627 0 0 0-1.1-1.451c-.9-.615.07-.6.07-.6a2.084 2.084 0 0 1 1.518 1.021 2.11 2.11 0 0 0 2.884.823c.044-.503.268-.973.63-1.325-2.2-.25-4.516-1.1-4.516-4.9A3.832 3.832 0 0 1 4.7 7.068a3.56 3.56 0 0 1 .095-2.623s.832-.266 2.726 1.016a9.409 9.409 0 0 1 4.962 0c1.89-1.282 2.717-1.016 2.717-1.016.366.83.402 1.768.1 2.623a3.827 3.827 0 0 1 1.02 2.659c0 3.807-2.319 4.644-4.525 4.889a2.366 2.366 0 0 1 .673 1.834c0 1.326-.012 2.394-.012 2.72 0 .263.18.572.681.475A9.911 9.911 0 0 0 10 .333Z" clip-rule="evenodd"/> - </svg> {% endcomment %} - <span class="sr-only">GitHub account</span> - </div> - </div> - </div> + </div> </footer> + </html> diff --git a/myproject/myapp/templates/index.html b/myproject/myapp/templates/index.html deleted file mode 100644 index bd101b786dcd387866066dc68702626b8d711db2..0000000000000000000000000000000000000000 --- a/myproject/myapp/templates/index.html +++ /dev/null @@ -1,26 +0,0 @@ -{% extends "_base.html" %} - -{% block content %} - <section class="bg-white dark:bg-gray-900"> - <div class="gap-16 items-center py-8 px-4 mx-auto max-w-screen-xl lg:grid lg:grid-cols-2 lg:py-16 lg:px-6"> - <div class="font-light text-gray-500 sm:text-lg dark:text-gray-400"> - <h2 class="mb-4 text-4xl tracking-tight font-extrabold text-gray-900 dark:text-white">An Intelligent System for Instrument Detection</h2> - <p class="mb-4">*placeholder input* We present to you a intelligent system for instrument detection. Using audio processing techinques and a convolutionsal - neural network we are able to classify instruments used in a song. other exciting words that might catch peoples attention and make them use our product. - To use our service upload an mp3 file below. - *placeholder input* - </p> - </div> - <div class="grid grid-cols-2 gap-4 mt-8"> - {% load static %} - <img class="w-full rounded-lg" src="{% static 'src/images/0_IPKn3dedq86U4UqP.png' %}" alt="CNN for audio"> - </div> - </div> - <div class="gap-16 items-center py-8 px-4 mx-auto max-w-screen-xl lg:grid lg:grid-cols-2 lg:py-16 lg:px-6"> - <input class="block w-full text-sm text-gray-900 border border-gray-300 rounded-lg cursor-pointer bg-gray-50 dark:text-gray-400 focus:outline-none dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400" id="file_input" type="file"> - <button type="button" class="text-white bg-gray-800 hover:bg-gray-900 focus:outline-none focus:ring-4 focus:ring-gray-300 font-medium rounded-lg text-sm px-5 py-2.5 me-2 mb-2 dark:bg-gray-800 dark:hover:bg-gray-700 dark:focus:ring-gray-700 dark:border-gray-700">Run Algorithm</button> - </div> -</section> - - -{% endblock content %} \ No newline at end of file diff --git a/myproject/myapp/templates/index1.html b/myproject/myapp/templates/index1.html new file mode 100644 index 0000000000000000000000000000000000000000..6e3f604685dd455c8429972a218241131563e951 --- /dev/null +++ b/myproject/myapp/templates/index1.html @@ -0,0 +1,62 @@ +{% extends "_base.html" %} + +{% block content %} + <section class="bg-white dark:bg-gray-900"> + <div class="gap-16 items-center py-8 px-4 mx-auto max-w-screen-xl lg:grid lg:grid-cols-2"> + <div class="font-light text-gray-500 sm:text-lg dark:text-gray-400"> + <h2 class="mb-4 text-4xl tracking-tight font-extrabold text-gray-900 dark:text-white">An Intelligent System for Instrument Detection</h2> + <p class="mb-4">*placeholder input* We present to you a intelligent system for instrument detection. Using audio processing techinques and a convolutionsal + neural network we are able to classify instruments used in a song. other exciting words that might catch peoples attention and make them use our product. + To use our service upload an mp3 file below. + *placeholder input* + </p> + </div> + <div class="grid gap-4 mt-8"> + {% load static %} + <img class="w-240 h-60 rounded-lg" src="{% static 'src/images/0_IPKn3dedq86U4UqP.png' %}" alt="CNN for audio"> + </div> + </div> + <div > + <form enctype="multipart/form-data" method="post" class="gap-16 items-center py-8 px-4 mx-auto max-w-screen-xl lg:grid lg:grid-cols-2"> + {% csrf_token %} + <input + class="block w-full text-sm text-gray-900 border border-gray-300 rounded-lg cursor-pointer bg-gray-50 dark:text-gray-400 focus:outline-none dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400" + id="audio_file" + name="audio_file" + type="file"> + + + <button type="submit" class="text-white bg-gray-800 hover:bg-gray-900 focus:outline-none focus:ring-4 focus:ring-gray-300 font-medium rounded-lg text-sm px-5 py-2.5 me-2 mb-2 dark:bg-gray-800 dark:hover:bg-gray-700 dark:focus:ring-gray-700 dark:border-gray-700"> + Run Algorithm + </button> + </form> + </div> + + <audio id="myAudio"> + <source src="{% static 'src/media/G53-44104-1111-00083.wav' %}" type="audio/wav"> + Your browser does not support the audio element. + </audio> + + <div class="gap-16 items-center py-8 px-4 mx-auto max-w-screen-xl lg:grid lg:grid-cols-2 lg:py-8"> + <button onclick="playAudio()" type="button" class="text-white bg-gray-800 hover:bg-gray-900 focus:outline-none focus:ring-4 focus:ring-gray-300 font-medium rounded-lg text-sm px-5 py-2.5 me-2 mb-2 dark:bg-gray-800 dark:hover:bg-gray-700 dark:focus:ring-gray-700 dark:border-gray-700"> + Play Audio</button> + <button onclick="pauseAudio()" type="button" class="text-white bg-gray-800 hover:bg-gray-900 focus:outline-none focus:ring-4 focus:ring-gray-300 font-medium rounded-lg text-sm px-5 py-2.5 me-2 mb-2 dark:bg-gray-800 dark:hover:bg-gray-700 dark:focus:ring-gray-700 dark:border-gray-700"> + Pause Audio</button> + </div> + + <script> + var x = document.getElementById("myAudio"); + + function playAudio() { + x.play(); + } + + function pauseAudio() { + x.pause(); + } + </script> + +</section> + + +{% endblock content %} \ No newline at end of file diff --git a/myproject/myapp/templates/index2.html b/myproject/myapp/templates/index2.html new file mode 100644 index 0000000000000000000000000000000000000000..7cf84cd548c3d740ac54daec2b96a4fb952fd440 --- /dev/null +++ b/myproject/myapp/templates/index2.html @@ -0,0 +1,41 @@ +{% extends "_base.html" %} + +{% block content %} + <section class="bg-white dark:bg-gray-900"> + <div class="gap-16 items-center py-8 px-4 mx-auto max-w-screen-xl lg:grid lg:grid-cols-2 lg:py-16 lg:px-6"> + <div class="font-light text-gray-500 sm:text-lg dark:text-gray-400"> + <h2 class="mb-4 text-4xl tracking-tight font-extrabold text-gray-900 dark:text-white">An Intelligent System for Instrument Detection</h2> + <p class="mb-4">*placeholder input* We present to you a intelligent system for instrument detection. Using audio processing techinques and a convolutionsal + neural network we are able to classify instruments used in a song. other exciting words that might catch peoples attention and make them use our product. + To use our service upload an mp3 file below. + *placeholder input* + </p> + </div> + <div class="grid gap-4 mt-8"> + {% load static %} + <img class="w-240 h-60 rounded-lg" src="{% static 'src/images/0_IPKn3dedq86U4UqP.png' %}" alt="CNN for audio"> + </div> + </div> + <section class="bg-white dark:bg-gray-900"> + <div class="py-8 px-4 mx-auto max-w-screen-xl text-center lg:py-16 lg:px-6"> + <div class="mx-auto max-w-screen-sm"> + <h2 class="mb-4 text-4xl tracking-tight font-extrabold text-gray-900 dark:text-white"> + Want use to our service? + </h2> + <p class="mb-8 font-light text-gray-500 lg:mb-16 sm:text-xl dark:text-gray-400"> + <a href="{% url 'register' %}" class="inline-flex items-center font-medium text-primary-600 hover:text-primary-800 dark:text-primary-500 dark:hover:text-primary-700">Sign up</a> + or <a href="{% url 'login' %}" class="inline-flex items-center font-medium text-primary-600 hover:text-primary-800 dark:text-primary-500 dark:hover:text-primary-700">Login!</a> + Choose one of our exceptionally well priced payment offers and enjoy our service to it's fullest! + </p> + </div> + </div> + </section> +{% comment %} <section class="bg-white dark:bg-gray-900"> + <div class="gap-4 items-center py-8 px-4 mx-auto max-w-screen-xl lg:grid lg:grid-cols-2 lg:py-16 lg:px-6 cursor-not-allowed"> + <input class="block w-full text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 dark:text-gray-400 focus:outline-none dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 cursor-not-allowed" id="file_input" type="file" disabled> + <button type="button" class="text-white bg-gray-800 focus:outline-none focus:ring-4 focus:ring-gray-300 font-medium rounded-lg text-sm px-5 py-2.5 me-2 mb-2 dark:bg-gray-800 dark:focus:ring-gray-700 dark:border-gray-700 cursor-not-allowed" disabled>Run Algorithm</button> + </div> {% endcomment %} +</section> + + +{% endblock content %} \ No newline at end of file diff --git a/myproject/myapp/templates/privacy_policy.html b/myproject/myapp/templates/privacy_policy.html new file mode 100644 index 0000000000000000000000000000000000000000..409f77530974dc3e3007cadda9ccca9a134cfd94 --- /dev/null +++ b/myproject/myapp/templates/privacy_policy.html @@ -0,0 +1,19 @@ +{% extends "_base.html"%} +{% block content %} +<section class="bg-white dark:bg-gray-900"> + <div class="py-8 px-4 mx-auto max-w-screen-xl sm:py-16 lg:px-6"> + <h2 class="mb-8 text-4xl tracking-tight font-extrabold text-gray-900 dark:text-white">Privacy Policy</h2> + <p class="text-gray-500 dark:text-gray-400"> + Effective date: 27/02/2024 + + </p> + <p class="text-gray-500 dark:text-gray-400"> + Group 25 operates the Instrument Classifier application. + This page informs you of our policies regarding the collection, use, and disclosure of personal data when you use our App and the choices you have associated with that data. + </p> + <br></br> + <div class="grid pt-8 text-left border-t border-gray-200 md:gap-16 dark:border-gray-700 md:grid-cols-2"> + + </div> + </section> +{% endblock content %} \ No newline at end of file diff --git a/myproject/myapp/templates/terms_conditions.html b/myproject/myapp/templates/terms_conditions.html new file mode 100644 index 0000000000000000000000000000000000000000..53685f9d0e9a1daf5c6aa2bf14f58926c92bb65f --- /dev/null +++ b/myproject/myapp/templates/terms_conditions.html @@ -0,0 +1,129 @@ +{% extends "_base.html"%} +{% block content %} +<section class="bg-white dark:bg-gray-900"> + <div class="py-8 px-4 mx-auto max-w-screen-xl sm:py-16 lg:px-6"> + <h2 class="mb-8 text-4xl tracking-tight font-extrabold text-gray-900 dark:text-white">Terms and Conditions</h2> + <div class="grid pt-8 text-left border-t border-gray-200 md:gap-16 dark:border-gray-700 md:grid-cols-2"> + <div> + <div class="mb-10"> + <h3 class="flex items-center mb-4 text-lg font-medium text-gray-900 dark:text-white"> + 1. Use of the App + </h3> + <p class="text-gray-500 dark:text-gray-400"> + 1.1. License: + </p> + <p class="text-gray-500 dark:text-gray-400"> + We grant you a limited, non-exclusive, non-transferable, revocable license to use the App for your personal or internal business purposes. + </p> + <p class="text-gray-500 dark:text-gray-400"> + 1.2. Prohibited Activities: + </p> + <p class="text-gray-500 dark:text-gray-400"> + You agree not to: + </p> + <p class="text-gray-500 dark:text-gray-400"> + Use the App in any unlawful manner or in a manner that violates these Terms. + Reverse engineer, modify, or create derivative works of the App. + Interfere with the operation of the App or any user's enjoyment of the App. + Use the App for any commercial purpose without our prior written consent. + Use the App to infringe upon any intellectual property rights. + </p> + <p class="text-gray-500 dark:text-gray-400"> + 1.3. Accuracy of Information: + </p> + <p class="text-gray-500 dark:text-gray-400"> + We do not warrant the accuracy, completeness, or reliability of any content generated by the App. You acknowledge that the App's results may vary and may not always be accurate.</p> + </p> + </div> + <div class="mb-10"> + <h3 class="flex items-center mb-4 text-lg font-medium text-gray-900 dark:text-white"> + 2. Intellectual Property Rights + </h3> + <p class="text-gray-500 dark:text-gray-400"> + 2.1. Ownership: + </p> + <p class="text-gray-500 dark:text-gray-400"> + All rights, title, and interest in and to the App, including all intellectual property rights, are and will remain owned by us. + </p> + <p class="text-gray-500 dark:text-gray-400"> + 2.2. Feedback: + </p> + <p class="text-gray-500 dark:text-gray-400"> + If you provide us with any feedback or suggestions regarding the App, you grant us a non-exclusive, royalty-free, worldwide, perpetual, irrevocable license to use and incorporate such feedback into the App. + </p> + </div> + <div class="mb-10"> + <h3 class="flex items-center mb-4 text-lg font-medium text-gray-900 dark:text-white"> + 3. Privacy + </h3> + <p class="text-gray-500 dark:text-gray-400"> + 3.1. Data Collection: + </p> + <p class="text-gray-500 dark:text-gray-400"> + By using the App, you consent to the collection and use of your data as described in our Privacy Policy. + </p> + <p class="text-gray-500 dark:text-gray-400"> + 3.2. User Data: + </p> + <p class="text-gray-500 dark:text-gray-400"> + You are solely responsible for the accuracy, legality, and reliability of any data you input into the App. + </p> + </div> + </div> + <div> + <div class="mb-10"> + <h3 class="flex items-center mb-4 text-lg font-medium text-gray-900 dark:text-white"> + 4. Limitation of Liability + </h3> + <p class="text-gray-500 dark:text-gray-400"> + 4.1. Disclaimer: + </p> + <p class="text-gray-500 dark:text-gray-400"> + To the fullest extent permitted by applicable law, the app is provided "as is," without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability, fitness for a particular purpose, or non-infringement. + </p> + <p class="text-gray-500 dark:text-gray-400"> + 4.2. Limitation of Liability: + </p> + <p class="text-gray-500 dark:text-gray-400"> + In no event shall we be liable for any indirect, incidental, special, consequential, or punitive damages, or any loss of profits or revenues, whether incurred directly or indirectly, or any loss of data, use, goodwill, or other intangible losses, arising out of your access to or use of the app, regardless of whether we have been advised of the possibility of such damages. + </p> + </div> + <div class="mb-10"> + <h3 class="flex items-center mb-4 text-lg font-medium text-gray-900 dark:text-white"> + 5. Governing Law + </h3> + <p class="text-gray-500 dark:text-gray-400"> + 5.1. Jurisdiction: + </p> + <p class="text-gray-500 dark:text-gray-400"> + These Terms shall be governed by and construed in accordance with the laws of the United Kingdom, without regard to its conflict of law provisions. + </p> + <p class="text-gray-500 dark:text-gray-400"> + 5.2. Dispute Resolution: + </p> + <p class="text-gray-500 dark:text-gray-400"> + Any dispute arising out of or relating to these Terms or the App shall be resolved exclusively in the courts located in the United Kingdom. + </p> + </div> + <div class="mb-10"> + <h3 class="flex items-center mb-4 text-lg font-medium text-gray-900 dark:text-white"> + 6. Changes to Terms + </h3> + <p class="text-gray-500 dark:text-gray-400"> + 6.1. Modification: + </p> + <p class="text-gray-500 dark:text-gray-400"> + We reserve the right, at our sole discretion, to modify or replace these Terms at any time. If a revision is material, we will provide at least 10 days' notice prior to any new terms taking effect. What constitutes a material change will be determined at our sole discretion. + </p> + <p class="text-gray-500 dark:text-gray-400"> + 6.2. Continued Use: + </p> + <p class="text-gray-500 dark:text-gray-400"> + By continuing to access or use the App after any revisions become effective, you agree to be bound by the revised Terms. If you do not agree to the new Terms, you are no longer authorized to use the App. + </p> + </div> + </div> + </div> + </div> + </section> +{% endblock content %} \ No newline at end of file diff --git a/myproject/myapp/urls.py b/myproject/myapp/urls.py index 3580dadcbce8c54e96968963b43507604105855c..727aa511bdf65f67007a92dca753ebe14c9dfd58 100644 --- a/myproject/myapp/urls.py +++ b/myproject/myapp/urls.py @@ -6,6 +6,11 @@ from .views import handler404 from .views import handler500 from .views import register from .views import login +from .views import terms_conditions +from .views import privacy_policy + + + from .views import pricing urlpatterns = [ @@ -17,6 +22,8 @@ urlpatterns = [ path('maintenance/', maintenance), path('register/', register, name='register'), path('login/', login, name='login'), + path('terms_conditions/', terms_conditions, name='terms_conditions'), + path('pricay_policy/', privacy_policy, name='privacy_policy'), path('pricing/', pricing, name='pricing') ] diff --git a/myproject/myapp/views.py b/myproject/myapp/views.py index 51acc362e4467509ec2ec3f6f3fd21bf810b491e..afaaf33c937d81d6e7bc13c01422144110526f48 100644 --- a/myproject/myapp/views.py +++ b/myproject/myapp/views.py @@ -2,8 +2,19 @@ from django.shortcuts import render from django.template import RequestContext def index(request): - return render(request, 'index.html') - + #for now this authenication just returns the main view + #when user auth is done change the else to return index2.html + if request.user.is_authenticated: + if request.method == 'POST': + if request.FILES['audio_file'] != None: + uploaded_file = request.FILES['audio_file'] + # Do something with the uploaded file + return render(request, 'index1.html') + else: + return render(request, 'index1.html') + else: + return render(request, 'index1.html') + def users(request): return render(request, 'user_page.html') @@ -26,5 +37,11 @@ def login(request): def register(request): return render(request, 'register.html') +def terms_conditions(request): + return render(request, 'terms_conditions.html') + +def privacy_policy(request): + return render(request, 'privacy_policy.html') + def pricing(request): return render(request, 'pricing.html') \ No newline at end of file