Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate django-messages #12

Closed
procrasti opened this issue May 24, 2016 · 13 comments
Closed

Integrate django-messages #12

procrasti opened this issue May 24, 2016 · 13 comments
Assignees

Comments

@procrasti
Copy link
Collaborator

Depends: #8
Branch: messages

We're going to integrate django-messages so users can PM each other!

First steps:
- add django-messages to setup.py
- add django-messages to k666/settings.py
- add django-messages to k666/urls.py
- add link to inbox somewhere.

@procrasti
Copy link
Collaborator Author

http://django-messages.readthedocs.io/en/latest/index.html

Follow through that... it shouldn't take you long.

But the final result is pretty much as I stated above.

To clarify:
1. You can install django-messages (in your virtual environment) with either pip install django-messages or easy_install django-messages... we don't want to do that, so we add it as a dependency to setup.py

  1. Add django-messages to the INSTALLED_APPS in k666/settings.py
  2. Add django-messages to the urls:

    (r'^messages/', include('django_messages.urls')),

  3. Add a link to the inbox, should be messages/inbox... but we'll actually make this a tiny bit more robust before closing this issue.

Remember, if you create and push branches, and commit to them regularly, I can follow your work even if it's only partially complete and not ready for master.

@orionblastar
Copy link
Owner

I made changes but they went into master instead of creating a new messages branch. How do I undo the changes in master?

@orionblastar
Copy link
Owner

Git says branch messages exists, and I changed to the messages branch but when I pushed it went into master and messages branch does not exist on Github.

I'm not sure if I typed something wrong or there is an issue with Github? But the messages changes got put into master.

@procrasti
Copy link
Collaborator Author

procrasti commented Jun 11, 2016

$ git push -u origin messages

Like you learned in #14.

Anyway, don't worry about it... let's just tidy up the messages branch, merge it into master, and push it to prod!

Try not to do that in the future though: YOU BROKE THE BUILD! (master should run easy as!)

@procrasti
Copy link
Collaborator Author

Now, the problems I've noticed so far:

  1. Put 'Django' at the bottom of the setup.py file... It's the base of the others, they require it, for some reason that means it goes in last.
  2. I'd probably put the django-messages app between allauth and django.contrib in the INSTALLED_APPS setting.
  3. The dynamic pages are more important than the static, in terms of URLs and such, you should have updated common_links_fragment, not static/index.html.
  4. The appname that goes in INSTALLED_APPS is 'django_messages', not 'django-messsages': See, http://django-messages.readthedocs.io/en/latest/usage.html

But there are other problems!

@procrasti
Copy link
Collaborator Author

There is an incompatibility with Django 1.1 and django-messages: arneb/django-messages#69

We need to use an earlier version of django, or find a fixed django-messages branch, or wait for them to fix it... got any ideas?

@procrasti
Copy link
Collaborator Author

I think django-messages is fucked up enough that it will be worth forking it, and merging in some changes from other people's forks?

So, look into that too!

@procrasti
Copy link
Collaborator Author

Let's close this once you've merged in messages-fixed into messages...

@orionblastar
Copy link
Owner

I think they should have fixed it by now.

I copied the modified files in messages-fixed into messages.

@procrasti
Copy link
Collaborator Author

I copied the modified files in messages-fixed into messages.

Always merge, but I think you've got all that now...

I think they should have fixed it by now.

No they haven't, it's broken with the latest build without pip unzip, which is deprecated... we will fork django-messages and use our own version and bring in the fixes from other forks that have fixed the issue... is no biggie and is good practice when we make our own modules.

I copied the modified files in messages-fixed into messages.

Well, if you're happy you can close this issue... or you can merge messages into master if you like first.

@procrasti
Copy link
Collaborator Author

Actually, I checked it, it looks good... merge it into master then close this issue.

Also delete the messages-fixed branch after that... no need for it.

@procrasti
Copy link
Collaborator Author

Alright... kind of failed to merge it into master, because you tried to back out the broken master.

So, merge master back into messages, then fix up messages again, then merge messages back into master.

so, before you merge anything into master, make sure you merge master into the branch first... so you are working with the latest master, no matter what.

These are teething problems.

@procrasti
Copy link
Collaborator Author

Pretty sure this is done, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants