How to recover a deleted user account
856
Not easily, no. The files have been deleted, you will need to use a tool that can recover deleted files, there is no undo for this. For help on recovering deleted files, see this Q&A:
Recreating the user is the easy part:
adduser george
For future reference, user management should be done with adduser
and deluser
instead of useradd
and userdel
.
Related videos on Youtube
Author by
Emil George James
Updated on September 18, 2022Comments
-
Emil George James over 1 year
I have the following models with foreignkey relation.
class UserProfile(models.Model): profile_id = models.CharField( ('Profile id'), max_length=30, default='', blank=True) first_name = models.CharField( ('first name'), max_length=30, default='', blank=True) last_name = models.CharField( ('last name'), default='', max_length=30, blank=True)
Profile Image model has a foreignkey relation to UserProfile model:
class UserProfileImage(models.Model): userprofile = models.ForeignKey(UserProfile) image = models.ImageField(upload_to='profile_pic/images',blank=True,null=True) def __unicode__(self): return self.userprofile.profile_id
I want to save both forms in one view and for edit also it should pass both form instances.How will I save both forms in one view?