#3 Setting up Views for Uploading and listing images
This commit is contained in:
		
							
								
								
									
										46
									
								
								django_web_galleries/web_galleries/templates/global.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										46
									
								
								django_web_galleries/web_galleries/templates/global.html
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,46 @@
 | 
			
		||||
<!DOCTYPE html>
 | 
			
		||||
<html lang="en">
 | 
			
		||||
<head>
 | 
			
		||||
    <meta charset="UTF-8">
 | 
			
		||||
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
 | 
			
		||||
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
 | 
			
		||||
    <title>Web Gallery</title>
 | 
			
		||||
</head>
 | 
			
		||||
<body>
 | 
			
		||||
    <div class="RV-Page">
 | 
			
		||||
        <head class="RV-Head">
 | 
			
		||||
            <nav class="RV-Navigation">
 | 
			
		||||
                <ul class="RV-Navigation__list">
 | 
			
		||||
                    <li class="RV-Navigation__item">
 | 
			
		||||
                        <a href="{% url 'home' %}" class="RV-Navigation__link">
 | 
			
		||||
                            Home
 | 
			
		||||
                        </a>
 | 
			
		||||
                    </li>
 | 
			
		||||
                    <li class="RV-Navigation__item">
 | 
			
		||||
                        <a href="{% url 'upload_image' %}" class="RV-Navigation__link">
 | 
			
		||||
                            Upload image
 | 
			
		||||
                        </a>
 | 
			
		||||
                    </li>
 | 
			
		||||
                    <li class="RV-Navigation__item">
 | 
			
		||||
                        <a href="#" class="RV-Navigation__link">
 | 
			
		||||
                            My galleries
 | 
			
		||||
                        </a>
 | 
			
		||||
                    </li>
 | 
			
		||||
                    <li class="RV-Navigation__item">
 | 
			
		||||
                        <a href="#" class="RV-Navigation__link">
 | 
			
		||||
                            Create gallery
 | 
			
		||||
                        </a>
 | 
			
		||||
                    </li>
 | 
			
		||||
                </ul>
 | 
			
		||||
            </nav>
 | 
			
		||||
        </head>
 | 
			
		||||
        <main class="RV-Content">
 | 
			
		||||
            {% block content %}
 | 
			
		||||
            {% endblock content %}
 | 
			
		||||
        </main>
 | 
			
		||||
        <footer class="RV-Footer">
 | 
			
		||||
            
 | 
			
		||||
        </footer>
 | 
			
		||||
    </div>
 | 
			
		||||
</body>
 | 
			
		||||
</html>
 | 
			
		||||
@@ -0,0 +1,13 @@
 | 
			
		||||
{% extends '../global.html' %}
 | 
			
		||||
 | 
			
		||||
{% load responsive_images %}
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
    <sectoin class="RV-Images">
 | 
			
		||||
        <li class="RV-Images__list">
 | 
			
		||||
            {% for image in images %}
 | 
			
		||||
                <img src="{% src image.image_file 200x200 %}">
 | 
			
		||||
            {% endfor %}
 | 
			
		||||
        </li>
 | 
			
		||||
    </sectoin>
 | 
			
		||||
{% endblock content %}
 | 
			
		||||
@@ -0,0 +1,9 @@
 | 
			
		||||
{% extends '../global.html' %}
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
    <form method="POST" enctype="multipart/form-data">
 | 
			
		||||
        {% csrf_token %}
 | 
			
		||||
        {{ form }}
 | 
			
		||||
        <button type="submit">Upload</button>
 | 
			
		||||
    </form>
 | 
			
		||||
{% endblock content %}
 | 
			
		||||
		Reference in New Issue
	
	Block a user