#194 Add django admin.py and register models
Closed 5 years ago by anasustic. Opened 5 years ago by anasustic.
fedora-commops/ anasustic/fedora-happiness-packets django-admin  into  master

file modified
+34 -3
@@ -3,10 +3,25 @@ 

      --secondary-color: #294172;

  }

  

+ *{

+     box-sizing: border-box;

+ }

+ 

+ *:before, *:after{

+     box-sizing: border-box;

+ }

+ 

+ html{

+     height: 100%;

+ }

+ 

  body {

      font-family: 'Open Sans';

      line-height: 1.8em;

      font-size: 16px;

+     height: 100%;

+     position: relative;

+     margin: 0;

  }

  

  h1, h2, h3, h4, h5, h6 {
@@ -14,6 +29,15 @@ 

      margin-top: 1.4em;

  }

  

+ main{

+     min-height: 100vh;

+     display: block;

+     overflow: hidden;

+     position: relative;

+     padding-bottom: 300px;

+     width: 100%;

+ }

+ 

  a, a:hover {

      color: var(--secondary-color);

  }
@@ -66,7 +90,9 @@ 

      text-align: center;

      padding:0 7vw;

      background-color: #3c6eb421;

-     position: relative;

+     position: absolute;

+     bottom: 0;

+     width: 100%;

  }

  

  fieldset {
@@ -178,12 +204,12 @@ 

      }

  

      main {

-         margin-left: 25%;

+         margin-left: 350px;

+         width: 75%;

      }

  

      main .container {

          padding: 0px 50px;

-         width: 100%;

      }

  

      blockquote {
@@ -210,6 +236,11 @@ 

      blockquote {

          min-height: 170px;

      }

+ 

+     main{

+         margin-left: 450px;

+         width: 75%;

+     }

  }

  

  .emoji {

file modified

@@ -83,11 +83,12 @@ 

      docker-compose exec web sh

  

  Then the terminal will show a ``#`` symbol.

- Simply type in ``t`` to initiate the test suite.

+ Simply type in ``./t`` (or ``t``) to initiate the test suite.

  

- (The test suite are run by running the ``t`` script, which runs the tests with the appropriate testing settings and provides a coverage report.)

+ (The test suite are run by running the ``./t`` script, which runs the tests with the appropriate testing settings and provides a coverage report.)

  

  Integration tests are run via the following command::

  

-     manage.py test -v 2 -p integration_test*.py --settings=happinesspackets.settings.tsting

+     docker-compose exec web ./manage.py test -v 2 -p integration_test*.py --settings=happinesspackets.settings.tsting

  

+ If a ``file not found`` error occurs, try removing the ``./`` from the command and try again.

@@ -15,6 +15,9 @@ 

      <script>document.getElementById('fb').onclick = function() {FB.ui({method: 'share', mobile_iframe: true, hashtag: '#WeAreFedora', href: 'https://happinesspackets.fedorainfracloud.org/',}, function(response){});}</script>

      <a href="https://twitter.com/intent/tweet?button_hashtag=WeAreFedora&text=I%20just%20sent%20a%20happiness%20packet%20to%20thank%20a%20@fedora%20community%20member" class="twitter-hashtag-button" data-size="large" data-dnt="true">Tweet #WeAreFedora</a>

      <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>

-     {% block footer %}{% endblock %}

  

  {% endblock content %}

+ 

+ {% block footer %}

+     {% include "follow.html" %}

+ {% endblock %} 

\ No newline at end of file

This change adds admin.py and registers Message and BlacklistedEmail models in admin.py.
It addresses the first point of #157.
Django Admin Site is easily accessible to modify or enter models.

1 new commit added

  • Remove tab in line 5 and 11 of faq.rst
5 years ago

1 new commit added

  • Fixed merge errors in development_windows.rst
5 years ago

1 new commit added

  • Removed two new lines at the end of development_windows.rst
5 years ago

Metadata Update from @jflory7:
- Pull-request tagged with: PASSED, needs testing, new change, type - backend, type - summer coding

5 years ago

Hi @anasustic, could you give more context to this change? Please answer the questions in the contributing guide, in the Submit a pull request section.

Thanks for reminding me of the contribution guide @jflory7. Please take a look when you have a moment if the description gives more context.

rebased onto 28308b491bd97225a8faab8a44fdbb5c6e2aa7d6

5 years ago

@anasustic Thanks for the edit. This change makes sense. :thumbsup:

The pull request also includes extra commits and changes not included in #157. Before merging, the PR should be a single commit that only changes what the commit message describes.

It looks like your branch fell behind from upstream while you were working on changes. My preferred way to get a local branch up-to-date with an upstream branch is with rebasing. This way, you can replay your changes/commits on top of newer commits in the upstream branch. For example, I use the following commands:

# One-time setup to add an upstream remote
git remote add upstream https://pagure.io/fedora-commops/fedora-happiness-packets.git

git checkout master
git pull upstream master
git checkout django-admin
git rebase master

This gets your local master branch in sync with upstream's master branch. Then you can rebase the changes in your django-admin branch onto new changes from the master branch. Does this make sense?

Here are some extra resources on rebasing:

For this PR, you may want to start with a fresh branch, make your changes again and commit, and push, if it takes too long to simplify the commits in this PR. The tips above should help for future changes you make. :smiley:

Metadata Update from @jflory7:
- Pull-request untagged with: needs testing
- Pull-request tagged with: needs changes

5 years ago

Metadata Update from @jflory7:
- Request assigned

5 years ago

rebased onto 593bf73

5 years ago

rebased onto cb9bc9e

5 years ago

Hi, It does make perfect sense and thanks a lot for all your tips. I will start with a fresh branch for this PR as you suggested.

Hi, I cloned my fork of the project from scratch, pulled the upstream/master and created a new branch and my change (admin.py) is again buried in between all other changes when I want to create a PR from the new branch.
I ran rebase master and pushed it to the origin/branch using the -f switch. It says that my branch is 16 commits ahead of the upstream project master branch. My understanding is that after the rebase it should in effect be only 1 commit away containing 1 file (admin.py).
Any suggestions?

@anasustic Maybe the best thing is to start fresh and commit your changes again. You can save a copy of files you changed first. Then check out a fresh branch from master. Then you can add your changed files in and commit again.

I'm sorry this is being so much trouble. :weary: Thanks for your patience.

Hi @jflory7, I am sorry but I created a new PR #202 Add django admin.py and register models from a fresh branch. I really hope I am in synch with the upstream this time :smile: I used the same name and description for the PR.

Pull-Request has been closed by anasustic

5 years ago