-
Notifications
You must be signed in to change notification settings - Fork 45
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
authentication #4
Comments
@MohamedShawky So, what's the issue? What did you try to do? This app is meant to work as follows: you go to If you want to chat, here's a gitter: https://gitter.im/BurkovBA/django-rest-framework-mongoengine |
@BurkovBA |
@MohamedShawky No I can't help you develop the whole application, sorry. It will take you half a year to a year (literally) to do that and I don't see any point to create yet another social network. If you have any small, specific questions on DRF-ME, I can answer them, though. At the same time, I'm currently working on my personal blog, which has frontend written in obsolete Angular 1 and will have a backend in Django-REST-Framework-Mongoengine. You can take a look at frontend here: https://github.com/BurkovBA/BurkovBA.github.io. The backend will be available later, when I'm done with new features for DRF-ME, I've long had to implement. If you're studying the programming to use it as a social lift, striving to create a large business and improve your financial situation and social status, let me suggest that you study the basics of business, such as how to do sales, then study the hottest emerging markets, read a lot of business literature and find a window of opportunity to create a very simple business, simplest possible. In parallel with that, I suggest that you improve in the programming basics and get a full-time job in a tech business that will allow you to both improve as a professional and get a fair amount of money for the next couple of years. Good luck! |
@BurkovBA
how i make DRF-ME to this classes |
Ok, this schema design looks almost ok, except by the fact that I don't understand, what Document is Note a couple of edits of mine. I used triple backticks (```) to format multiline code (not single backticks) and also suggest to rename Projects -> Project and Comments -> Comment. As for authentication. You are planning to design a REST api for your
See https://github.com/BurkovBA/django-rest-framework-mongoengine-example and copy-paste pieces of code, you need, from it. |
Hi @BurkovBA HTTP 401 Unauthorized { |
Mohamed, are you passing your authentication Token with your request in a Authorization header of your request like this^
It is not just a cookie, you need to set this header in your request by hand. Unfortunately, this makes Browsable API unusable, cause you can't pass the Token right in your browser: http://stackoverflow.com/questions/35601130/django-rest-framework-using-tokenauthentication-with-browsable-api. This is very sad, I'll take a look what we can do about it. May be, you could add Also, make sure that your viewset support POST method by design. Cause, for instance, UserViewSet in my example does not - it is a read-only. |
hi @BurkovBA
i try to solve it by remove id field from model.py and work but there is a problem which User is not have id can you fix this ? and how make nested serializers |
Yes, to solve this, you need to manually add an id field to your UserSerializer:
That's an issue of Mongoengine - it expects |
Hi @BurkovBA i have download the project than run successfully have enter the http://localhost:8000/api in url than show A server error occurred. Please contact the administrator. |
@ashokpal100 Hi, this error alone is non-descriptive. Could you also specify the messages, shown in your terminal console (where you probably said |
thanks for the response @BurkovBA django version problem |
@BurkovBA your project running successful. i want to create user by cmd than show error Password: plz let me know where i am wrong. guide me |
Hi, did you manually create an I'm sorry, Ashok, I can't dedicate much time to guiding anybody. I'm fully preoccupied, working on other projects. |
i have download this project but it didnot work
please contact me
The text was updated successfully, but these errors were encountered: