Compare commits
	
		
			No commits in common. "892ae58b9a7432d424a4d974048a448911bd8c89" and "4a7939adfbc238d3a6710635e81ccb808cfa403d" have entirely different histories.
		
	
	
		
			892ae58b9a
			...
			4a7939adfb
		
	
		| 
						 | 
				
			
			@ -5,7 +5,7 @@ class Picture(models.Model):
 | 
			
		|||
    name = models.CharField(max_length=100)
 | 
			
		||||
    description = models.TextField()
 | 
			
		||||
    author = models.CharField(max_length=100)
 | 
			
		||||
    author_url=models.URLField()
 | 
			
		||||
    original_url = models.URLField()
 | 
			
		||||
 | 
			
		||||
    def __str__(self):
 | 
			
		||||
        return self.name
 | 
			
		||||
        return self.title
 | 
			
		||||
| 
						 | 
				
			
			@ -1,8 +1,5 @@
 | 
			
		|||
import json
 | 
			
		||||
import random
 | 
			
		||||
from .models import Picture
 | 
			
		||||
 | 
			
		||||
pics=Picture.objects.order_by("?")
 | 
			
		||||
 | 
			
		||||
def get_random_picture():
 | 
			
		||||
    with open("./jsons/pics.json") as f:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -31,7 +31,6 @@ ALLOWED_HOSTS = []
 | 
			
		|||
# Application definition
 | 
			
		||||
 | 
			
		||||
INSTALLED_APPS = [
 | 
			
		||||
    'randpic.apps.RandpicConfig',
 | 
			
		||||
    'django.contrib.admin',
 | 
			
		||||
    'django.contrib.auth',
 | 
			
		||||
    'django.contrib.contenttypes',
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue