Commit Graph

64 Commits

Author SHA1 Message Date
Andreas Zweili 2aabb76ae0 remove delete option from inline images
If one selectes a inline picture and deletes it. The whole article
gets deleted. It's therefor better if the user has to go to the
picture admin form and delete the picture from there
2018-01-14 12:59:23 +01:00
Andreas Zweili 7f94bd4f0d correct the empty message on the index page 2018-01-14 12:38:38 +01:00
Andreas Zweili b80c40c902 rephrase a second message 2018-01-14 12:36:22 +01:00
Andreas Zweili 82e4d84724 rephrase the message on empty categories 2018-01-14 12:34:13 +01:00
Andreas Zweili e54765a54f remove the delete option from the picture model
This option got added by accident. If we would keep it then the
related article would get deleted when one deletes a picture.
2018-01-14 12:22:46 +01:00
Andreas Zweili 2f58fcec94 allow dupilcated names of pictures 2018-01-14 12:22:27 +01:00
Andreas Zweili 35de9bf7a5 add a check to limit picture uploads
with the option max_pictures it's now possible to limit the amount of
pictures a user is allowed to upload to an article.
2018-01-14 12:20:47 +01:00
Andreas Zweili fabdc48492 add a description field to the Option model 2018-01-14 12:19:44 +01:00
Andreas Zweili d4502c655f prevent options from deletion und don't allow new options 2018-01-14 12:18:13 +01:00
Andreas Zweili d929a23ede remove the Setting model 2018-01-14 12:16:00 +01:00
Andreas Zweili 9cdf14c618 allow pictures to be added on the article 2018-01-13 16:13:26 +01:00
Andreas Zweili d040e96460 readd pictures to the article details page 2018-01-13 16:13:06 +01:00
Andreas Zweili 852751bc27 Merge branch 'frontendstyling' into andreas 2018-01-13 08:29:31 +01:00
Ivan Hörler a4307da75f Merge branch 'currency' of git.2li.ch:ibz/web_AI-5 into currency
* 'currency' of git.2li.ch:ibz/web_AI-5:
  correct the datetimefield on the orders model
2018-01-10 00:59:01 +01:00
Andreas Zweili 9ef8a4371e correct the datetimefield on the orders model
In Django it's better to use timezone.now instead of datetime.now()
this is because it has additional settings for timezones which this
way wouldn't get reflected in the attributes and lead to wrong
datetime values.
2018-01-04 12:30:01 +01:00
Ivan Hörler 4f51e17504 Merge remote-tracking branch 'origin/master' into currency
* origin/master:
  remove the old media directory
  create the path /srv/media/images in the Vagrant vm
  create the media directory on the production server
  add pictures to the article details page
  move the media root and add support for MEDIA_URL
  readd two commands
2018-01-03 08:35:18 +01:00
Andreas Zweili 3b73c67c66 add pictures to the article details page 2017-12-31 15:12:09 +01:00
Ivan Hörler d500712dc2 changed some of the views and implemented a more selfish perspective of a shop.
For shure not ideal and in NO way DRY but a solution for now.
2017-12-29 22:32:27 +01:00
Ivan Hörler dc083d9c5e Merge branch 'currency' into frontendstyling
* currency: (25 commits)
  changed view and deleted the database unique filed
  add tableview in /currencies
  checkout the production branch on the production server
  add a registration
  disable debugging for production
  add a user profile
  extend the base template with login, profile and logout links
  add templates to support user authentication
  add url patterns to support user authentication
  remove an unnecessary shebang
  remove unnecessary attributes from the Person model
  redirect logins back to the index
  make imports more explicit
  remove an unnecessary configuration
  remove an old file
  change the article status to active
  change the content include because the org-mode file is called doku
  add a python package to the ansible role
  add fixtures with test data
  Add date to currencies list
  ...

# Conflicts:
#	Vagrantfile
#	ansible/roles/web_AI-5/tasks/main.yml
#	django/didgeridoo/didgeridoo/settings.py
#	django/didgeridoo/webshop/templates/webshop/base.html
2017-12-29 19:43:16 +01:00
Ivan Hörler 487c96710a Merge commit 'ee7232cd502afbf15f36769da0835b4a1e1358df' into currency
* commit 'ee7232cd502afbf15f36769da0835b4a1e1358df':
  checkout the production branch on the production server
  add a registration
  disable debugging for production
  add a user profile
  extend the base template with login, profile and logout links
  add templates to support user authentication
  add url patterns to support user authentication
  remove an unnecessary shebang
  remove unnecessary attributes from the Person model
  redirect logins back to the index
  make imports more explicit
  remove an unnecessary configuration
  remove an old file
  change the article status to active
  change the content include because the org-mode file is called doku
  add a python package to the ansible role
  add fixtures with test data
  fix the admin view of order of goods
  added sketch of Siteview to docs
