orionblastar / K666

K666 is forum discussion software, this is an attempt to write the Free version FreeK666 without violating copyright
http://k666.kr5ddit.com
MIT License
5 stars 0 forks source link

Integrate django-messages #12

Closed procrasti closed 8 years ago

procrasti commented 8 years ago

Depends: https://github.com/orionblastar/K666/issues/8 Branch: messages

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

First steps:

procrasti commented 8 years ago

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 commented 8 years ago

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

orionblastar commented 8 years ago

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 commented 8 years ago
$ git push -u origin messages

Like you learned in https://github.com/orionblastar/K666/issues/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 commented 8 years ago

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 commented 8 years ago

There is an incompatibility with Django 1.1 and django-messages: https://github.com/arneb/django-messages/issues/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 commented 8 years ago

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 commented 8 years ago

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

orionblastar commented 8 years ago

I think they should have fixed it by now.

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

procrasti commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

Pretty sure this is done, right?