Anonymous
Or use different dbms if you're so flexible
Karthik
I'm doing a project for my college. Like full college management system
Karthik
Can I use mongodb as a database for that project
Mirco
Try using PostgresSQL if u are free to choose one
Karthik
I'm doing a project for my college. Like full college management system
Pls refer if you have any similar project source codes
Dheeraj
I'm doing a project for my college. Like full college management system
Even I am doing a similar type of project, but it is hostel management system, can i get your project source codes
Anonymous
Then do it
Anonymous
Afaik there aren't much concepts in mongodb like the there in a relational database
Chris
Who has ever used Djongo with Django for MongoDB?
Chris
No matter what I do, the admin page tells me to input the required field 😢
Marcelo
It shows "you need to update visual c++"
I've some issues in visual c++, what's version u have installed and what is required?
Manish
i am getting emptypage error in page=2 in paginator
Manish
https://del.dog/ajanoyozut this is my views.py
Manish
path('', views.article_home, name='article_home'), urls.py
Manish
however my website works with page=1 fine
Manish
and i have more than 10 article in db
Manish
with published tag
Mirco
What about your template ?
Manish
What about your template ?
okay here it is https://del.dog/ufokevoxol.htm
Manish
{% if articles.has_other_pages %} {% include "blog/article/pagination.html" with articles=articles %} {% endif %}
Mirco
Mmm strange, it looks good
Manish
yeah
Manish
i tried all over in web for this issue
Manish
but no luck
Mirco
Try to use Paginator in a Django shell by passing the same qs
Mirco
And check if next page or previous page look good
Manish
i get <page 2 of 2>
Mirco
Strange
Manish
all strange things happens to me😭😭😭
Mirco
In your template u have a typo mistake article instead of articles on line 7
Mirco
<span class="current"> Page {{ articles.number }} of {{ articles.paginator.num_pages }}. </span> why that for loop ? U can do as docs suggests
Manish
In your template u have a typo mistake article instead of articles on line 7
https://screenshots.firefox.com/5L7sc8tt4K8fqyht/localhost
Mirco
I think it will be something stupid that we cannot see 😂
Mirco
Maybe I'm going wrong but try to use the if statement into template to check if has_next or has_previous outside class attribute , enclosing your anchor tag
Manish
I think it will be something stupid that we cannot see 😂
Yeah my all mistake was stupid this can be. i will try again with scratch
Mirco
Try to put the if outside class attribute into template
Mirco
Then refactor as you need
Mirco
Just to see if it will work
Manish
whoopee it worked
Mirco
😂😂
Manish
https://del.dog/ufogonayol but i changed something different
Manish
see that
Manish
crazy nahh!😁😁
Manish
thanks alot man
Mirco
Yup what I said before but like this you have to repeat two if statement that are equals
Manish
if you refuse to help me then i am dead
Manish
complex is better than complicated
Mirco
Simply use two a tags one when has_previous and one not
Mirco
So if has previous , the a tag will have that button enabled with href to previous page Otherwise a tag with disabled
Anders (izzno / gooood) ๐Ÿ‡ณ๐Ÿ‡ด
If i set name = something(unique=True) is this automatically the PK ?
Anders (izzno / gooood) ๐Ÿ‡ณ๐Ÿ‡ด
In my model
Rajjix
No
Anders (izzno / gooood) ๐Ÿ‡ณ๐Ÿ‡ด
hm.
Rajjix
If you have made an sql database before
Anders (izzno / gooood) ๐Ÿ‡ณ๐Ÿ‡ด
I am making an api but the "id" does not show up
Rajjix
You should know that there is a primary key attribute you can assignto a field Django autoassigns it to id
Anders (izzno / gooood) ๐Ÿ‡ณ๐Ÿ‡ด
yes i thought i knew that to, thats why i am windering why its not visible in the api.
Anders (izzno / gooood) ๐Ÿ‡ณ๐Ÿ‡ด
maybe i have to assign a detailview before the restapi bothers with IDs ?
Rajjix
be more specific, what do you mean not showing up
Anders (izzno / gooood) ๐Ÿ‡ณ๐Ÿ‡ด
Sure give me a sec
Mirco
Your serializer ?
Anders (izzno / gooood) ๐Ÿ‡ณ๐Ÿ‡ด
the serializer is Modelserializer
Mirco
Yep, but you can use fields attribute
Anders (izzno / gooood) ๐Ÿ‡ณ๐Ÿ‡ด
Oh...
Anders (izzno / gooood) ๐Ÿ‡ณ๐Ÿ‡ด
im an idiot...
Anders (izzno / gooood) ๐Ÿ‡ณ๐Ÿ‡ด
;)
Mirco
Rajjix
😂😂
Anders (izzno / gooood) ๐Ÿ‡ณ๐Ÿ‡ด
Thanks ;)
Mirco
Yw 😀