2017-12-29 19:28:31 +01:00
Andreas Zweili 1f3ab70dd6 add a registration 2017-12-29 16:46:21 +01:00
Ivan Hörler 7bb875e696 selfmade css file 2017-12-29 15:12:29 +01:00
Ivan Hörler 45ca9ca55e unfinshed atempt to make a nav abandoned for later use maybe 2017-12-29 15:11:45 +01:00
Andreas Zweili d8a1d9ef54 add a user profile 2017-12-28 19:22:00 +01:00
Andreas Zweili 59db6e221e extend the base template with login, profile and logout links 2017-12-28 19:21:29 +01:00
Andreas Zweili de3e07dedb add templates to support user authentication 2017-12-28 19:20:28 +01:00
Andreas Zweili 56e56f0c1c add url patterns to support user authentication 2017-12-28 19:19:47 +01:00
Andreas Zweili 516dd47493 remove an unnecessary shebang 2017-12-28 19:15:35 +01:00
Andreas Zweili fce1a6a8c2 remove unnecessary attributes from the Person model 2017-12-28 19:14:41 +01:00
Andreas Zweili f9f1c89a01 make imports more explicit 2017-12-28 16:40:04 +01:00
Andreas Zweili 6ddd869722 add fixtures with test data 2017-12-27 19:33:29 +01:00
Andreas Zweili f6597ec69e fix the admin view of order of goods 2017-12-27 15:10:12 +01:00
Ivan Hörler 1b7252a669 Merge branch 'master' into currency
* master:
  fix a typo
  move some parts from the vagrant file into a separate script
  make the setup script executable
  fix a typo
  add a setup script to the ansible role
  add a pip install routine to the ansible role
  add the repository to the ansible role
  fix a typo in the ansbible role
  add missing packages to the ansible role
  add a list of allowed hosts to the django settings
  change ansible includes to import_tasks
  extend the admin interface for the order class
  add an intermediate class between order and article
  add a date field to the orders class
  sort city outputs by zip code
  update readme with more up to date information
2017-12-26 13:03:20 +01:00
Andreas Zweili 0ef5cdff80 extend the admin interface for the order class
In order to be able to correctly edit the an order we need the
information of the induvidual order positions. In addition a better
layout is required to better find the information.
2017-12-21 23:07:58 +01:00
Andreas Zweili f4aa223135 add an intermediate class between order and article
Because we need additional fields in an order it's necessary to add an
additional class where the information gets stored.
2017-12-21 23:06:09 +01:00
Andreas Zweili 3dc9aa33bb add a date field to the orders class
In order to be able to identify the correct customer order it's
necessary to have the date of the order available.
2017-12-21 23:05:10 +01:00
Andreas Zweili 991fbfc6f5 sort city outputs by zip code 2017-12-20 19:51:49 +01:00
Ivan Hörler 4da981e5d6 Merge commit 'bc3b14b5dd697f1784acbcbfa0ef0948de4ef560' into currency
* commit 'bc3b14b5dd697f1784acbcbfa0ef0948de4ef560':
  add a base.html file and refactor the other html files
  refactor the views
2017-12-19 22:38:21 +01:00
Andreas Zweili bc3b14b5dd add a base.html file and refactor the other html files 2017-12-19 20:21:46 +01:00
Andreas Zweili b8fa6eef5c refactor the views 2017-12-19 20:12:21 +01:00
Ivan Hörler 28841df4e3 Merge branch 'master' into currency
* master:
  fix the category list
  add a view to show the details of an article
  add a view to list all articles in a category
  point the project root to the webshop app
  add an index view and a coresponding template
2017-12-18 19:11:24 +01:00
Ivan Hörler 344447b909 UN-finished Push of currency branch. Preview only, do not change. Ivan on charge. 2017-12-18 09:03:52 +01:00
Andreas Zweili e63627ca4f fix the category list 2017-12-17 19:37:49 +01:00
Andreas Zweili 6894a1bfba add a view to show the details of an article 2017-12-17 10:37:04 +01:00
Andreas Zweili 7c5af973f2 add a view to list all articles in a category 2017-12-17 10:36:44 +01:00
Andreas Zweili cc313a50f3 add an index view and a coresponding template 2017-12-17 10:35:21 +01:00
Andreas Zweili 83bb342383 cities return both the zip code and their name
Since some cities have multiple zip codes it's necessary that they
return both the zip code and the name.
2017-12-12 20:32:57 +01:00
Andreas Zweili 6b5bd3fe45 only allow positiv prices
In order to only allow positiv prices I had import two new classes.
2017-12-06 21:14:14 +01:00
Andreas Zweili 2ec5a9ca7e display the option name in the settings list 2017-12-06 20:35:06 +01:00
Andreas Zweili 71438ed14c add images to the Picture model
In addition to the image attribute I added the directory where the
images get stored.
2017-12-06 20:32:49 +01:00