diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 257e8c6496309800f9181a427b0dd34a07e31b5c..48a714b9070ab11a4eca30fd8513363b42d1577c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -56,5 +56,6 @@ Go-py3.6: image: library/python:3.6 type: test script: + - if pip list --outdated | grep "Latest" | wc -l > 0; then pip list --outdated && exit 1; else exit 0; fi - coverage run --source=go --omit=*migrations/*,*admin.py,*manage.py,*wsgi.py,*settings.py,*secret.py,*__init__.py,*.pyc,*templates/*,*static/* manage.py test - coverage html -i && grep pc_cov htmlcov/index.html | egrep -o "[0-9]+\%" | awk '{ print "covered " $1;}' diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 87054a9e61f266c3930e7e571bf24ad25d76d0fa..0b52de13ff2535e8cc5a2948a9531ec66b00d053 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,7 @@ # On Contributing ## git + First take a look at [github flow](https://guides.github.com/introduction/flow/) as this page gives a good starting point on understanding how to work with `git` in an open source repo. @@ -77,7 +78,13 @@ Example commit description: ### Merging to the current development branch -Once you've finished work in a branch open a [pull request](https://git.gmu.edu/srct/go/merge_requests/new) +Once you've finished work in a branch you will need to push your commits to gitlab. + + git push origin ##-branchname + +`Origin` is gitlab. + +Open a [merge request](https://git.gmu.edu/srct/go/merge_requests/new) to start the process of getting your code into the repo. Your code wil be reviewed by another member before being merged. Your code must pass our tests and include in the description: diff --git a/go/go/admin.py b/go/go/admin.py index 78dcde5d33dba870e6dad8399be5b24593aeb3af..265d6dc98e2f2d2967c77637c04062277c5eab0c 100644 --- a/go/go/admin.py +++ b/go/go/admin.py @@ -12,7 +12,7 @@ from django.contrib.auth.admin import UserAdmin from django.contrib.auth.models import User # App Imports -from go.models import URL, RegisteredUser +from .models import URL, RegisteredUser class URLAdmin(admin.ModelAdmin): """ diff --git a/go/go/forms.py b/go/go/forms.py index ecc6d98e89103713bdb4976cd50395512b806ee9..52ba369deaa345a418ccebb1200540e2ce169714 100644 --- a/go/go/forms.py +++ b/go/go/forms.py @@ -19,7 +19,7 @@ from django.utils import timezone from django.utils.safestring import mark_safe # App Imports -from go.models import URL, RegisteredUser +from .models import URL, RegisteredUser # Other Imports from bootstrap3_datetime.widgets import DateTimePicker diff --git a/go/go/models.py b/go/go/models.py index 49847714e55b0276d1f65dd181dbde9fd1201f5a..cffa0a3976947ad5d5c4051beb404d3b1d06e4e5 100644 --- a/go/go/models.py +++ b/go/go/models.py @@ -134,14 +134,13 @@ class URL(models.Model): """ if cache.get("hashids_counter") is None: cache.set("hashids_counter", URL.objects.count()) - cache.incr("hashids_counter") - short = HASHIDS.encrypt(cache.get("hashids_counter")) tries = 1 while tries < 100: try: - URL.objects.get(short__iexact=short) + short = HASHIDS.encrypt(cache.get("hashids_counter")) tries += 1 cache.incr("hashids_counter") + URL.objects.get(short__iexact=short) except URL.DoesNotExist as ex: print(ex) return short diff --git a/go/go/templates/admin/useradmin.html b/go/go/templates/admin/useradmin.html index 9f17378bd3141387f8e71cc045e9aa8020e0888f..21bb38be4466e3bc69bc35a6944d4cc289360b18 100644 --- a/go/go/templates/admin/useradmin.html +++ b/go/go/templates/admin/useradmin.html @@ -7,17 +7,20 @@ {% block content %} + +{% load staticfiles %} + @@ -309,8 +312,7 @@ - + {% endblock %} \ No newline at end of file diff --git a/go/go/templates/banned.html b/go/go/templates/banned.html index 30342f2a23e8b8cff1cdaadf99920c32bd452026..9b93283bf7b4927c7e148b2aae6334dcb2d10cab 100644 --- a/go/go/templates/banned.html +++ b/go/go/templates/banned.html @@ -10,13 +10,13 @@ SRCT Go • Account Blocked @@ -32,10 +32,11 @@ SRCT Go • Account Blocked

If you believe this is an error, please contact the Go Admins
-
+
Thank you, and have a nice day!

-

+
+
{% endblock %} diff --git a/go/go/templates/core/about.html b/go/go/templates/core/about.html index 0b047136e5e599c744d499abe1dcf254e161202c..69fd4d618d4f637d9fbdcad14177aa40777d854c 100644 --- a/go/go/templates/core/about.html +++ b/go/go/templates/core/about.html @@ -13,13 +13,13 @@ SRCT Go • About @@ -27,12 +27,12 @@ SRCT Go • About
-

Terms of Use

+

Terms of Use

By using Go you acknowledge that you are a current George Mason Student or faculty member.

- Additionally any link that you create is subject to removal by Go admins if it is deemed + Additionally, any link that you create is subject to removal by Go admins if it is deemed to associate the univeristy with any
derogatory or controversial matters. @@ -53,7 +53,7 @@ SRCT Go • About

-

Who made Go?

+

Who made Go?

Members of the @@ -77,7 +77,7 @@ SRCT Go • About

-

Thanks

+

Thanks

This project was made possible through the collective contributions of multiple Mason SRCT members. @@ -103,7 +103,7 @@ SRCT Go • About

Go 1.0:
- Michel Rouley, + Michel Rouly, Chris Reffett, Nicholas Anderson, and Akshay Karthik. diff --git a/go/go/templates/core/edit_link.html b/go/go/templates/core/edit_link.html index 7a34da568aa6cb3d88db9e7c567cc0519ef5b7fa..04ec563eda5cfbab61d006afd5e830da0a53c3ba 100644 --- a/go/go/templates/core/edit_link.html +++ b/go/go/templates/core/edit_link.html @@ -19,13 +19,13 @@ SRCT Go • Edit Link

diff --git a/go/go/templates/core/index.html b/go/go/templates/core/index.html index 2ecafe1ae6fb8c42103544e5372c4a0e9bac19a5..4b2c81bb8459b69e2821b8ba0aab6868d377435a 100644 --- a/go/go/templates/core/index.html +++ b/go/go/templates/core/index.html @@ -13,13 +13,13 @@ SRCT Go • My Links